46 this.loadPatterns(patterns, nodefaultignore);
47 }
48
49 loadPatterns(patterns: string[], nodefaultignore: boolean = false): void { 50 if (!nodefaultignore) {
51 this.patterns = this.patterns.concat(DEFAULT_IGNORE_PATTERNS);
52 }
29export class IgnoreManager {
30 patterns: string[] = [];
31
32 async init(filepath: string | null, nodefaultignore: boolean = false): Promise<void> { 33 const patterns: string[] = [];
34
35 if (filepath) {
Explicit types where they can be easily inferred may add unnecessary verbosity for variables or parameters initialized to a number, string, or boolean
const a: bigint = 10n;
const a: bigint = -10n;
const a: bigint = BigInt(10);
const a: bigint = -BigInt(10);
const a: boolean = false;
const a: boolean = true;
const a: boolean = Boolean(null);
const a: boolean = !0;
const a: number = -10;
const a: number = Number('1');
const a: number = +Number('1');
const a: number = -Number('1');
const a: null = null;
const a: RegExp = /a/;
const a: RegExp = RegExp('a');
const a: RegExp = new RegExp('a');
const a: string = 'str';
const a: string = String(1);
const a: symbol = Symbol('a');
const a: undefined = void someValue;
class Foo {
prop: number = 5;
}
function fn(a: number = 5, b: boolean = true) {}
const a = 10n;
const a = -10n;
const a = BigInt(10);
const a = -BigInt(10);
const a = false;
const a = true;
const a = Boolean(null);
const a = !0;
const a = 10;
const a = +10;
const a = -Number('1');
const a = null;
const a = /a/;
const a = RegExp('a');
const a = 'str';
const a = String(1);
const a = Symbol('a');
const a = void someValue;
class Foo {
prop = 5;
}
function fn(a = 5, b = true) {}
function fn(a: number, b: boolean, c: string) {}