Skip to content

Commit c097207

Browse files
committed
update build setup for eslint
1 parent 9291815 commit c097207

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

gruntfile.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,15 @@ module.exports = function (grunt) {
66

77
version: grunt.file.readJSON('package.json').version,
88

9-
jshint: {
10-
options: {
11-
reporter: require('jshint-stylish'),
12-
jshintrc: true
13-
},
14-
build: {
15-
src: ['gruntfile.js', 'tasks/*.js']
16-
},
9+
eslint: {
1710
src: {
18-
src: 'src/**/*.js'
11+
src: ['src/**/*.js']
1912
},
2013
test: {
2114
src: ['test/unit/specs/**/*.js', 'test/e2e/*.js']
15+
},
16+
build: {
17+
src: ['gruntfile.js', 'build/**/*.js']
2218
}
2319
},
2420

@@ -73,7 +69,7 @@ module.exports = function (grunt) {
7369
})
7470

7571
// load npm tasks
76-
grunt.loadNpmTasks('grunt-contrib-jshint')
72+
grunt.loadNpmTasks('grunt-eslint')
7773
grunt.loadNpmTasks('grunt-karma')
7874

7975
// load custom tasks
@@ -88,7 +84,7 @@ module.exports = function (grunt) {
8884
grunt.registerTask('cover', ['karma:coverage'])
8985
grunt.registerTask('test', ['unit', 'cover', 'casper'])
9086
grunt.registerTask('sauce', ['karma:sauce1', 'karma:sauce2', 'karma:sauce3'])
91-
grunt.registerTask('ci', ['jshint', 'cover', 'codecov', 'build', 'casper', 'sauce'])
92-
grunt.registerTask('default', ['jshint', 'build', 'test'])
87+
grunt.registerTask('ci', ['eslint', 'cover', 'codecov', 'build', 'casper', 'sauce'])
88+
grunt.registerTask('default', ['eslint', 'build', 'test'])
9389

9490
}

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@
2424
"casperjs": "^1.1.0-beta3",
2525
"codecov.io": "^0.1.2",
2626
"grunt": "^0.4.5",
27-
"grunt-contrib-jshint": "^0.10.0",
27+
"grunt-eslint": "^16.0.0",
2828
"grunt-karma": "^0.8.3",
2929
"jasmine-core": "^2.3.4",
30-
"jshint-stylish": "^0.3.0",
3130
"karma": "^0.12.31",
3231
"karma-chrome-launcher": "^0.1.7",
3332
"karma-commonjs": "^0.0.10",

0 commit comments

Comments
 (0)