mediawiki-extensions-Cookie.../Gruntfile.js
takidelfin e0d100ca60 Replaced CSSLint with StyleLint
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
2018-11-25 23:53:51 +00:00

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' );
};