mediawiki-extensions-wikihiero/Gruntfile.js
Ed Sanders af305dee54 build: Update eslint-config-wikimedia to 0.17.0
Change-Id: I989ee3b0bef7c51cf99794c15cc70c6c51f176fb
2020-08-27 22:51:42 +01:00

37 行
855 B
JavaScript

/* eslint-env node, es6 */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
options: {
cache: true,
fix: grunt.option( 'fix' )
},
all: '.'
},
stylelint: {
all: 'modules/**/*.css'
},
watch: {
files: [
'.eslintrc.json',
'.stylelintrc.json',
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'lint'
},
banana: Object.assign( { options: { requireLowerCase: false } }, conf.MessagesDirs )
} );
grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'test', 'lint' );
grunt.registerTask( 'default', 'test' );
};