mediawiki-extensions-Cookie.../Gruntfile.js
Umherirrender 377298b26f build: Use existing eslint also for json linting
Bug: T220036
Change-Id: I4adc34e96d61cd18013bfc9eeee1a836f0509782
2020-09-12 13:42:25 +02:00

39 lines
747 B
JavaScript

/*!
* Grunt file
*
* @package CookieWarning
*/
/* eslint-env node */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
banana: conf.MessagesDirs,
eslint: {
options: {
cache: true
},
all: [
'**/*.{js,json}',
'!node_modules/**',
'!vendor/**'
]
},
stylelint: {
options: {
syntax: 'less'
},
src: [ 'resources/**/*.{css,less}' ]
}
} );
grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'test', [ 'lint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};