mediawiki-extensions-Relate.../Gruntfile.js
James D. Forrester 2066d438ae build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0
Change-Id: Ie1f3e5f9ead8f69da554fb9a3260fa44b1c91f4e
2019-04-03 16:21:00 -07:00

43 lines
865 B
JavaScript

/* eslint-env node, es6 */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
options: {
reportUnusedDisableDirectives: true,
cache: true
},
all: [
'**/*.js',
'!node_modules/**',
'!resources/ext.relatedArticles.lib/**',
'!vendor/**'
]
},
banana: conf.MessagesDirs,
jsonlint: {
all: [
'**/*.json',
'!node_modules/**',
'!vendor/**'
]
},
stylelint: {
all: [
'**/*.less',
'!node_modules/**',
'!vendor/**'
]
}
} );
grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana', 'stylelint' ] );
grunt.registerTask( 'default', 'test' );
};