build: Update eslint-config-wikimedia to 0.28.0

Change-Id: I9f69e865d47e7cf4a8273bb0fdffbb9dac28b5cb
This commit is contained in:
Ed Sanders 2024-06-06 16:28:53 +01:00
parent 5082101671
commit 77b7f347c8
9 changed files with 565 additions and 360 deletions

View file

@ -6,9 +6,6 @@
"wikimedia/mediawiki"
],
"rules": {
"max-len": "off",
"prefer-arrow-callback": "error",
"implicit-arrow-linebreak": "error",
"arrow-body-style": "error"
"max-len": "off"
}
}

View file

@ -41,7 +41,7 @@ ve.ui.MWCitationAction.static.methods = [ 'open' ];
* @return {boolean} Action was executed
*/
ve.ui.MWCitationAction.prototype.open = function ( windowData ) {
windowData = $.extend( {
windowData = Object.assign( {
inDialog: this.surface.getInDialog()
}, windowData );

896
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -12,7 +12,7 @@
"devDependencies": {
"@cypress/skip-test": "^2.6.1",
"cypress": "^13.8.1",
"eslint-config-wikimedia": "0.27.0",
"eslint-config-wikimedia": "0.28.0",
"eslint-plugin-cypress": "^2.15.1",
"grunt": "1.6.1",
"grunt-banana-checker": "0.11.1",

View file

@ -19,8 +19,8 @@ describe( 'Cite backlinks test', () => {
cy.window().should( 'have.property', 'mw' ).and( 'have.property', 'loader' ).and( 'have.property', 'using' );
cy.window().then( async ( win ) => {
await win.mw.loader.using( 'mediawiki.base' ).then( async function () {
await win.mw.hook( 'wikipage.content' ).add( function () {} );
await win.mw.loader.using( 'mediawiki.base' ).then( async () => {
await win.mw.hook( 'wikipage.content' ).add( () => {} );
} );
} );
} );

View file

@ -20,8 +20,8 @@ describe( 'Re-using refs in Visual Editor', () => {
helpers.editPage( title, wikiText );
cy.window().then( async ( win ) => {
await win.mw.loader.using( 'mediawiki.base' ).then( async function () {
await win.mw.hook( 'wikipage.content' ).add( function () { } );
await win.mw.loader.using( 'mediawiki.base' ).then( async () => {
await win.mw.hook( 'wikipage.content' ).add( () => { } );
} );
usesCitoid = win.mw.loader.getModuleNames().includes( 'ext.citoid.visualEditor' );
} );

View file

@ -35,8 +35,8 @@ describe( 'Re-using refs in Visual Editor using templates', () => {
helpers.editPage( title, wikiText );
cy.window().then( async ( win ) => {
await win.mw.loader.using( 'mediawiki.base' ).then( async function () {
await win.mw.hook( 'wikipage.content' ).add( function () { } );
await win.mw.loader.using( 'mediawiki.base' ).then( async () => {
await win.mw.hook( 'wikipage.content' ).add( () => { } );
} );
usesCitoid = win.mw.loader.getModuleNames().includes( 'ext.citoid.visualEditor' );
} );

View file

@ -23,8 +23,8 @@ describe( 'Visual Editor Cite Integration', () => {
helpers.waitForMWLoader();
cy.window().then( async ( win ) => {
await win.mw.loader.using( 'mediawiki.base' ).then( async function () {
await win.mw.hook( 'wikipage.content' ).add( function () { } );
await win.mw.loader.using( 'mediawiki.base' ).then( async () => {
await win.mw.hook( 'wikipage.content' ).add( () => { } );
} );
usesCitoid = win.mw.loader.getModuleNames().includes( 'ext.citoid.visualEditor' );
} );

View file

@ -90,9 +90,7 @@ export function getCiteSingleBacklink( num ) {
}
export function getFragmentFromLink( linkElement ) {
return linkElement.invoke( 'attr', 'href' ).then( ( href ) => {
return href.split( '#' )[ 1 ];
} );
return linkElement.invoke( 'attr', 'href' ).then( ( href ) => href.split( '#' )[ 1 ] );
}
export function backlinksIdShouldMatchFootnoteId( supIndex, backlinkIndex, rowNumber ) {