build: add grunt-contrib-jshint

See T119973

Change-Id: I468f8c680ba789a222b527ac93f69bef600f9eb3
This commit is contained in:
Antoine Musso 2017-04-21 17:59:56 +02:00
parent d6cc55dca6
commit 0aef89d5d4
2 changed files with 10 additions and 1 deletions

View file

@ -7,6 +7,7 @@
/*jshint node:true */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-stylelint' );
@ -14,6 +15,13 @@ module.exports = function ( grunt ) {
banana: {
all: ['i18n/']
},
jshint: {
all: [
'**/*.js',
'!node_modules/**',
'!vendor/**'
]
},
jsonlint: {
all: [
'**/*.json',
@ -29,6 +37,6 @@ module.exports = function ( grunt ) {
}
} );
grunt.registerTask( 'test', [ 'jsonlint', 'banana', 'stylelint' ] );
grunt.registerTask( 'test', [ 'jsonlint', 'banana', 'jshint', 'stylelint' ] );
grunt.registerTask( 'default', 'test' );
};

View file

@ -6,6 +6,7 @@
"devDependencies": {
"grunt": "1.0.1",
"grunt-banana-checker": "0.4.0",
"grunt-contrib-jshint": "1.1.0",
"grunt-jsonlint": "1.0.7",
"grunt-stylelint": "0.6.0",
"stylelint-config-wikimedia": "0.4.1"