mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-30 17:04:28 +00:00
211a54b568
stylelint is part of config, but not run by default Also update to 0.4.1, it is the current default in many wmf extensions Change-Id: I55f81489182628c088e362e081417514e252e6d6
63 lines
1.2 KiB
JavaScript
63 lines
1.2 KiB
JavaScript
/* eslint-env node */
|
|
module.exports = function ( grunt ) {
|
|
var conf = grunt.file.readJSON( 'skin.json' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
grunt.loadNpmTasks( 'grunt-notify' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
eslint: {
|
|
all: [
|
|
'**/*.js',
|
|
'!libs/**',
|
|
'!vendor/**',
|
|
'!docs/**',
|
|
'!node_modules/**'
|
|
]
|
|
},
|
|
stylelint: {
|
|
options: {
|
|
syntax: 'less'
|
|
},
|
|
all: [
|
|
'minerva.less/**/*.less',
|
|
'resources/**/*.less'
|
|
]
|
|
},
|
|
watch: {
|
|
lint: {
|
|
files: [ 'resources/**/*.js', 'tests/qunit/**/*.js' ],
|
|
tasks: [ 'lint' ]
|
|
},
|
|
scripts: {
|
|
files: [ 'resources/**/*.js', 'tests/qunit/**/*.js' ],
|
|
tasks: [ 'test' ]
|
|
},
|
|
configFiles: {
|
|
files: [ 'Gruntfile.js' ],
|
|
options: {
|
|
reload: true
|
|
}
|
|
}
|
|
},
|
|
banana: conf.MessagesDirs,
|
|
jsonlint: {
|
|
all: [
|
|
'*.json',
|
|
'**/*.json',
|
|
'.stylelintrc',
|
|
'!node_modules/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'lint', [ 'eslint', 'jsonlint', 'banana', 'stylelint' ] );
|
|
grunt.registerTask( 'test', [ 'lint' ] );
|
|
|
|
grunt.registerTask( 'default', [ 'test' ] );
|
|
};
|