mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-23 22:03:41 +00:00
4f092b042c
* eslint-config-wikimedia: 0.5.0 → 0.15.0 The following rules are failing and were disabled: * no-prototype-builtins * grunt-eslint: 20.1.0 → 22.0.0 * grunt-stylelint: 0.10.1 → 0.13.0 * stylelint-config-wikimedia: 0.4.3 → 0.8.0 The following rules are failing and were disabled: * rule-empty-line-before Additional changes: * Remove direct "stylelint" dependency in favor of "grunt-stylelint". * Also sorted "composer fix" command to run phpcbf last. * Removing manual reportUnusedDisableDirectives for eslint. Change-Id: I5218ef05353b85925bff7fdd4d5eeae0a71ccac2
47 lines
885 B
JavaScript
47 lines
885 B
JavaScript
/*!
|
|
* Grunt file
|
|
*
|
|
* @package CookieWarning
|
|
*/
|
|
|
|
/* eslint-env node */
|
|
module.exports = function ( grunt ) {
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
banana: conf.MessagesDirs,
|
|
jsonlint: {
|
|
all: [
|
|
'**/*.json',
|
|
'!node_modules/**',
|
|
'!vendor/**'
|
|
]
|
|
},
|
|
eslint: {
|
|
options: {
|
|
cache: true
|
|
},
|
|
all: [
|
|
'**/*.js',
|
|
'!node_modules/**',
|
|
'!vendor/**'
|
|
]
|
|
},
|
|
stylelint: {
|
|
options: {
|
|
syntax: 'less'
|
|
},
|
|
src: [ 'resources/**/*.{css,less}' ]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
|
|
grunt.registerTask( 'test', [ 'lint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|