cowboy/grunt — Issue #65: Allow multiple sets of lint configurations
Author: jzaefferer
Created: 2012-03-09 13:17:01+00:00
State: open

It doesn't make sense to apply the same rules for client-side JS as for node-scripts, e.g. the grunt.js file. Different globals, different coding styles and so on.

From that point of view, being able to specify multiple lint sets, each with their own rules and filesets should be pretty useful.

For shared options, the jshint object could still be used, something like this:

lint: {
client: {
files: ['ui/*.js'],
options: {
eqeqeq: true
browser: true
},
globals: {
jQuery: true
}
},
node: {
files: 'grunt.js',
options: {
eqeqeq: false
},
globals: {
require: true
}
}
},
jshint: {
options: {
curly: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
eqnull: true
}
}

I could look into implementing this into the lint basic task (shouldn't affect the helper), let me know if there's interst.