-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
64 lines (53 loc) · 2.27 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
'use strict';
// see http://jshint.com/docs/options/
var options = {
"globals" : {"require": false, "module": false},
// "camelcase" : false,
"bitwise" : false, // allow bitwise operators (&, |, ^, etc.).
"curly" : true, // Require {} for every new block or scope.
"eqeqeq" : true, // Require triple equals i.e. `===`.
// "es3" : false,
"forin" : true, // Tolerate `for in` loops without `hasOwnPrototype`.
// "freeze": false,
"immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"indent" : 4,
"latedef" : true, // Prohibit variable use before definition.
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"noempty" : true, // Prohibit use of empty blocks.
"nonbsp" : true,
"nonew" : true, // Prohibit use of constructors for side-effects.
// "plusplus" : true, // Prohibit use of `++` & `--`.
// "quotmark": false,
"regexp" : true, // Prohibit `.` and `[^...]` in regular expressions.
"undef" : true, // Require all non-global variables be declared before they are used.
"unused" : true,
"strict" : true, // Require `use strict` pragma in every file.
"trailing" : true, // Prohibit trailing whitespaces.
// "maxparams": 1,
// "maxdepth": 1,
// "maxstatements": 1,
// "maxcomplexity": 1,
// "maxlen": 1,
"maxerr" : 10000 // Annoying when jshint stops partway through a file ... is 10K high enough?
};
module.exports = function(grunt) {
grunt.initConfig({
"jshint": {
"gruntfile": {
"options": options,
"src": 'Gruntfile.js'
},
"lib": {
"options": options,
"src": ['lib/*.js']
}/*,
"test": {
"options": options,
"src": ['test/*.js']
}*/
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('default', ['jshint']);
};