forked from shutterstock/armrest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
57 lines (48 loc) · 1.06 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['Gruntfile.js', 'package.json', 'lib/*', 'tests/*.js', 'tests/*/*.js'],
options: {
// Enforcing
bitwise: true,
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noempty: true,
noarg: true,
nonew: true,
plusplus: true,
undef: true,
unused: true,
trailing: true,
// Relaxing
expr: true,
maxparams: 4,
maxdepth: 4,
maxstatements: 45, // Made this up
maxcomplexity: 10, // Pulled from Steve McConnell
maxlen: 160, // Two times 80 characters
// Node
globals: {
'exports': true,
'require': true,
'process': true,
'module': true,
'setTimeout': true
}
}
},
nodeunit: {
all: ['tests/*.js']
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
/*
* Lint and test files as part of the default task
*/
grunt.registerTask('default', ['jshint', 'nodeunit']);
};