mediawiki-extensions-Syntax.../Gruntfile.js
Umherirrender ecbc374f7d build: Run stylelint also for less files
no-descending-specificity:
Expected selector ".mw-highlight.mw-content-ltr .linenos" to come before
selector ".mw-highlight a:hover .linenos"

Change-Id: Ib8bd3dcc83058c6935b6b6c472554e3c1fa01eda
2021-01-10 13:40:20 +01:00

48 lines
906 B
JavaScript

/*!
* Grunt file
*
* @package SyntaxHighlight_GeSHi
*/
/* eslint-env node, es6 */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
options: {
cache: true,
fix: grunt.option( 'fix' )
},
all: [
'**/*.{js,json}',
'!{vendor,node_modules}/**'
]
},
stylelint: {
all: [
'**/*.{css,less}',
'!**/*.generated.css',
'!vendor/**',
'!node_modules/**'
]
},
banana: conf.MessagesDirs,
watch: {
files: [
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};