mediawiki-extensions-SpamBl.../Gruntfile.js
Antoine Musso 193339c7f0 build: add grunt-contrib-jshint
See T119973

Change-Id: If8ab371645148b932cf95af043ef0ea5b90db9cb
2017-04-21 18:24:05 +02:00

34 lines
631 B
JavaScript

/*!
* Grunt file
*
* @package SpamBlacklist
*/
/*jshint node:true */
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',
'!node_modules/**'
]
}
} );
grunt.registerTask( 'test', [ 'jsonlint', 'banana', 'jshint' ] );
grunt.registerTask( 'default', 'test' );
};