Skip to content

Commit

Permalink
fix linter error no-sequences
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 committed Nov 26, 2024
1 parent 3aa633a commit c7ac38f
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 @@ -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",
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 @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion morebits.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c7ac38f

Please sign in to comment.