xwt
4 天以前 f4711865a8ea9566910bfcc6daa31795b89272a7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { ESLint, Rule } from "./index.js";
 
/** @deprecated */
export const builtinRules: Map<string, Rule.RuleModule>;
 
/** @deprecated */
export class FileEnumerator {
    constructor(
        params?: {
            cwd?: string;
            configArrayFactory?: any;
            extensions?: any;
            globInputPaths?: boolean;
            errorOnUnmatchedPattern?: boolean;
            ignore?: boolean;
        },
    );
    isTargetPath(filePath: string, providedConfig?: any): boolean;
    iterateFiles(
        patternOrPatterns: string | string[],
    ): IterableIterator<{ config: any; filePath: string; ignored: boolean }>;
}
 
export { /** @deprecated */ ESLint as FlatESLint };
 
/** @deprecated */
export class LegacyESLint {
    static configType: "eslintrc";
 
    static readonly version: string;
 
    static outputFixes(results: ESLint.LintResult[]): Promise<void>;
 
    static getErrorResults(results: ESLint.LintResult[]): ESLint.LintResult[];
 
    constructor(options?: ESLint.LegacyOptions);
 
    lintFiles(patterns: string | string[]): Promise<ESLint.LintResult[]>;
 
    lintText(
        code: string,
        options?: { filePath?: string | undefined; warnIgnored?: boolean | undefined },
    ): Promise<ESLint.LintResult[]>;
 
    getRulesMetaForResults(results: ESLint.LintResult[]): ESLint.LintResultData["rulesMeta"];
 
    hasFlag(flag: string): false;
 
    calculateConfigForFile(filePath: string): Promise<any>;
 
    isPathIgnored(filePath: string): Promise<boolean>;
 
    loadFormatter(nameOrPath?: string): Promise<ESLint.Formatter>;
}
 
/** @deprecated */
export function shouldUseFlatConfig(): Promise<boolean>;