TSLint: re-enable whitespace rule

This commit is contained in:
glacambre 2019-04-12 05:54:31 +02:00
parent 37dfddca4e
commit 0a8c3cd2f6
No known key found for this signature in database
GPG key ID: B9625DB1767553AC
8 changed files with 20 additions and 21 deletions

View file

@ -41,7 +41,7 @@ import { AutoContain } from "@src/lib/autocontainers"
// {{{ tri.contentLocation
// When loading the background, use the active tab to know what the current content url is
browser.tabs.query({ currentWindow: true, active: true }).then(t => {
;(window as any).tri.contentLocation = new URL(t[0].url)
(window as any).tri.contentLocation = new URL(t[0].url)
})
// After that, on every tab change, update the current url
let contentLocationCount = 0
@ -52,7 +52,7 @@ browser.tabs.onActivated.addListener(ev => {
// Note: we're using contentLocationCount and myId in order to make sure that only the last onActivated event is used in order to set contentLocation
// This is needed because otherWise the following chain of execution might happen: onActivated1 => onActivated2 => tabs.get2 => tabs.get1
if (contentLocationCount === myId) {
;(window as any).tri.contentLocation = new URL(t.url)
(window as any).tri.contentLocation = new URL(t.url)
}
})
})

View file

@ -4,7 +4,7 @@
if ((window as any).tridactyl_content_lock !== undefined) {
throw Error("Trying to load Tridactyl, but it's already loaded.")
}
;(window as any).tridactyl_content_lock = "locked"
(window as any).tridactyl_content_lock = "locked"
// Be careful: typescript elides imports that appear not to be used if they're
// assigned to a name. If you want an import just for its side effects, make

View file

@ -201,7 +201,7 @@ export async function fillinput(selector: string, ...content: string[]) {
let inputToFill = document.querySelector(selector)
if (!inputToFill) inputToFill = DOM.getLastUsedInput()
if ("value" in inputToFill) {
;(inputToFill as HTMLInputElement).value = content.join(" ")
(inputToFill as HTMLInputElement).value = content.join(" ")
} else {
inputToFill.textContent = content.join(" ")
}
@ -829,7 +829,7 @@ document.addEventListener("load", () => curJumps().then(() => jumpprev(0)))
/** Blur (unfocus) the active element */
//#content
export function unfocus() {
;(document.activeElement as HTMLInputElement).blur()
(document.activeElement as HTMLInputElement).blur()
contentState.mode = "normal"
}

View file

@ -93,7 +93,7 @@ async function onExcmdPageLoad() {
browser.storage.onChanged.addListener((changes, areaname) => {
if ("userconfig" in changes) {
// JSON.stringify for comparisons like it's 2012
;["nmaps", "imaps", "ignoremaps", "inputmaps", "exaliases"].forEach(
["nmaps", "imaps", "ignoremaps", "inputmaps", "exaliases"].forEach(
kind => {
if (
JSON.stringify(changes.userconfig.newValue[kind]) !==
@ -130,7 +130,7 @@ function addSettingInputs() {
let onKeyUp = async ev => {
let input = ev.target
if (ev.key === "Enter") {
;(window as any).tri.messaging.message(
(window as any).tri.messaging.message(
"controller_background",
"acceptExCmd",
["set " + input.name + " " + input.value],
@ -199,7 +199,7 @@ function addResetConfigButton() {
`Please write '${sentence}' without quotes in the following input field if you really want to reset your Tridactyl config.`,
)
if (p === sentence) {
;(window as any).tri.messaging
(window as any).tri.messaging
.message("controller_background", "acceptExCmd", [sentence])
.then(_ => alert("Config reset!"))
} else {

View file

@ -1126,7 +1126,7 @@ export async function update() {
set("configversion", "1.2")
},
"1.2": () => {
;["ignoremaps", "inputmaps", "imaps", "nmaps"]
["ignoremaps", "inputmaps", "imaps", "nmaps"]
.map(mapname => [
mapname,
getDeepProperty(USERCONFIG, [mapname]),
@ -1158,7 +1158,7 @@ export async function update() {
set("configversion", "1.3")
},
"1.3": () => {
;[
[
"priority",
"hintdelay",
"scrollduration",
@ -1171,7 +1171,7 @@ export async function update() {
set("configversion", "1.4")
},
"1.4": () => {
;(getDeepProperty(USERCONFIG, ["noiframeon"]) || []).forEach(
(getDeepProperty(USERCONFIG, ["noiframeon"]) || []).forEach(
site => {
setURL(site, "noiframe", "true")
},
@ -1189,7 +1189,7 @@ export async function update() {
mapObj["<Space>"] = mapObj[" "]
delete mapObj[" "]
}
;[
[
"<A- >",
"<C- >",
"<M- >",
@ -1209,7 +1209,7 @@ export async function update() {
})
return mapObj
}
;["nmaps", "exmaps", "imaps", "inputmaps", "ignoremaps"].forEach(
["nmaps", "exmaps", "imaps", "inputmaps", "ignoremaps"].forEach(
settingName => updateAll([settingName], updateSetting),
)
set("configversion", "1.7")

View file

@ -287,7 +287,7 @@ export function mapstrToKeyseq(mapstr: string): MinimalKey[] {
// Reduce mapstr by one character or one bracket expression per iteration
while (mapstr.length) {
if (mapstr[0] === "<") {
;[key, mapstr] = bracketexprToKey(mapstr)
[key, mapstr] = bracketexprToKey(mapstr)
keyseq.push(key)
} else {
keyseq.push(new MinimalKey(mapstr[0]))

View file

@ -35,7 +35,6 @@
"semicolon": false,
"trailing-comma": false,
"triple-equals": false,
"variable-name": false,
"whitespace": false
"variable-name": false
}
}