mediawiki-extensions-Thanks/Gruntfile.js
Ed Sanders 1daf4bcf2d build: Update eslint config
Change-Id: If0871326eb35f8cb6ef026784cd04fca5754ab59
2022-01-25 22:01:31 +00:00

40 lines
699 B
JavaScript

/*!
* Grunt file
*
* @package Thanks
*/
'use strict';
module.exports = function ( grunt ) {
const conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.initConfig( {
eslint: {
options: {
cache: true,
fix: grunt.option( 'fix' )
},
all: [
'**/*.{js,json}',
'!{vendor,node_modules,docs}/**'
]
},
banana: conf.MessagesDirs,
watch: {
files: [
'.eslintrc.json',
'<%= eslint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'eslint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};