build: add grunt-contrib-jshint

See T119973

Change-Id: If8ab371645148b932cf95af043ef0ea5b90db9cb
This commit is contained in:
Antoine Musso 2017-04-21 17:59:57 +02:00
parent 8aea59a8c3
commit 193339c7f0
2 changed files with 11 additions and 2 deletions

View file

@ -8,10 +8,18 @@
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
var conf = grunt.file.readJSON( 'extension.json' );
grunt.initConfig( {
banana: conf.MessagesDirs,
jshint: {
all: [
'**/*.js',
'!node_modules/**',
'!vendor/**'
]
},
jsonlint: {
all: [
'**/*.json',
@ -20,6 +28,6 @@ module.exports = function ( grunt ) {
}
} );
grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
grunt.registerTask( 'test', [ 'jsonlint', 'banana', 'jshint' ] );
grunt.registerTask( 'default', 'test' );
};

View file

@ -8,8 +8,9 @@
},
"devDependencies": {
"grunt": "0.4.5",
"grunt-cli": "0.1.13",
"grunt-banana-checker": "0.4.0",
"grunt-cli": "0.1.13",
"grunt-contrib-jshint": "1.1.0",
"grunt-jsonlint": "1.0.7"
}
}