mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
TSLint: re-enable no-unnecessary-initializer rule
This commit is contained in:
parent
3ff4713247
commit
bd65146ca8
10 changed files with 12 additions and 13 deletions
|
@ -39,6 +39,7 @@ fi
|
|||
# .bracketexpr.generated.ts is needed for metadata generation
|
||||
(
|
||||
printf '/* tslint:disable:no-trailing-whitespace */\n'
|
||||
printf '/* tslint:disable:no-unnecessary-initializer */\n'
|
||||
"$(npm bin)/nearleyc" src/grammars/bracketexpr.ne
|
||||
) > src/grammars/.bracketexpr.generated.ts
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ export class Parser {
|
|||
}
|
||||
|
||||
feedUntilError(input) {
|
||||
let lastResult = undefined
|
||||
let lastResult
|
||||
let consumedIndex = 0
|
||||
try {
|
||||
for (let val of input) {
|
||||
|
|
|
@ -49,7 +49,7 @@ import * as tri_editor from "@src/lib/editor"
|
|||
const logger = new Logger("cmdline")
|
||||
|
||||
/** @hidden **/
|
||||
let activeCompletions: Completions.CompletionSource[] = undefined
|
||||
let activeCompletions: Completions.CompletionSource[]
|
||||
/** @hidden **/
|
||||
let completionsDiv = window.document.getElementById("completions")
|
||||
/** @hidden **/
|
||||
|
|
|
@ -140,8 +140,7 @@ function* ParserController() {
|
|||
// unbounded length.
|
||||
keyEvents.push(keyevent)
|
||||
|
||||
let response = undefined
|
||||
response = parsers[contentState.mode](keyEvents)
|
||||
let response = parsers[contentState.mode](keyEvents)
|
||||
logger.debug(
|
||||
currentMode,
|
||||
contentState.mode,
|
||||
|
|
|
@ -93,7 +93,7 @@ class HintState {
|
|||
}
|
||||
}
|
||||
|
||||
let modeState: HintState = undefined
|
||||
let modeState: HintState
|
||||
|
||||
/** For each hintable element, add a hint */
|
||||
export function hintPage(
|
||||
|
|
|
@ -105,7 +105,7 @@ export async function scroll(
|
|||
x: number = 0,
|
||||
y: number = 0,
|
||||
e: Node,
|
||||
duration: number = undefined,
|
||||
duration?: number,
|
||||
) {
|
||||
let smooth = await getSmooth()
|
||||
if (smooth == "false") duration = 0
|
||||
|
@ -145,8 +145,8 @@ let lastY = 0
|
|||
export async function recursiveScroll(
|
||||
x: number,
|
||||
y: number,
|
||||
node: Element = undefined,
|
||||
stopAt: Element = undefined,
|
||||
node?: Element,
|
||||
stopAt?: Element,
|
||||
) {
|
||||
let startingFromCached = false
|
||||
if (!node) {
|
||||
|
|
|
@ -1130,7 +1130,7 @@ export async function url2args() {
|
|||
|
||||
/** @hidden */
|
||||
//#content_helper
|
||||
let sourceElement = undefined
|
||||
let sourceElement
|
||||
/** @hidden */
|
||||
//#content_helper
|
||||
function removeSource() {
|
||||
|
@ -1516,7 +1516,7 @@ export function urlparent(count = 1) {
|
|||
//#content
|
||||
export function urlmodify(mode: "-t" | "-r" | "-q" | "-Q" | "-g", ...args: string[]) {
|
||||
let oldUrl = new URL(window.location.href)
|
||||
let newUrl = undefined
|
||||
let newUrl
|
||||
|
||||
switch (mode) {
|
||||
case "-t":
|
||||
|
|
|
@ -84,7 +84,7 @@ export async function messageTab(tabId, type: TabMessageType, command, args?) {
|
|||
return browserBg.tabs.sendMessage(tabId, message)
|
||||
}
|
||||
|
||||
let _ownTabId = undefined
|
||||
let _ownTabId
|
||||
export async function messageOwnTab(type: TabMessageType, command, args?) {
|
||||
if (_ownTabId === undefined) {
|
||||
_ownTabId = await ownTabId()
|
||||
|
|
|
@ -8,7 +8,7 @@ class GobbleState {
|
|||
public endCommand = ""
|
||||
}
|
||||
|
||||
let modeState: GobbleState = undefined
|
||||
let modeState: GobbleState
|
||||
|
||||
/** Init gobble mode. After parsing the defined number of input keys, execute
|
||||
`endCmd` with attached parsed input. `Escape` cancels the mode and returns to
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
"no-identical-functions": false,
|
||||
"no-shadowed-variable": false,
|
||||
"no-string-throw": false,
|
||||
"no-unnecessary-initializer": false,
|
||||
"no-unsafe-finally": false,
|
||||
"no-var-keyword": false,
|
||||
"no-variable-usage-before-declaration": false,
|
||||
|
|
Loading…
Add table
Reference in a new issue