Add eslint rule "max-len": "error" and fix long lines

Change-Id: I079f300eea18024a6e1698b5016778fa60c74578
This commit is contained in:
Fomafix 2024-03-24 18:49:09 +00:00 committed by DannyS712
parent 90470423ac
commit a73e2d2d19
3 changed files with 5 additions and 3 deletions

View file

@ -13,6 +13,7 @@
},
"rules": {
"jsdoc/no-undefined-types": "off",
"max-len": "error",
"mediawiki/class-doc": "off",
"no-restricted-properties": [
"error",

View file

@ -113,7 +113,8 @@
// If all image downloads are taking longer to load then the MAX_PRINT_TIMEOUT
// abort the spinner and print regardless.
printSetTimeoutReference = setTimeout( doPrint, MAX_PRINT_TIMEOUT );
( loadAllImagesInPage || mobile.loadAllImagesInPage )().then( doPrintBeforeTimeout, doPrintBeforeTimeout );
( loadAllImagesInPage || mobile.loadAllImagesInPage )()
.then( doPrintBeforeTimeout, doPrintBeforeTimeout );
}
}

View file

@ -164,8 +164,8 @@ function initPageIssues( overlayManager, pageHTMLParser ) {
pageHTMLParser.$el.find( PageHTMLParser.HEADING_SELECTOR ).each(
function ( i, headingEl ) {
var $headingEl = $( headingEl ),
// section number is absent on protected pages, when this is the case use i,
// otherwise icon will not show (T340910)
// section number is absent on protected pages, when this is the case
// use i, otherwise icon will not show (T340910)
sectionNum = $headingEl.find( '.edit-page' ).data( 'section' ) || i;
// Note certain headings matched using