build: Update eslint-config-wikimedia to 0.28.2 and autofix

Change-Id: I1e603647c161bf940690f85f676edd7ebde7917d
This commit is contained in:
Ed Sanders 2024-06-13 15:34:07 +01:00 committed by Esanders
parent 83024319a4
commit 47ea647e45
18 changed files with 37 additions and 41 deletions

View file

@ -9,10 +9,6 @@
"commonjs": true
},
"rules": {
"max-len": "off",
"prefer-arrow-callback": "error",
"implicit-arrow-linebreak": "error",
"arrow-body-style": "error",
"no-jquery/no-extend": "warn"
"max-len": "off"
}
}

View file

@ -122,7 +122,7 @@
* fetched from the API.
*/
mw.echo.api.APIHandler.prototype.createNewFetchNotificationPromise = function ( type, sources, overrideParams ) {
const params = $.extend( {
const params = Object.assign( {
action: 'query',
formatversion: 2,
meta: 'notifications',

View file

@ -36,9 +36,9 @@
};
if ( this.unreadOnly ) {
params = $.extend( {}, params, { notfilter: '!read' } );
params = Object.assign( {}, params, { notfilter: '!read' } );
}
return $.extend( {}, this.typeParams[ type ], params );
return Object.assign( {}, this.typeParams[ type ], params );
};
}() );

View file

@ -133,7 +133,7 @@
* @inheritdoc
*/
mw.echo.api.LocalAPIHandler.prototype.getTypeParams = function ( type ) {
return $.extend( {}, this.typeParams[ type ], {
return Object.assign( {}, this.typeParams[ type ], {
notcrosswikisummary: 1
} );
};

View file

@ -540,7 +540,7 @@
for ( let i = 0; i < groupItems.length; i++ ) {
const notifData = this.createNotificationData( groupItems[ i ] );
items.push(
new mw.echo.dm.NotificationItem( groupItems[ i ].id, $.extend( notifData, {
new mw.echo.dm.NotificationItem( groupItems[ i ].id, Object.assign( notifData, {
modelName: 'xwiki',
source: group,
bundled: true,

View file

@ -50,7 +50,7 @@
// Properties
this.id = id;
this.modelName = config.modelName || 'local';
this.content = $.extend( { header: '', body: '' }, config.content );
this.content = Object.assign( { header: '', body: '' }, config.content );
this.category = config.category || '';
this.type = config.type || 'message';
this.foreign = !!config.foreign;

View file

@ -20,10 +20,10 @@
mw.echo.ui.BadgeLinkWidget.super.call( this, config );
// Mixin constructors
OO.ui.mixin.LabelElement.call( this, $.extend( { $label: this.$element }, config ) );
OO.ui.mixin.ButtonElement.call( this, $.extend( { $button: this.$element }, config ) );
OO.ui.mixin.TitledElement.call( this, $.extend( { $titled: this.$element }, config ) );
OO.ui.mixin.FlaggedElement.call( this, $.extend( {}, config, { $flagged: this.$element } ) );
OO.ui.mixin.LabelElement.call( this, Object.assign( { $label: this.$element }, config ) );
OO.ui.mixin.ButtonElement.call( this, Object.assign( { $button: this.$element }, config ) );
OO.ui.mixin.TitledElement.call( this, Object.assign( { $titled: this.$element }, config ) );
OO.ui.mixin.FlaggedElement.call( this, Object.assign( {}, config, { $flagged: this.$element } ) );
this.$element
.addClass( 'mw-echo-notifications-badge' );

View file

@ -19,7 +19,7 @@
mw.echo.ui.ConfirmationPopupWidget.super.call( this, config );
this.labelWidget = new OO.ui.LabelWidget( config );
this.iconWidget = new OO.ui.IconWidget( $.extend( { icon: 'checkAll' }, config ) );
this.iconWidget = new OO.ui.IconWidget( Object.assign( { icon: 'checkAll' }, config ) );
this.interval = config.interval || 2000;
this.$element

View file

@ -22,7 +22,7 @@
.append( $primaryDate, $secondaryDate );
// Parent constructor
mw.echo.ui.DatedSubGroupListWidget.super.call( this, controller, listModel, $.extend( {
mw.echo.ui.DatedSubGroupListWidget.super.call( this, controller, listModel, Object.assign( {
// Since this widget is defined as a dated list, we sort
// its items according to timestamp without consideration
// of read state or foreignness.

View file

@ -25,7 +25,7 @@
this.isLink = config.url && !this.isDynamicAction();
// Parent constructor
mw.echo.ui.MenuItemWidget.super.call( this, $.extend( { framed: false }, config ) );
mw.echo.ui.MenuItemWidget.super.call( this, Object.assign( { framed: false }, config ) );
// Mixin constructors
OO.ui.mixin.PendingElement.call( this, config );

View file

@ -19,7 +19,7 @@
config = config || {};
// Parent constructor
mw.echo.ui.NotificationItemWidget.super.call( this, $.extend( { data: model.getId() }, config ) );
mw.echo.ui.NotificationItemWidget.super.call( this, Object.assign( { data: model.getId() }, config ) );
this.controller = controller;
this.model = model;

View file

@ -14,7 +14,7 @@
config = config || {};
// Parent constructor
mw.echo.ui.PlaceholderItemWidget.super.call( this, $.extend( { data: null }, config ) );
mw.echo.ui.PlaceholderItemWidget.super.call( this, Object.assign( { data: null }, config ) );
// Mixin constructor
OO.ui.mixin.LabelElement.call( this, config );

View file

@ -10,7 +10,7 @@
*/
mw.echo.ui.ReadStateButtonSelectWidget = function MwEchoUiReadStateButtonSelectWidget( config ) {
// Parent constructor
mw.echo.ui.ReadStateButtonSelectWidget.super.call( this, $.extend( config, {
mw.echo.ui.ReadStateButtonSelectWidget.super.call( this, Object.assign( config, {
items: [
new OO.ui.ButtonOptionWidget( {
data: 'all',

View file

@ -10,7 +10,7 @@
config = config || {};
// Parent constructor
mw.echo.ui.SpecialHelpMenuWidget.super.call( this, $.extend( {
mw.echo.ui.SpecialHelpMenuWidget.super.call( this, Object.assign( {
icon: 'settings',
label: mw.msg( 'echo-specialpage-special-help-menu-widget-aria-label' ),
indicator: 'down',

View file

@ -23,7 +23,7 @@
this.model = listModel;
// Parent constructor
mw.echo.ui.SubGroupListWidget.super.call( this, $.extend( { data: this.getSource() }, config ) );
mw.echo.ui.SubGroupListWidget.super.call( this, Object.assign( { data: this.getSource() }, config ) );
this.showTitle = !!config.showTitle;
this.showMarkAllRead = !!config.showMarkAllRead;

View file

@ -14,7 +14,7 @@
config = config || {};
// Parent constructor
mw.echo.ui.ToggleReadCircleButtonWidget.super.call( this, $.extend( {
mw.echo.ui.ToggleReadCircleButtonWidget.super.call( this, Object.assign( {
invisibleLabel: true,
// Set a dummy icon so we get focus styles
icon: '_'

32
package-lock.json generated
View file

@ -13,7 +13,7 @@
"@wdio/local-runner": "7.16.13",
"@wdio/mocha-framework": "7.16.13",
"@wdio/spec-reporter": "7.16.13",
"eslint-config-wikimedia": "0.28.0",
"eslint-config-wikimedia": "0.28.2",
"grunt": "1.6.1",
"grunt-banana-checker": "0.13.0",
"grunt-contrib-watch": "1.1.0",
@ -3103,9 +3103,9 @@
}
},
"node_modules/eslint-config-wikimedia": {
"version": "0.28.0",
"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.0.tgz",
"integrity": "sha512-qDkELhXoDvQP+kYYo5MilhvqJ4Agk78Pzu95K1l1h68xPEWagD4k/dvrgmVyKjcp5KyAnZr++7qChLiFhDdBDA==",
"version": "0.28.2",
"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz",
"integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==",
"dev": true,
"dependencies": {
"browserslist-config-wikimedia": "^0.7.0",
@ -3118,7 +3118,7 @@
"eslint-plugin-mediawiki": "^0.7.0",
"eslint-plugin-mocha": "^10.4.3",
"eslint-plugin-n": "^17.7.0",
"eslint-plugin-no-jquery": "^2.7.0",
"eslint-plugin-no-jquery": "^3.0.1",
"eslint-plugin-qunit": "^8.1.1",
"eslint-plugin-security": "^1.7.1",
"eslint-plugin-unicorn": "^53.0.0",
@ -3348,12 +3348,12 @@
}
},
"node_modules/eslint-plugin-no-jquery": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-2.7.0.tgz",
"integrity": "sha512-Aeg7dA6GTH1AcWLlBtWNzOU9efK5KpNi7b0EhBO0o0M+awyzguUUo8gF6hXGjQ9n5h8/uRtYv9zOqQkeC5CG0w==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.1.tgz",
"integrity": "sha512-GrzdjIxox/3x8hpSwpxiMuEQFipiJHTGiVsp0T1TI6GH+KVSbXa4z/56xTV1WiIe66u3iRgvCIipu9CRthecpQ==",
"dev": true,
"peerDependencies": {
"eslint": ">=2.3.0"
"eslint": ">=8.0.0"
}
},
"node_modules/eslint-plugin-qunit": {
@ -11993,9 +11993,9 @@
}
},
"eslint-config-wikimedia": {
"version": "0.28.0",
"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.0.tgz",
"integrity": "sha512-qDkELhXoDvQP+kYYo5MilhvqJ4Agk78Pzu95K1l1h68xPEWagD4k/dvrgmVyKjcp5KyAnZr++7qChLiFhDdBDA==",
"version": "0.28.2",
"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz",
"integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==",
"dev": true,
"requires": {
"browserslist-config-wikimedia": "^0.7.0",
@ -12008,7 +12008,7 @@
"eslint-plugin-mediawiki": "^0.7.0",
"eslint-plugin-mocha": "^10.4.3",
"eslint-plugin-n": "^17.7.0",
"eslint-plugin-no-jquery": "^2.7.0",
"eslint-plugin-no-jquery": "^3.0.1",
"eslint-plugin-qunit": "^8.1.1",
"eslint-plugin-security": "^1.7.1",
"eslint-plugin-unicorn": "^53.0.0",
@ -12164,9 +12164,9 @@
}
},
"eslint-plugin-no-jquery": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-2.7.0.tgz",
"integrity": "sha512-Aeg7dA6GTH1AcWLlBtWNzOU9efK5KpNi7b0EhBO0o0M+awyzguUUo8gF6hXGjQ9n5h8/uRtYv9zOqQkeC5CG0w==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.1.tgz",
"integrity": "sha512-GrzdjIxox/3x8hpSwpxiMuEQFipiJHTGiVsp0T1TI6GH+KVSbXa4z/56xTV1WiIe66u3iRgvCIipu9CRthecpQ==",
"dev": true,
"requires": {}
},

View file

@ -16,7 +16,7 @@
"@wdio/local-runner": "7.16.13",
"@wdio/mocha-framework": "7.16.13",
"@wdio/spec-reporter": "7.16.13",
"eslint-config-wikimedia": "0.28.0",
"eslint-config-wikimedia": "0.28.2",
"grunt": "1.6.1",
"grunt-banana-checker": "0.13.0",
"grunt-contrib-watch": "1.1.0",