mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
TSLint: re-enable no-redundant-boolean rule
This commit is contained in:
parent
a943081f3b
commit
94a6f240ea
4 changed files with 7 additions and 7 deletions
|
@ -108,7 +108,7 @@ export function hintPage(
|
||||||
contentState.mode = "hint"
|
contentState.mode = "hint"
|
||||||
modeState = new HintState(filterHints, resolve, reject, rapid)
|
modeState = new HintState(filterHints, resolve, reject, rapid)
|
||||||
|
|
||||||
if (rapid == false) {
|
if (!rapid) {
|
||||||
buildHints(hintableElements, hint => {
|
buildHints(hintableElements, hint => {
|
||||||
modeState.cleanUpHints()
|
modeState.cleanUpHints()
|
||||||
hint.result = onSelect(hint.target)
|
hint.result = onSelect(hint.target)
|
||||||
|
|
|
@ -4113,7 +4113,7 @@ export async function updatecheck(polite = false) {
|
||||||
const today = new Date()
|
const today = new Date()
|
||||||
// any here are to shut up TS - it doesn't think Dates have subtraction defined :S
|
// any here are to shut up TS - it doesn't think Dates have subtraction defined :S
|
||||||
const days_since = ((today as any) - (releasedate as any)) / (1000 * 60 * 60 * 24)
|
const days_since = ((today as any) - (releasedate as any)) / (1000 * 60 * 60 * 24)
|
||||||
if (polite == false || (days_since > config.get("updatenagwait") && semverCompare(latest, config.get("updatenaglastversion")) > 0)) {
|
if (!polite || (days_since > config.get("updatenagwait") && semverCompare(latest, config.get("updatenaglastversion")) > 0)) {
|
||||||
config.set("updatenaglastversion", latest)
|
config.set("updatenaglastversion", latest)
|
||||||
fillcmdline_tmp(30000, "Tridactyl " + latest + " is available. Visit about:addons, right click Tridactyl, click 'Find Updates'. Restart Firefox once it has downloaded.")
|
fillcmdline_tmp(30000, "Tridactyl " + latest + " is available. Visit about:addons, right click Tridactyl, click 'Find Updates'. Restart Firefox once it has downloaded.")
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,17 +187,18 @@ export async function nativegate(
|
||||||
// desiredOS = ["mac", "win", "android", "cros", "linux", "openbsd"]
|
// desiredOS = ["mac", "win", "android", "cros", "linux", "openbsd"]
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
if (!desiredOS.includes((await browserBg.runtime.getPlatformInfo()).os)) {
|
if (!desiredOS.includes((await browserBg.runtime.getPlatformInfo()).os)) {
|
||||||
if (interactive == true)
|
if (interactive) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"# Tridactyl's native messenger doesn't support your operating system, yet.",
|
"# Tridactyl's native messenger doesn't support your operating system, yet.",
|
||||||
)
|
)
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const actualVersion = await getNativeMessengerVersion()
|
const actualVersion = await getNativeMessengerVersion()
|
||||||
if (actualVersion !== undefined) {
|
if (actualVersion !== undefined) {
|
||||||
if (semverCompare(version, actualVersion) > 0) {
|
if (semverCompare(version, actualVersion) > 0) {
|
||||||
if (interactive == true)
|
if (interactive)
|
||||||
logger.error(
|
logger.error(
|
||||||
"# Please update to native messenger " +
|
"# Please update to native messenger " +
|
||||||
version +
|
version +
|
||||||
|
@ -207,13 +208,13 @@ export async function nativegate(
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
} else if (interactive == true)
|
} else if (interactive)
|
||||||
logger.error(
|
logger.error(
|
||||||
"# Native messenger not found. Please run `:installnative` and follow the instructions.",
|
"# Native messenger not found. Please run `:installnative` and follow the instructions.",
|
||||||
)
|
)
|
||||||
return false
|
return false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (interactive == true)
|
if (interactive)
|
||||||
logger.error(
|
logger.error(
|
||||||
"# Native messenger not found. Please run `:installnative` and follow the instructions.",
|
"# Native messenger not found. Please run `:installnative` and follow the instructions.",
|
||||||
)
|
)
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
"no-ignored-return": false,
|
"no-ignored-return": false,
|
||||||
"no-map-without-using": false,
|
"no-map-without-using": false,
|
||||||
"no-misleading-array-reverse": false,
|
"no-misleading-array-reverse": false,
|
||||||
"no-redundant-boolean": false,
|
|
||||||
"no-redundant-jump": false,
|
"no-redundant-jump": false,
|
||||||
"no-self-assignment": false,
|
"no-self-assignment": false,
|
||||||
"no-shadowed-variable": false,
|
"no-shadowed-variable": false,
|
||||||
|
|
Loading…
Add table
Reference in a new issue