build: Update eslint config

Change-Id: If0871326eb35f8cb6ef026784cd04fca5754ab59
This commit is contained in:
Ed Sanders 2022-01-07 15:18:13 +00:00 committed by Krinkle
parent f25bb7c735
commit 1daf4bcf2d
7 changed files with 3040 additions and 27 deletions

View file

@ -1,13 +1,6 @@
{
"root": true,
"extends": [
"wikimedia/client-es5",
"wikimedia/jquery",
"wikimedia/mediawiki"
],
"rules": {
"max-len": "off",
"no-jquery/no-global-selector": "off",
"no-shadow": "warn"
}
"wikimedia/server"
]
}

View file

@ -4,9 +4,10 @@
* @package Thanks
*/
/* eslint-env node, es6 */
'use strict';
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
const conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
@ -20,7 +21,7 @@ module.exports = function ( grunt ) {
},
all: [
'**/*.{js,json}',
'!{vendor,node_modules}/**'
'!{vendor,node_modules,docs}/**'
]
},
banana: conf.MessagesDirs,

View file

@ -176,7 +176,7 @@ class ApiFlowThank extends ApiThank {
'agent' => $user,
] );
// And mark the thank in session for a cheaper check to prevent duplicates (Bug 46690).
// And mark the thank in session for a cheaper check to prevent duplicates (T48690).
$user->getRequest()->setSessionData( "flow-thanked-{$postId->getAlphadecimal()}", true );
// Set success message.
$this->markResultSuccess( $recipient->getName() );

13
modules/.eslintrc.json Normal file
View file

@ -0,0 +1,13 @@
{
"root": true,
"extends": [
"wikimedia/client-es5",
"wikimedia/jquery",
"wikimedia/mediawiki",
"wikimedia/jsduck"
],
"rules": {
"max-len": "off",
"no-jquery/no-global-selector": "off"
}
}

View file

@ -48,8 +48,8 @@
$elements = $(),
self = this;
selectors.forEach( function ( selector ) {
$elements = $elements.add( jQueryFindWithParent( self, selector ) );
selectors.forEach( function ( sel ) {
$elements = $elements.add( jQueryFindWithParent( self, sel ) );
} );
return $elements;

3026
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"extends": [
"wikimedia/qunit",
"../../.eslintrc.json"
"../../modules/.eslintrc.json",
"wikimedia/qunit"
]
}