From 9d809aa2ba2a37c9f8d57aef44ec639f3c60f547 Mon Sep 17 00:00:00 2001 From: dceejay Date: Thu, 16 Apr 2015 11:53:39 +0100 Subject: [PATCH] Point Grunt to use external jshintrc --- Gruntfile.js | 53 ++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 1c10d54fe..5d6da39f6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,9 +15,9 @@ **/ var path = require("path"); - + module.exports = function(grunt) { - + grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), paths: { @@ -37,16 +37,17 @@ module.exports = function(grunt) { }, jshint: { options: { + jshintrc:true // http://www.jshint.com/docs/options/ - "asi": true, // allow missing semicolons - "curly": true, // require braces - "eqnull": true, // ignore ==null - "forin": true, // require property filtering in "for in" loops - "immed": true, // require immediate functions to be wrapped in ( ) - "nonbsp": true, // warn on unexpected whitespace breaking chars - //"strict": true, // commented out for now as it causes 100s of warnings, but want to get there eventually - "loopfunc": true, // allow functions to be defined in loops - "sub": true // don't warn that foo['bar'] should be written as foo.bar + //"asi": true, // allow missing semicolons + //"curly": true, // require braces + //"eqnull": true, // ignore ==null + //"forin": true, // require property filtering in "for in" loops + //"immed": true, // require immediate functions to be wrapped in ( ) + //"nonbsp": true, // warn on unexpected whitespace breaking chars + ////"strict": true, // commented out for now as it causes 100s of warnings, but want to get there eventually + //"loopfunc": true, // allow functions to be defined in loops + //"sub": true // don't warn that foo['bar'] should be written as foo.bar }, all: [ 'Gruntfile.js', @@ -55,7 +56,7 @@ module.exports = function(grunt) { 'nodes/**/*.js', 'editor/js/**/*.js' ], - + core: { files: { src: [ @@ -198,7 +199,7 @@ module.exports = function(grunt) { tasks: ['sass','attachCopyright:css'] } }, - + nodemon: { /* uses .nodemonignore */ dev: { @@ -212,7 +213,7 @@ module.exports = function(grunt) { } } }, - + concurrent: { dev: { tasks: ['nodemon', 'watch'], @@ -221,7 +222,7 @@ module.exports = function(grunt) { } } }, - + copy: { build: { files:[{ @@ -275,7 +276,7 @@ module.exports = function(grunt) { }] } }, - + compress: { release: { options: { @@ -287,7 +288,7 @@ module.exports = function(grunt) { } } }); - + grunt.loadNpmTasks('grunt-simple-mocha'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-concat'); @@ -317,7 +318,7 @@ module.exports = function(grunt) { " * See the License for the specific language governing permissions and\n"+ " * limitations under the License.\n"+ " **/\n"; - + if (files) { for (var i=0;i