build: add grunt-contrib-jshint

See T119973

Change-Id: I6103daa04d2e51de8e29135578be457252771c94
This commit is contained in:
Antoine Musso 2017-04-21 17:59:56 +02:00
parent c75e19ffd1
commit 68f89b28b5
2 changed files with 11 additions and 2 deletions

View file

@ -2,11 +2,19 @@
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.initConfig( {
banana: {
all: 'i18n/'
},
jshint: {
all: [
'**/*.js',
'!node_modules/**',
'!vendor/**'
]
},
jsonlint: {
all: [
'**/*.json',
@ -15,6 +23,6 @@ module.exports = function ( grunt ) {
}
} );
grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
grunt.registerTask( 'test', [ 'jsonlint', 'banana', 'jshint' ] );
grunt.registerTask( 'default', 'test' );
};

View file

@ -5,8 +5,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"
}
}