Create lint task

Additionally relaxes linting on defined but unused vars as they are necessary in parts of the boilerplate
This commit is contained in:
Matt Styles
2013-04-29 21:13:21 +01:00
parent 13a3c02a3d
commit 3d60a8fbd5
3 changed files with 17 additions and 3 deletions

View File

@@ -1 +1 @@
{"bitwise":true,"camelcase":true,"curly":true,"eqeqeq":true,"forin":true,"immed":true,"latedef":true,"newcap":true,"noarg":true,"noempty":true,"nonew":true,"plusplus":true,"quotmark":"single","regexp":true,"undef":true,"unused":true,"strict":true,"trailing":true,"asi":false,"boss":false,"debug":false,"eqnull":false,"es5":true,"esnext":true,"evil":false,"expr":false,"funcscope":false,"globalstrict":false,"iterator":false,"lastsemic":false,"laxbreak":false,"laxcomma":false,"loopfunc":false,"multistr":false,"onecase":false,"proto":false,"regexdash":false,"scripturl":false,"smarttabs":true,"shadow":false,"sub":false,"supernew":false,"validthis":false,"browser":true,"couch":false,"devel":false,"dojo":false,"jquery":false,"mootools":false,"node":true,"nonstandard":false,"prototypejs":false,"rhino":false,"wsh":false,"nomen":false,"onevar":false,"passfail":false,"white":false,"maxerr":100,"predef":[],"globals":{"angular":false},"indent":4}
{"bitwise":true,"camelcase":true,"curly":true,"eqeqeq":true,"forin":true,"immed":true,"latedef":true,"newcap":true,"noarg":true,"noempty":true,"nonew":true,"plusplus":true,"quotmark":"single","regexp":true,"undef":true,"unused":false,"strict":true,"trailing":true,"asi":false,"boss":false,"debug":false,"eqnull":false,"es5":true,"esnext":true,"evil":false,"expr":false,"funcscope":false,"globalstrict":false,"iterator":false,"lastsemic":false,"laxbreak":false,"laxcomma":false,"loopfunc":false,"multistr":false,"onecase":false,"proto":false,"regexdash":false,"scripturl":false,"smarttabs":true,"shadow":false,"sub":false,"supernew":false,"validthis":false,"browser":true,"couch":false,"devel":false,"dojo":false,"jquery":false,"mootools":false,"node":true,"nonstandard":false,"prototypejs":false,"rhino":false,"wsh":false,"nomen":false,"onevar":false,"passfail":false,"white":false,"maxerr":100,"predef":[],"globals":{"angular":false},"indent":4}

View File

@@ -41,7 +41,7 @@
"quotmark" : "single", // Enforce the use of single quotation marks
"regexp" : true, // Prohibit `.` and `[^...]` in regular expressions.
"undef" : true, // Require all non-global variables be declared before they are used.
"unused" : true, // Prohibits the use of defined but unused variables
"unused" : false, // Prohibits the use of defined but unused variables
"strict" : true, // Require `use strict` pragma in every file.
"trailing" : true, // Prohibit trailing whitespaces.

View File

@@ -156,6 +156,7 @@ module.exports = function (grunt) {
},
all: [
'Gruntfile.js',
'grunt/*',
'<%= yeoman.app %>/scripts/{,*/}*.js'
]
},
@@ -427,7 +428,20 @@ module.exports = function (grunt) {
]
);
/*
/**
* Lint
*
* Compiles jshint config file and lints code
*/
utils.registerTask(
'lint',
'Compiles jshint config file and lints code',
[ 'jsonmin',
'jshint'
]
);
/**
* Default Grunt Task
*
* Just runs build for now