mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-11 17:00:49 +00:00
a8c5016096
* eslint-config-wikimedia: 0.27.0 → 0.28.0 The following rules are failing and were disabled: * ReCaptchaNoCaptcha/resources/ve-confirmedit-reCaptchaNoCaptcha: * no-jquery/no-extend * Turnstile/resources/ve-confirmedit-turnstile: * no-jquery/no-extend * hCaptcha/resources/ve-confirmedit-hCaptcha: * no-jquery/no-extend * grunt-stylelint: 0.19.0 → 0.20.0 * stylelint-config-wikimedia: 0.16.1 → 0.17.1 Change-Id: I8045a843b3e9b6a67e07d580ce07dc6afeaeab2d
44 lines
1,021 B
JavaScript
44 lines
1,021 B
JavaScript
/* eslint-env node */
|
|
module.exports = function ( grunt ) {
|
|
const messagesDirs = require( './extension.json' ).MessagesDirs;
|
|
for ( const subExtension of [
|
|
'QuestyCaptcha',
|
|
'ReCaptchaNoCaptcha',
|
|
'FancyCaptcha',
|
|
'hCaptcha'
|
|
] ) {
|
|
// eslint-disable-next-line security/detect-non-literal-require
|
|
messagesDirs[ subExtension ] = require( './' + subExtension + '/extension.json' )
|
|
.MessagesDirs[ subExtension ]
|
|
.map( ( path ) => subExtension + '/' + path );
|
|
}
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
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}',
|
|
'!node_modules/**',
|
|
'!vendor/**'
|
|
]
|
|
},
|
|
banana: messagesDirs
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|