update gruntfile to cover all files

This commit is contained in:
dceejay 2015-03-26 18:54:10 +00:00
parent 79a149dc17
commit 8eca22bdc3
2 changed files with 16 additions and 13 deletions

View File

@ -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;
}
}
},

View File

@ -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",