mediawiki-extensions-Math/Gruntfile.js
Ed Sanders cf33c80b98 eslint: Use in all folders (including tests/selenium)
Change-Id: I0ab0a9f99817077934e7569d19d76735c33678e9
2018-11-12 17:08:22 +00:00

47 lines
931 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-jsonlint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
banana: conf.MessagesDirs,
jsonlint: {
all: [
'**/*.json',
'!node_modules/**',
'!vendor/**'
]
},
stylelint: {
all: [
'**/*.css',
'!node_modules/**',
'!vendor/**'
]
},
watch: {
files: [
'.{stylelintrc,.eslintrc}.json',
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
},
eslint: {
all: [
'**/*.js',
'!**/node_modules/**',
'!vendor/**'
]
}
} );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};