diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000000..d3d8fe33ed --- /dev/null +++ b/.jshintrc @@ -0,0 +1,26 @@ +{ + "node": true, + "browser": false, + "nomen": false, + "strict": false, + "sub": true, + "eqeqeq": true, + "laxbreak": true, + "bitwise": true, + "curly": true, + "forin": true, + "immed": true, + "latedef": true, + "newcap": true, + "noarg": true, + "noempty": true, + "nonew": true, + "plusplus": true, + "regexp": true, + "undef": true, + "unused": true, + "trailing": true, + "indent": 4, + "onevar": true, + "white": true +} diff --git a/Gruntfile.js b/Gruntfile.js index 31644af26e..8148437753 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -129,30 +129,7 @@ var path = require('path'), // Linting rules for server side or shared javascript code server: { options: { - node: true, - browser: false, - nomen: false, - strict: false, - sub: true, - eqeqeq: true, - laxbreak: true, - bitwise: true, - curly: true, - forin: true, - immed: true, - latedef: true, - newcap: true, - noarg: true, - noempty: true, - nonew: true, - plusplus: true, - regexp: true, - undef: true, - unused: true, - trailing: true, - indent: 4, - onevar: true, - white: true + jshintrc: '.jshintrc' }, files: { src: [ @@ -168,40 +145,7 @@ var path = require('path'), // Linting rules for client side javascript code client: { options: { - predef: { - document: true, - window: true, - location: true, - setTimeout: true, - Ember: true, - Em: true, - DS: true, - $: true, - validator: true, - ic: true - }, - node: false, - browser: true, - nomen: false, - bitwise: true, - curly: true, - eqeqeq: true, - forin: true, - immed: true, - latedef: true, - newcap: true, - noarg: true, - noempty: true, - nonew: true, - plusplus: true, - regexp: true, - undef: true, - unused: true, - trailing: true, - indent: 4, - esnext: true, - onevar: true, - white: true + jshintrc: 'core/client/.jshintrc' }, files: { src: [ @@ -948,4 +892,4 @@ var path = require('path'), }; // Export the configuration -module.exports = configureGrunt; \ No newline at end of file +module.exports = configureGrunt; diff --git a/core/client/.jshintrc b/core/client/.jshintrc new file mode 100644 index 0000000000..d737b0136d --- /dev/null +++ b/core/client/.jshintrc @@ -0,0 +1,32 @@ +{ + "node": false, + "browser": true, + "nomen": false, + "bitwise": true, + "curly": true, + "eqeqeq": true, + "forin": true, + "immed": true, + "latedef": true, + "newcap": true, + "noarg": true, + "noempty": true, + "nonew": true, + "plusplus": true, + "regexp": true, + "undef": true, + "unused": true, + "trailing": true, + "indent": 4, + "esnext": true, + "onevar": true, + "white": true, + "globals": { + "Ember": true, + "Em": true, + "DS": true, + "$": true, + "validator": true, + "ic": true + } +}