diff --git a/Gruntfile.js b/Gruntfile.js index c726ac54..99b45055 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -31,24 +31,26 @@ module.exports = function(grunt) { jshint: { options: { // 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 + //"forin":false, // turn off check for "for (x in y...)" + "reporter": require('jshint-stylish') }, all: { - src: ['*/*.js'], + src: ['*/*.js','*/*/*.js'], filter: function(filepath) { // on some developer machines the test coverage HTML report utilities cause further failures - if(filepath.indexOf("coverage/prettify.js") === -1) { - return true; - } else { + if ((filepath.indexOf("coverage/") !== -1) || (filepath.indexOf("node_modules") !== -1)) { console.log("Filtered out " + filepath + " from the jshint checks"); return false; + } else { + return true; } } }, diff --git a/package.json b/package.json index b1478e02..d96ec9c3 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "grunt-cli": "0.1.13", "grunt-simple-mocha": "0.4.0", "grunt-contrib-jshint": "0.11.0", + "jshint-stylish": "1.0.1", "mocha": "2.1.0", "should": "4.6.5", "sinon": "1.12.2",