mediawiki-extensions-Templa.../Gruntfile.js
Ed Sanders 2db15c75a1 build: Update linters
Change-Id: Ie5cd0d355017eb802d0b302a69248886409fcbf9
2019-12-18 11:43:42 +00:00

52 lines
968 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: {
extensions: [ '.js', '.json' ],
cache: true
},
all: [
'**/*.{js,json}',
'!{lib,vendor,node_modules,docs}/**'
]
},
stylelint: {
all: [
'modules/*.css',
'resources/*.css'
]
},
banana: {
options: {
requireLowerCase: false
},
all: conf.MessagesDirs.TemplateData
},
watch: {
files: [
'.{stylelintrc,eslintrc}.json',
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};