mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-12-13 15:18:21 +00:00
efb62c28a2
* eslint-config-wikimedia: 0.5.0 → 0.15.0 * grunt-eslint: 20.1.0 → 22.0.0 Additional changes: * Added .eslintcache to .gitignore. * Removing manual reportUnusedDisableDirectives for eslint. Change-Id: If786c6664f05a9b8d9db26e120ced522fd248422
39 lines
736 B
JavaScript
39 lines
736 B
JavaScript
/* 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-jsonlint' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
eslint: {
|
|
options: {
|
|
cache: true
|
|
},
|
|
all: '.'
|
|
},
|
|
stylelint: {
|
|
options: {
|
|
syntax: 'less'
|
|
},
|
|
all: [
|
|
'**/*.{css,less}',
|
|
'!vendor/**'
|
|
]
|
|
},
|
|
banana: conf.MessagesDirs,
|
|
jsonlint: {
|
|
all: [
|
|
'**/*.json',
|
|
'!node_modules/**',
|
|
'!vendor/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|