From c7ac38f512600018d987dac02ee7d5aeb8105f4c Mon Sep 17 00:00:00 2001 From: NovemLinguae Date: Mon, 25 Nov 2024 21:04:35 -0800 Subject: [PATCH] fix linter error no-sequences manual fixes. I tested one fix in the console, worked as expected. All 4 fixes follow the pattern of `var1 = 'x', var2 = 'y'` -> `var1 = 'x'; 'var2 = 'y'` --- .eslintrc.json | 1 - modules/twinkleblock.js | 6 ++++-- modules/twinklexfd.js | 2 +- morebits.js | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index f15d5e170..fe43c0ef6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -58,7 +58,6 @@ "no-new": "warn", "no-return-assign": "warn", "no-script-url": "warn", - "no-sequences": "warn", "no-throw-literal": "warn", "no-unneeded-ternary": "warn", "no-unused-expressions": "warn", diff --git a/modules/twinkleblock.js b/modules/twinkleblock.js index 47ccd67d9..a02e093e8 100644 --- a/modules/twinkleblock.js +++ b/modules/twinkleblock.js @@ -186,9 +186,11 @@ Twinkle.block.processUserInfo = function twinkleblockProcessUserInfo(data, fn) { // Toggle unblock link if not the user in question; always first const unblockLink = document.querySelector('.morebits-dialog-footerlinks a'); if (blockedUserName !== relevantUserName) { - unblockLink.hidden = true, unblockLink.nextSibling.hidden = true; // link+trailing bullet + unblockLink.hidden = true; + unblockLink.nextSibling.hidden = true; // link+trailing bullet } else { - unblockLink.hidden = false, unblockLink.nextSibling.hidden = false; // link+trailing bullet + unblockLink.hidden = false; + unblockLink.nextSibling.hidden = false; // link+trailing bullet } // Semi-busted on ranges, see [[phab:T270737]] and [[phab:T146628]]. diff --git a/modules/twinklexfd.js b/modules/twinklexfd.js index 9b02de6b5..6806a442f 100644 --- a/modules/twinklexfd.js +++ b/modules/twinklexfd.js @@ -1273,7 +1273,7 @@ Twinkle.xfd.callbacks = { const params = pageobj.getCallbackParameters(); const date = new Morebits.date(pageobj.getLoadTime()); - params.logpage = 'Wikipedia:Templates for discussion/Log/' + date.format('YYYY MMMM D', 'utc'), + params.logpage = 'Wikipedia:Templates for discussion/Log/' + date.format('YYYY MMMM D', 'utc'); params.discussionpage = params.logpage + '#' + Morebits.pageNameNorm; // Add log/discussion page params to the already-loaded page object pageobj.setCallbackParameters(params); diff --git a/morebits.js b/morebits.js index 014b7a9ae..107230e47 100644 --- a/morebits.js +++ b/morebits.js @@ -1966,7 +1966,8 @@ Morebits.date.prototype = { // No built-in week functions, so rather than build out ISO's getWeek/setWeek, just multiply // Probably can't be used for Julian->Gregorian changeovers, etc. if (unitNorm === 'Week') { - unitNorm = 'Date', num *= 7; + unitNorm = 'Date'; + num *= 7; } this['set' + unitNorm](this['get' + unitNorm]() + num); return this;