mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-23 22:03:41 +00:00
c8fc6e7268
* set-value: 2.0.0 → 2.0.1 * https://npmjs.com/advisories/1012 * CVE-2019-10747 * union-value: 1.0.0 → 1.0.1 * https://npmjs.com/advisories/1012 * CVE-2019-10747 * mixin-deep: 1.3.1 → 1.3.2 * https://npmjs.com/advisories/1013 * CVE-2019-10746 * lodash: 4.17.11 → 4.17.15 * https://npmjs.com/advisories/1065 * CVE-2019-10744 Additional changes: * Enable eslint caching. * Enable eslint's reportUnusedDisableDirectives. Change-Id: I482262ac0eee54fefab8d5f9523a711d9c5e154d
48 lines
926 B
JavaScript
48 lines
926 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: {
|
|
options: {
|
|
cache: true,
|
|
reportUnusedDisableDirectives: true
|
|
},
|
|
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' );
|
|
};
|