mediawiki-skins-MinervaNeue/Gruntfile.js
libraryupgrader b8cfba1bab build: Updating markdown-to-jsx to 6.11.4
* https://npmjs.com/advisories/1219

Additional changes:
* Also sorted "composer fix" command to run phpcbf last.
* Removing manual reportUnusedDisableDirectives for eslint.

Change-Id: I2ee33d128567067e48c1dbe5f78c254a4cba82e4
2020-06-12 11:31:40 +00:00

64 lines
1.4 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-notify' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
options: {
cache: true,
extensions: [ '.js', '.json' ],
maxWarnings: 0
},
all: [
'**/*.{js,json}',
'!docs/**',
'!libs/**',
'!node_modules/**',
'!vendor/**'
]
},
stylelint: {
all: [
'**/*.{css,less}',
// TODO: Nested imports cause stylelint to crash
'!resources/skins.minerva.base.styles/print/styles.less',
'!docs/**',
'!libs/**',
'!node_modules/**',
'!vendor/**'
]
},
// eslint-disable-next-line es/no-object-assign
banana: Object.assign( {
options: { requireLowerCase: false }
}, conf.MessagesDirs ),
watch: {
lint: {
files: [ '{resources,tests/qunit}/**/*.{js,less}' ],
tasks: [ 'lint' ]
},
scripts: {
files: [ '{resources,tests/qunit}/**/*.js' ],
tasks: [ 'test' ]
},
configFiles: {
files: [ 'Gruntfile.js' ],
options: {
reload: true
}
}
}
} );
grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'test', [ 'lint' ] );
grunt.registerTask( 'default', [ 'test' ] );
};