]> source.dussan.org Git - sonarqube.git/commitdiff
Add grunt jshint
authorStas Vilchik <vilchiks@gmail.com>
Mon, 1 Dec 2014 10:32:13 +0000 (11:32 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 1 Dec 2014 10:33:07 +0000 (11:33 +0100)
server/sonar-web/.jshintrc [new file with mode: 0644]
server/sonar-web/Gruntfile.coffee
server/sonar-web/package.json

diff --git a/server/sonar-web/.jshintrc b/server/sonar-web/.jshintrc
new file mode 100644 (file)
index 0000000..64b4d11
--- /dev/null
@@ -0,0 +1,84 @@
+{
+  "maxerr": 50,
+
+  "bitwise": true,
+  "camelcase": false,
+  "curly": true,
+  "eqeqeq": true,
+  "forin": true,
+  "freeze": true,
+  "immed": false,
+  "indent": 2,
+  "latedef": false,
+  "newcap": false,
+  "noarg": true,
+  "noempty": true,
+  "nonbsp": true,
+  "nonew": false,
+  "plusplus": false,
+  "quotmark": "single",
+  "undef": true,
+  "unused": true,
+  "strict": false,
+  "maxparams": false,
+  "maxdepth": 4,
+  "maxstatements": false,
+  "maxcomplexity": false,
+  "maxlen": 120,
+
+  "asi": false,
+  "boss": false,
+  "debug": false,
+  "eqnull": true,
+  "esnext": false,
+  "moz": false,
+  "evil": false,
+  "expr": false,
+  "funcscope": false,
+  "globalstrict": false,
+  "iterator": false,
+  "lastsemic": false,
+  "laxbreak": false,
+  "laxcomma": false,
+  "loopfunc": false,
+  "multistr": false,
+  "noyield": false,
+  "notypeof": false,
+  "proto": false,
+  "scripturl": false,
+  "shadow": false,
+  "sub": false,
+  "supernew": false,
+  "validthis": false,
+
+  "browser": true,
+  "browserify": false,
+  "couch": false,
+  "devel": true,
+  "dojo": false,
+  "jasmine": false,
+  "jquery": true,
+  "mocha": false,
+  "mootools": false,
+  "node": false,
+  "nonstandard": false,
+  "prototypejs": false,
+  "qunit": false,
+  "rhino": false,
+  "shelljs": false,
+  "worker": false,
+  "wsh": false,
+  "yui": false,
+
+  "globals": {
+    "jQuery": true,
+    "$j": true,
+    "_": true,
+    "define": true,
+    "requirejs": true,
+    "console": true,
+    "baseUrl": true,
+    "key": true,
+    "Backbone": true
+  }
+}
index 6d576c949001edd0eb94f5a429dc68f11185c985..398c742840a6b9b37e207075ab281781fbe89353 100644 (file)
@@ -318,6 +318,19 @@ module.exports = (grunt) ->
         src: ['<%= pkg.sources %>js/tests/e2e/tests/<%= grunt.option("spec") %>-spec.js']
 
 
+    jshint:
+      dev:
+        src: [
+          '<%= pkg.sources %>js/**/*.js'
+          '!<%= pkg.sources %>js/third-party/underscore.js'
+          '!<%= pkg.sources %>js/third-party/**/*.js'
+          '!<%= pkg.sources %>js/tests/**/*.js'
+          '!<%= pkg.sources %>js/require.js'
+        ]
+        options:
+          jshintrc: true
+
+
     watch:
       options:
         spawn: false
@@ -351,6 +364,7 @@ module.exports = (grunt) ->
   grunt.loadNpmTasks 'grunt-contrib-clean'
   grunt.loadNpmTasks 'grunt-contrib-copy'
   grunt.loadNpmTasks 'grunt-contrib-concat'
+  grunt.loadNpmTasks 'grunt-contrib-jshint'
   grunt.loadNpmTasks 'grunt-express-server'
   grunt.loadNpmTasks 'grunt-casper'
 
index 9bd6cb730c4bb3e497f9d62d861d36cd0130a034..0971f5d2942343ff75446fb0e64f2175ff1eb2a8 100644 (file)
@@ -2,26 +2,27 @@
   "name": "SonarQube",
   "version": "0.0.1",
   "devDependencies": {
-    "express": "4.8.0",
-    "errorhandler": "1.1.1",
-    "serve-static": "1.5.0",
-    "jade": "1.4.2",
-    "phantomjs": "1.9.7-12",
     "casperjs": "1.1.0-beta3",
+    "errorhandler": "1.1.1",
+    "express": "4.8.0",
     "grunt": "0.4.4",
+    "grunt-casper": "0.3.9",
     "grunt-cli": "0.1.13",
-    "grunt-contrib-less": "0.10.0",
+    "grunt-contrib-clean": "0.5.0",
     "grunt-contrib-coffee": "0.10.1",
+    "grunt-contrib-concat": "0.4.0",
+    "grunt-contrib-copy": "0.5.0",
     "grunt-contrib-handlebars": "0.7.0",
+    "grunt-contrib-jshint": "0.10.0",
+    "grunt-contrib-less": "0.10.0",
     "grunt-contrib-requirejs": "0.4.3",
-    "grunt-contrib-watch": "0.5.3",
     "grunt-contrib-uglify": "0.4.0",
-    "grunt-contrib-clean": "0.5.0",
-    "grunt-contrib-copy": "0.5.0",
-    "grunt-contrib-concat": "0.4.0",
+    "grunt-contrib-watch": "0.5.3",
     "grunt-css-url-rewrite": "0.3.5",
-    "grunt-casper": "0.3.9",
-    "grunt-express-server": "0.4.17"
+    "grunt-express-server": "0.4.17",
+    "jade": "1.4.2",
+    "phantomjs": "1.9.7-12",
+    "serve-static": "1.5.0"
   },
   "engines": {
     "node": "~0.8 || ~0.10"