TSLint: re-enable no-redundant-boolean rule

This commit is contained in:
glacambre 2019-04-03 13:38:55 +02:00
parent a943081f3b
commit 94a6f240ea
No known key found for this signature in database
GPG key ID: B9625DB1767553AC
4 changed files with 7 additions and 7 deletions

View file

@ -108,7 +108,7 @@ export function hintPage(
contentState.mode = "hint"
modeState = new HintState(filterHints, resolve, reject, rapid)
if (rapid == false) {
if (!rapid) {
buildHints(hintableElements, hint => {
modeState.cleanUpHints()
hint.result = onSelect(hint.target)

View file

@ -4113,7 +4113,7 @@ export async function updatecheck(polite = false) {
const today = new Date()
// 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)
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)
fillcmdline_tmp(30000, "Tridactyl " + latest + " is available. Visit about:addons, right click Tridactyl, click 'Find Updates'. Restart Firefox once it has downloaded.")
}

View file

@ -187,17 +187,18 @@ export async function nativegate(
// desiredOS = ["mac", "win", "android", "cros", "linux", "openbsd"]
): Promise<boolean> {
if (!desiredOS.includes((await browserBg.runtime.getPlatformInfo()).os)) {
if (interactive == true)
if (interactive) {
logger.error(
"# Tridactyl's native messenger doesn't support your operating system, yet.",
)
}
return false
}
try {
const actualVersion = await getNativeMessengerVersion()
if (actualVersion !== undefined) {
if (semverCompare(version, actualVersion) > 0) {
if (interactive == true)
if (interactive)
logger.error(
"# Please update to native messenger " +
version +
@ -207,13 +208,13 @@ export async function nativegate(
return false
}
return true
} else if (interactive == true)
} else if (interactive)
logger.error(
"# Native messenger not found. Please run `:installnative` and follow the instructions.",
)
return false
} catch (e) {
if (interactive == true)
if (interactive)
logger.error(
"# Native messenger not found. Please run `:installnative` and follow the instructions.",
)

View file

@ -26,7 +26,6 @@
"no-ignored-return": false,
"no-map-without-using": false,
"no-misleading-array-reverse": false,
"no-redundant-boolean": false,
"no-redundant-jump": false,
"no-self-assignment": false,
"no-shadowed-variable": false,