update build setup for eslint

This commit is contained in:
Evan You 2015-07-02 21:12:19 +08:00
parent 9291815f85
commit c097207b7b
2 changed files with 9 additions and 14 deletions

View File

@ -6,19 +6,15 @@ module.exports = function (grunt) {
version: grunt.file.readJSON('package.json').version,
jshint: {
options: {
reporter: require('jshint-stylish'),
jshintrc: true
},
build: {
src: ['gruntfile.js', 'tasks/*.js']
},
eslint: {
src: {
src: 'src/**/*.js'
src: ['src/**/*.js']
},
test: {
src: ['test/unit/specs/**/*.js', 'test/e2e/*.js']
},
build: {
src: ['gruntfile.js', 'build/**/*.js']
}
},
@ -73,7 +69,7 @@ module.exports = function (grunt) {
})
// load npm tasks
grunt.loadNpmTasks('grunt-contrib-jshint')
grunt.loadNpmTasks('grunt-eslint')
grunt.loadNpmTasks('grunt-karma')
// load custom tasks
@ -88,7 +84,7 @@ module.exports = function (grunt) {
grunt.registerTask('cover', ['karma:coverage'])
grunt.registerTask('test', ['unit', 'cover', 'casper'])
grunt.registerTask('sauce', ['karma:sauce1', 'karma:sauce2', 'karma:sauce3'])
grunt.registerTask('ci', ['jshint', 'cover', 'codecov', 'build', 'casper', 'sauce'])
grunt.registerTask('default', ['jshint', 'build', 'test'])
grunt.registerTask('ci', ['eslint', 'cover', 'codecov', 'build', 'casper', 'sauce'])
grunt.registerTask('default', ['eslint', 'build', 'test'])
}

View File

@ -24,10 +24,9 @@
"casperjs": "^1.1.0-beta3",
"codecov.io": "^0.1.2",
"grunt": "^0.4.5",
"grunt-contrib-jshint": "^0.10.0",
"grunt-eslint": "^16.0.0",
"grunt-karma": "^0.8.3",
"jasmine-core": "^2.3.4",
"jshint-stylish": "^0.3.0",
"karma": "^0.12.31",
"karma-chrome-launcher": "^0.1.7",
"karma-commonjs": "^0.0.10",