Change JSLint for JSHint

This commit is contained in:
Vincent Fournier 2015-05-04 09:46:19 -04:00
parent 92df0d1715
commit 5f4f119e6c
2 changed files with 19 additions and 39 deletions

View File

@ -76,41 +76,21 @@ module.exports = function (grunt) {
}
},
jslint: { // configure the task
client: {
src: [
'karma.conf.js',
'Gruntfile.js',
'<%= project.app %>/app.js',
'<%= project.app %>/**/*.js'
],
exclude: [
'<%= project.app %>/bower_components/**/*.js',
'<%= project.assets %>/**',
'<%= project.build %>/**'
],
directives: {
node: true,
nomen: true,
unparam: true,
predef: [ // Global variables
'document', '$', '$get',
'angular', 'inject', 'JustGage',
'describe', 'beforeEach', 'it', 'expect',
'moment'
]
},
options: {
edition: 'latest', // specify an edition of jslint or use 'dir/mycustom-jslint.js' for own path
junit: 'out/client-junit.xml', // write the output to a JUnit XML
log: 'out/client-lint.log',
jslintXml: 'out/client-jslint.xml',
errorsOnly: true, // only display errors
failOnError: false, // defaults to true
checkstyle: 'out/client-checkstyle.xml' // write a checkstyle-XML
}
}
jshint: { // configure the task
options: {
globals: {
angular: true,
jQuery: true
},
force: true
},
all: [
'karma.conf.js',
'Gruntfile.js',
'<%= project.app %>/app.js',
'<%= project.app %>/**/*.js',
'!<%= project.app %>/bower_components/**'
]
},
useminPrepare: {
@ -170,11 +150,11 @@ module.exports = function (grunt) {
grunt.registerTask('default', ['watch']);
grunt.registerTask('development:adagios', [
'sass', 'copy:adagios', 'watch:adagios'
'sass', 'copy:adagios', 'jshint:all', 'watch:adagios'
]);
grunt.registerTask('development:surveil', [
'sass', 'copy:surveil', 'watch:surveil'
'sass', 'copy:surveil', 'jshint:all', 'watch:surveil'
]);
grunt.registerTask('production:adagios', [

View File

@ -11,7 +11,6 @@
"grunt-cli": "^0.1.13",
"grunt-contrib-sass": "^0.8.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-jslint": "^1.1.12",
"http-server": "^0.6.1",
"karma": "~0.10",
"karma-junit-reporter": "^0.2.2",
@ -22,7 +21,8 @@
"grunt-contrib-concat": "~0.5.1",
"grunt-contrib-clean": "~0.6.0",
"grunt-contrib-copy": "~0.8.0",
"load-grunt-tasks": "~3.1.0"
"load-grunt-tasks": "~3.1.0",
"grunt-contrib-jshint": "~0.11.2"
},
"scripts": {
"postinstall": "bower install",