mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
TSLint: re-activate array-type rule
This rule stipulates that complex array types should be represented as Array<T> rather than T[].
This commit is contained in:
parent
a2cf6671f2
commit
f5563c3d3e
6 changed files with 7 additions and 7 deletions
|
@ -410,7 +410,7 @@ function filterHintsSimple(fstr) {
|
|||
*/
|
||||
function filterHintsVimperator(fstr, reflow = false) {
|
||||
/** Partition a fstr into a tagged array of substrings */
|
||||
function partitionFstr(fstr): { str: string; isHintChar: boolean }[] {
|
||||
function partitionFstr(fstr): Array<{ str: string; isHintChar: boolean }> {
|
||||
const peek = a => a[a.length - 1]
|
||||
const hintChars = defaultHintChars()
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* tslint:disable:array-type */
|
||||
// '//#' is a start point for a simple text-replacement-type macro. See excmds_macros.py
|
||||
|
||||
/** # Tridactyl help page
|
||||
|
|
|
@ -325,7 +325,7 @@ export function getSelector(e: HTMLElement) {
|
|||
*/
|
||||
export function getElemsBySelector(
|
||||
selector: string,
|
||||
filters: Array<ElementFilter>,
|
||||
filters: ElementFilter[],
|
||||
) {
|
||||
let elems = Array.from(document.querySelectorAll(selector))
|
||||
let frameElems = getAllDocumentFrames().reduce((acc, frame) => {
|
||||
|
@ -356,7 +356,7 @@ export function getElemsBySelector(
|
|||
export function getNthElement(
|
||||
selectors: string,
|
||||
nth: number,
|
||||
filters: Array<ElementFilter>,
|
||||
filters: ElementFilter[],
|
||||
): HTMLElement {
|
||||
let inputs = getElemsBySelector(selectors, filters)
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ export function getDownloadFilenameForUrl(url: URL): string {
|
|||
*
|
||||
* These could be like "query" or "query=val"
|
||||
*/
|
||||
function getUrlQueries(url: URL): Array<string> {
|
||||
function getUrlQueries(url: URL): string[] {
|
||||
let qys = []
|
||||
|
||||
if (url.search) {
|
||||
|
@ -223,7 +223,7 @@ function getUrlQueries(url: URL): Array<string> {
|
|||
/**
|
||||
* Update a URL with a new array of queries
|
||||
*/
|
||||
function setUrlQueries(url: URL, qys: Array<string>) {
|
||||
function setUrlQueries(url: URL, qys: string[]) {
|
||||
url.search = ""
|
||||
|
||||
if (qys.length) {
|
||||
|
|
|
@ -20,7 +20,7 @@ const logger = new Logger("state")
|
|||
class State {
|
||||
lastSearch: string = undefined
|
||||
cmdHistory: string[] = []
|
||||
prevInputs: { inputId: string; tab: number; jumppos?: number }[] = [
|
||||
prevInputs: Array<{ inputId: string; tab: number; jumppos?: number }> = [
|
||||
{
|
||||
inputId: undefined,
|
||||
tab: undefined,
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
"extends": ["tslint:recommended", "tslint-sonarts"],
|
||||
"rules": {
|
||||
"align": false,
|
||||
"array-type": false,
|
||||
"arrow-parens": false,
|
||||
"ban-types": false,
|
||||
"bool-param-default": false,
|
||||
|
|
Loading…
Add table
Reference in a new issue