Skip to content

Commit

Permalink
fix linter error no-sequences (#2083)
Browse files Browse the repository at this point in the history
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'`
  • Loading branch information
NovemLinguae authored Nov 27, 2024
1 parent 027743d commit 9c55904
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"no-new": "warn",
"no-return-assign": "warn",
"no-script-url": "warn",
"no-sequences": "warn",
"no-throw-literal": "warn",
"no-unused-expressions": "warn",
"no-use-before-define": "warn",
Expand Down
6 changes: 4 additions & 2 deletions modules/twinkleblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]].
Expand Down
2 changes: 1 addition & 1 deletion modules/twinklexfd.js
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,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);
Expand Down
3 changes: 2 additions & 1 deletion morebits.js
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,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;
Expand Down

0 comments on commit 9c55904

Please sign in to comment.