From 600a324941a606fa4ba000905899aa28548234f0 Mon Sep 17 00:00:00 2001 From: glacambre Date: Wed, 3 Apr 2019 18:34:19 +0200 Subject: [PATCH] TSLint: re-enable no-self-assignment rule --- src/excmds.ts | 2 +- src/help.ts | 2 ++ tslint.json | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/excmds.ts b/src/excmds.ts index 77bf87a7..f640d754 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -1858,7 +1858,7 @@ export async function tabprev(increment = 1) { // return tabIndexSetActive((await activeTab()).index - increment + 1) // Kludge until https://bugzilla.mozilla.org/show_bug.cgi?id=1504775 is fixed: return browser.tabs.query({ currentWindow: true, hidden: false }).then(tabs => { - tabs = tabs.sort((t1, t2) => t1.index - t2.index) + tabs.sort((t1, t2) => t1.index - t2.index) let prevTab = (tabs.findIndex(t => t.active) - increment + tabs.length) % tabs.length return browser.tabs.update(tabs[prevTab].id, { active: true }) }) diff --git a/src/help.ts b/src/help.ts index a9504f0d..999e955a 100644 --- a/src/help.ts +++ b/src/help.ts @@ -117,6 +117,7 @@ async function onExcmdPageLoad() { ) // setCommandSetting() can change the height of nodes in the page so we need to scroll to the right place again if (document.location.hash) { + /* tslint:disable:no-self-assignment */ document.location.hash = document.location.hash } } @@ -181,6 +182,7 @@ function addSettingInputs() { ), ).then(_ => { if (document.location.hash) { + /* tslint:disable:no-self-assignment */ document.location.hash = document.location.hash } }) diff --git a/tslint.json b/tslint.json index 83c93fa9..ac3ece65 100644 --- a/tslint.json +++ b/tslint.json @@ -23,7 +23,6 @@ "no-eval": false, "no-extra-semicolon": false, "no-identical-functions": false, - "no-self-assignment": false, "no-shadowed-variable": false, "no-string-literal": false, "no-string-throw": false,