-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
index.d.ts
37 lines (31 loc) · 943 Bytes
/
index.d.ts
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
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import type { ParserOptions } from '@typescript-eslint/types';
import type { SourceFile, CompilerOptions } from 'typescript';
export type LintMessage = TSESLint.Linter.LintMessage;
export type RuleFix = TSESLint.RuleFix;
export type RulesRecord = TSESLint.Linter.RulesRecord;
export type RuleEntry = TSESLint.Linter.RuleEntry;
export interface WebLinter {
ruleNames: { name: string; description?: string }[];
getAst(): TSESTree.Program;
getTsAst(): SourceFile;
getScope(): Record<string, unknown>;
lint(
code: string,
parserOptions: ParserOptions,
rules?: RulesRecord,
): LintMessage[];
}
export interface LinterLoader {
loadLinter(
libMap: Map<string, string>,
compilerOptions: CompilerOptions,
): WebLinter;
}
export type {
DebugLevel,
EcmaVersion,
ParserOptions,
SourceType,
TSESTree,
} from '@typescript-eslint/types';