Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.

Commit e508d51

Browse files
committed
chore(grunt): update jshint
1 parent 51f4e98 commit e508d51

File tree

2 files changed

+50
-12
lines changed

2 files changed

+50
-12
lines changed

.jshintrc

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"boss": true,
3+
"browser": true,
4+
"eqnull": true,
5+
"expr": true,
6+
"globalstrict": true,
7+
"immed": true,
8+
"laxbreak": true,
9+
"loopfunc": true,
10+
"newcap": true,
11+
"noarg": true,
12+
"noempty": true,
13+
"nonew": true,
14+
"quotmark": true,
15+
"smarttabs": true,
16+
"sub": true,
17+
"trailing": true,
18+
"undef": true,
19+
"unused": true,
20+
"globals": {
21+
"angular": false
22+
}
23+
}

gruntFile.js

+27-12
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,34 @@ module.exports = function (grunt) {
7272
unit: testConfig('test/karma.conf.js'),
7373
start: {configFile: 'test/karma.conf.js'}
7474
},
75+
7576
jshint: {
76-
files: ['<%= meta.view.repoName %>.js', 'gruntFile.js', 'test/**/*Spec.js', 'demo/**/*.js'],
77-
options: {
78-
curly: true,
79-
eqeqeq: true,
80-
immed: true,
81-
latedef: true,
82-
newcap: true,
83-
noarg: true,
84-
sub: true,
85-
boss: true,
86-
eqnull: true,
87-
globals: {}
77+
src: {
78+
files:{ src : ['src/*.js', 'demo/**/*.js'] },
79+
options: { jshintrc: '.jshintrc' }
80+
},
81+
test: {
82+
files:{ src : [ 'test/*.spec.js', 'gruntFile.js'] },
83+
options: grunt.util._.extend({}, grunt.file.readJSON('.jshintrc'), {
84+
node: true,
85+
globals: {
86+
angular: false,
87+
inject: false,
88+
jQuery: false,
89+
90+
jasmine: false,
91+
afterEach: false,
92+
beforeEach: false,
93+
ddescribe: false,
94+
describe: false,
95+
expect: false,
96+
iit: false,
97+
it: false,
98+
spyOn: false,
99+
xdescribe: false,
100+
xit: false
101+
}
102+
})
88103
}
89104
},
90105

0 commit comments

Comments
 (0)