mediawiki-extensions-Templa.../Gruntfile.js
James D. Forrester 68c4348935 build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint
Change-Id: I4510c552189ae7b0f458cb82f389dff7f14a0a96
2019-05-07 10:50:20 -07:00

48 lines
927 B
JavaScript

/*!
* Grunt file
*
* @package TemplateData
*/
/* eslint-env node */
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: {
reportUnusedDisableDirectives: true,
extensions: [ '.js', '.json' ],
cache: true
},
all: [
'**/*.js{,on}',
'!{lib,vendor,node_modules}/**'
]
},
stylelint: {
all: [
'modules/*.css',
'resources/*.css'
]
},
banana: conf.MessagesDirs,
watch: {
files: [
'.{stylelintrc,eslintrc}.json',
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};