mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-23 22:03:41 +00:00
e0d100ca60
Removed old csslint package and added grunt-stylelint and stylelint config for Wikimedia. Fixed the violations caused by this change. Bug: T206506 Change-Id: Ieb1f087de859f5321c4f1fe65c0e3bf7b655ca15
44 lines
849 B
JavaScript
44 lines
849 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: {
|
|
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' );
|
|
};
|