mediawiki-extensions-Echo/Gruntfile.js
Ed Sanders 46a3b6d5de eslint: Use .eslintignore
Change-Id: I4db921d6d22f367a4c5647080e791ca5c9e6b3ce
2022-05-09 14:00:02 +01:00

44 lines
894 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use strict';
module.exports = function ( grunt ) {
const 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: {
cache: true,
fix: grunt.option( 'fix' )
},
all: [
'.'
]
},
// Lint Styling
stylelint: {
all: [
'modules/**/*.{css,less}'
]
},
banana: Object.assign( {
options: { requireLowerCase: false }
}, conf.MessagesDirs ),
watch: {
files: [
'.{stylelintrc,eslintrc}.json',
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'test', 'lint' );
grunt.registerTask( 'default', [ 'test' ] );
};