mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-15 03:34:10 +00:00
5ecbf750c1
It should exclude vendor in the root, so there should no `**/` be at the begin. Change-Id: Ice2c4d16de258dac5506322d6f4551587b8e3022
42 lines
885 B
JavaScript
42 lines
885 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-eslint' );
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
banana: conf.MessagesDirs,
|
|
stylelint: {
|
|
all: [
|
|
'**/*.css',
|
|
'!{vendor,node_modules}/**'
|
|
]
|
|
},
|
|
watch: {
|
|
files: [
|
|
'.{stylelintrc,.eslintrc}.json',
|
|
'<%= eslint.all %>',
|
|
'<%= stylelint.all %>'
|
|
],
|
|
tasks: 'test'
|
|
},
|
|
eslint: {
|
|
options: {
|
|
reportUnusedDisableDirectives: true,
|
|
extensions: [ '.js', '.json' ],
|
|
cache: true
|
|
},
|
|
all: [
|
|
'**/*.{js,json}',
|
|
'!{vendor,node_modules}/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|