vscode-eslint 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/vscode-eslint +24 -1
- package/client/out/client.d.ts +13 -0
- package/client/out/extension.d.ts +3 -0
- package/client/out/extension.js +2 -0
- package/client/out/extension.js.map +1 -0
- package/client/out/node-utils.d.ts +51 -0
- package/client/out/settings.d.ts +41 -0
- package/client/out/shared/customMessages.d.ts +89 -0
- package/client/out/shared/settings.d.ts +106 -0
- package/client/out/tasks.d.ts +31 -0
- package/client/out/tests/glob.test.d.ts +1 -0
- package/client/out/vscode-utils.d.ts +5 -0
- package/package.json +8 -1
- package/server/out/diff.d.ts +134 -0
- package/server/out/eslint.d.ts +298 -0
- package/server/out/eslintServer.d.ts +1 -0
- package/server/out/eslintServer.js +2 -0
- package/server/out/eslintServer.js.map +1 -0
- package/server/out/is.d.ts +3 -0
- package/server/out/languageDefaults.d.ts +6 -0
- package/server/out/linkedMap.d.ts +53 -0
- package/server/out/paths.d.ts +22 -0
- package/server/out/shared/customMessages.d.ts +89 -0
- package/server/out/shared/settings.d.ts +106 -0
- package/$shared/customMessages.ts +0 -113
- package/$shared/settings.ts +0 -189
- package/.CodeQL.yml +0 -5
- package/.azure-pipelines.yml +0 -27
- package/.gemini/agents/vscode-eslint.md +0 -23
- package/.github/commands.yml +0 -127
- package/.github/locker.yml +0 -6
- package/.github/needs_more_info.yml +0 -6
- package/.github/workflows/npm-publish.yml +0 -53
- package/.github/workflows/release-please.yml +0 -22
- package/.lsifrc.json +0 -4
- package/.vscode/launch.json +0 -20
- package/.vscode/settings.json +0 -52
- package/.vscode/spellright.dict +0 -8
- package/.vscode/tasks.json +0 -39
- package/.vscodeignore +0 -23
- package/CHANGELOG.md +0 -524
- package/SECURITY.md +0 -41
- package/agents.md +0 -36
- package/build/azure-pipelines/linux/build.yml +0 -14
- package/build/azure-pipelines/pre-release.yml +0 -42
- package/build/azure-pipelines/release.yml +0 -45
- package/build/azure-pipelines/win32/build.yml +0 -14
- package/build/bin/all.js +0 -29
- package/build/bin/linking.js +0 -102
- package/build/bin/symlink.js +0 -35
- package/client/.mocharc.json +0 -6
- package/client/agents.md +0 -5
- package/client/package-lock.json +0 -176
- package/client/package.json +0 -29
- package/client/src/client.ts +0 -992
- package/client/src/extension.ts +0 -180
- package/client/src/node-utils.ts +0 -393
- package/client/src/settings.ts +0 -379
- package/client/src/tasks.ts +0 -186
- package/client/src/tests/glob.test.ts +0 -31
- package/client/src/vscode-utils.ts +0 -28
- package/client/test/mocha.opts +0 -3
- package/client/tsconfig.json +0 -20
- package/client/webpack.config.js +0 -25
- package/contributing.md +0 -19
- package/esbuild.js +0 -62
- package/eslint.config.js +0 -129
- package/history/settings_1_9_x.md +0 -110
- package/images/2_1_10/eslint-dialog.png +0 -0
- package/images/2_1_10/eslint-status.png +0 -0
- package/package-json-schema.json +0 -9
- package/playgrounds/7.0/.eslintignore +0 -1
- package/playgrounds/7.0/.eslintrc.json +0 -71
- package/playgrounds/7.0/.vscode/settings.json +0 -85
- package/playgrounds/7.0/app.js +0 -12
- package/playgrounds/7.0/build/.eslintignore +0 -1
- package/playgrounds/7.0/build/.eslintrc.json +0 -30
- package/playgrounds/7.0/build/build.js +0 -11
- package/playgrounds/7.0/jsconfig.json +0 -5
- package/playgrounds/7.0/package-lock.json +0 -2133
- package/playgrounds/7.0/package.json +0 -10
- package/playgrounds/7.0/readme.md +0 -0
- package/playgrounds/7.0/subDir/sub.js +0 -11
- package/playgrounds/7.0/subDir/test.jsx +0 -10
- package/playgrounds/7.0/test.js +0 -11
- package/playgrounds/7.0/test.sh +0 -1
- package/playgrounds/7.0/test.vue +0 -33
- package/playgrounds/7.0/test2.html +0 -8
- package/playgrounds/8.0/.eslintignore +0 -1
- package/playgrounds/8.0/.eslintrc.json +0 -71
- package/playgrounds/8.0/.vscode/settings.json +0 -91
- package/playgrounds/8.0/app.js +0 -12
- package/playgrounds/8.0/build/.eslintignore +0 -1
- package/playgrounds/8.0/build/.eslintrc.json +0 -30
- package/playgrounds/8.0/build/build.js +0 -11
- package/playgrounds/8.0/jsconfig.json +0 -5
- package/playgrounds/8.0/package-lock.json +0 -2321
- package/playgrounds/8.0/package.json +0 -10
- package/playgrounds/8.0/readme.md +0 -17
- package/playgrounds/8.0/subDir/sub.js +0 -11
- package/playgrounds/8.0/subDir/test.jsx +0 -10
- package/playgrounds/8.0/test.ipynb +0 -49
- package/playgrounds/8.0/test.js +0 -3
- package/playgrounds/8.0/test.sh +0 -1
- package/playgrounds/8.0/test.vue +0 -33
- package/playgrounds/8.0/test2.html +0 -8
- package/playgrounds/9.0/flat/.vscode/settings.json +0 -3
- package/playgrounds/9.0/flat/app.js +0 -12
- package/playgrounds/9.0/flat/dist/ignore.js +0 -12
- package/playgrounds/9.0/flat/eslint.config.js +0 -61
- package/playgrounds/9.0/flat/package-lock.json +0 -1053
- package/playgrounds/9.0/flat/package.json +0 -9
- package/playgrounds/9.0/rc/.eslintrc.json +0 -57
- package/playgrounds/9.0/rc/.vscode/settings.json +0 -3
- package/playgrounds/9.0/rc/app.js +0 -12
- package/playgrounds/9.0/rc/package-lock.json +0 -1345
- package/playgrounds/9.0/rc/package.json +0 -9
- package/playgrounds/flat-config/.vscode/settings.json +0 -22
- package/playgrounds/flat-config/app.js +0 -12
- package/playgrounds/flat-config/eslint.config.js +0 -51
- package/playgrounds/flat-config/package-lock.json +0 -2733
- package/playgrounds/flat-config/package.json +0 -12
- package/playgrounds/flat-config/sub/sub.js +0 -2
- package/playgrounds/flat-config/test.ts +0 -7
- package/playgrounds/flat-config/tsconfig.json +0 -11
- package/playgrounds/flat-config-fail/f1/app.js +0 -12
- package/playgrounds/flat-config-fail/f1/eslint.config.js +0 -51
- package/playgrounds/flat-config-fail/package-lock.json +0 -1683
- package/playgrounds/flat-config-fail/package.json +0 -11
- package/playgrounds/flat-config-mjs/.vscode/settings.json +0 -21
- package/playgrounds/flat-config-mjs/app.js +0 -12
- package/playgrounds/flat-config-mjs/eslint.config.mjs +0 -53
- package/playgrounds/flat-config-mjs/package-lock.json +0 -2860
- package/playgrounds/flat-config-mjs/package.json +0 -11
- package/playgrounds/flat-config-mjs/sub/sub.js +0 -2
- package/playgrounds/flat-config-mjs/test.ts +0 -7
- package/playgrounds/flat-config-mjs/tsconfig.json +0 -11
- package/playgrounds/load-eslint/.vscode/settings.json +0 -21
- package/playgrounds/load-eslint/app.js +0 -12
- package/playgrounds/load-eslint/eslint.config.js +0 -51
- package/playgrounds/load-eslint/package-lock.json +0 -2860
- package/playgrounds/load-eslint/package.json +0 -11
- package/playgrounds/load-eslint/sub/sub.js +0 -2
- package/playgrounds/load-eslint/test.ts +0 -7
- package/playgrounds/load-eslint/tsconfig.json +0 -11
- package/playgrounds/noLib/test.js +0 -22
- package/playgrounds/noWD/.vscode/settings.json +0 -2
- package/playgrounds/noWD/src/.eslintrc.json +0 -18
- package/playgrounds/noWD/src/package-lock.json +0 -2812
- package/playgrounds/noWD/src/package.json +0 -12
- package/playgrounds/noWD/src/test.js +0 -3
- package/playgrounds/notebooks/notebook.ipynb +0 -7072
- package/playgrounds/notebooks/notebook2.ipynb +0 -20
- package/playgrounds/testing.code-workspace +0 -28
- package/playgrounds/ts/.eslintrc.base.json +0 -23
- package/playgrounds/ts/.eslintrc.json +0 -191
- package/playgrounds/ts/.vscode/settings.json +0 -12
- package/playgrounds/ts/package-lock.json +0 -2687
- package/playgrounds/ts/package.json +0 -11
- package/playgrounds/ts/test copy.ts +0 -4
- package/playgrounds/ts/test.ipynb +0 -49
- package/playgrounds/ts/test.ts +0 -4
- package/playgrounds/ts/test.tsx +0 -14
- package/playgrounds/ts/tsconfig.json +0 -100
- package/server/agents.md +0 -9
- package/server/package-lock.json +0 -93
- package/server/package.json +0 -32
- package/server/src/diff.ts +0 -1079
- package/server/src/eslint.ts +0 -1471
- package/server/src/eslintServer.ts +0 -865
- package/server/src/is.ts +0 -18
- package/server/src/languageDefaults.ts +0 -40
- package/server/src/linkedMap.ts +0 -448
- package/server/src/paths.ts +0 -128
- package/server/src/thenable.d.ts +0 -5
- package/server/tsconfig.json +0 -21
- package/server/webpack.config.js +0 -25
- package/shared.webpack.config.js +0 -59
- package/tsconfig.base.json +0 -9
- package/tsconfig.json +0 -21
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { TextDocument } from 'vscode-languageserver-textdocument';
|
|
2
|
+
import { Diagnostic, ProposedFeatures, TextEdit, TextDocuments } from 'vscode-languageserver/node';
|
|
3
|
+
import { URI } from 'vscode-uri';
|
|
4
|
+
import { Status } from './shared/customMessages';
|
|
5
|
+
import { ConfigurationSettings, DirectoryItem, ESLintOptions, RuleCustomization, RuleSeverity } from './shared/settings';
|
|
6
|
+
/**
|
|
7
|
+
* ESLint specific settings for a text document.
|
|
8
|
+
*/
|
|
9
|
+
export type TextDocumentSettings = Omit<ConfigurationSettings, 'workingDirectory'> & {
|
|
10
|
+
silent: boolean;
|
|
11
|
+
workingDirectory: DirectoryItem | undefined;
|
|
12
|
+
library: ESLintModule | undefined;
|
|
13
|
+
resolvedGlobalPackageManagerPath: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
export declare namespace TextDocumentSettings {
|
|
16
|
+
function hasLibrary(settings: TextDocumentSettings): settings is (TextDocumentSettings & {
|
|
17
|
+
library: ESLintModule;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A special error thrown by the ESLint library
|
|
22
|
+
*/
|
|
23
|
+
export interface ESLintError extends Error {
|
|
24
|
+
messageTemplate?: string;
|
|
25
|
+
messageData?: {
|
|
26
|
+
pluginName?: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export declare namespace ESLintError {
|
|
30
|
+
function isNoConfigFound(error: any): boolean;
|
|
31
|
+
}
|
|
32
|
+
type ESLintAutoFixEdit = {
|
|
33
|
+
range: [number, number];
|
|
34
|
+
text: string;
|
|
35
|
+
};
|
|
36
|
+
type ESLintSuggestionResult = {
|
|
37
|
+
desc: string;
|
|
38
|
+
fix: ESLintAutoFixEdit;
|
|
39
|
+
};
|
|
40
|
+
type ESLintProblem = {
|
|
41
|
+
line: number;
|
|
42
|
+
column: number;
|
|
43
|
+
endLine?: number;
|
|
44
|
+
endColumn?: number;
|
|
45
|
+
severity: number;
|
|
46
|
+
ruleId: string;
|
|
47
|
+
message: string;
|
|
48
|
+
fix?: ESLintAutoFixEdit;
|
|
49
|
+
suggestions?: ESLintSuggestionResult[];
|
|
50
|
+
};
|
|
51
|
+
type ESLintDocumentReport = {
|
|
52
|
+
filePath: string;
|
|
53
|
+
errorCount: number;
|
|
54
|
+
warningCount: number;
|
|
55
|
+
messages: ESLintProblem[];
|
|
56
|
+
output?: string;
|
|
57
|
+
};
|
|
58
|
+
type ESLintReport = {
|
|
59
|
+
errorCount: number;
|
|
60
|
+
warningCount: number;
|
|
61
|
+
results: ESLintDocumentReport[];
|
|
62
|
+
};
|
|
63
|
+
export type CLIOptions = {
|
|
64
|
+
cwd?: string;
|
|
65
|
+
fixTypes?: string[];
|
|
66
|
+
fix?: boolean;
|
|
67
|
+
};
|
|
68
|
+
export type SeverityConf = 0 | 1 | 2 | 'off' | 'warn' | 'error';
|
|
69
|
+
export type RuleConf = SeverityConf | [SeverityConf, ...any[]];
|
|
70
|
+
export type ConfigData = {
|
|
71
|
+
rules?: Record<string, RuleConf>;
|
|
72
|
+
};
|
|
73
|
+
export type ESLintClassOptions = {
|
|
74
|
+
cwd?: string;
|
|
75
|
+
fixTypes?: string[];
|
|
76
|
+
fix?: boolean;
|
|
77
|
+
overrideConfig?: ConfigData;
|
|
78
|
+
overrideConfigFile?: string | null;
|
|
79
|
+
};
|
|
80
|
+
export type RuleMetaData = {
|
|
81
|
+
docs?: {
|
|
82
|
+
url?: string;
|
|
83
|
+
};
|
|
84
|
+
type?: string;
|
|
85
|
+
};
|
|
86
|
+
export declare namespace RuleMetaData {
|
|
87
|
+
const unusedDisableDirectiveId = "unused-disable-directive";
|
|
88
|
+
function capture(eslint: ESLintClass, reports: ESLintDocumentReport[]): void;
|
|
89
|
+
function clear(): void;
|
|
90
|
+
function getUrl(ruleId: string): string | undefined;
|
|
91
|
+
function getType(ruleId: string): string | undefined;
|
|
92
|
+
function hasRuleId(ruleId: string): boolean;
|
|
93
|
+
function isUnusedDisableDirectiveProblem(problem: ESLintProblem): boolean;
|
|
94
|
+
}
|
|
95
|
+
type ParserOptions = {
|
|
96
|
+
parser?: string;
|
|
97
|
+
};
|
|
98
|
+
type ESLintRcConfig = {
|
|
99
|
+
env: Record<string, boolean>;
|
|
100
|
+
extends: string | string[];
|
|
101
|
+
ignorePatterns: string | string[];
|
|
102
|
+
noInlineConfig: boolean;
|
|
103
|
+
parser: string | null;
|
|
104
|
+
parserOptions?: ParserOptions;
|
|
105
|
+
plugins: string[];
|
|
106
|
+
processor: string;
|
|
107
|
+
reportUnusedDisableDirectives: boolean | undefined;
|
|
108
|
+
root: boolean;
|
|
109
|
+
rules: Record<string, RuleConf>;
|
|
110
|
+
settings: object;
|
|
111
|
+
};
|
|
112
|
+
type ESLintConfig = ESLintRcConfig;
|
|
113
|
+
export type Problem = {
|
|
114
|
+
label: string;
|
|
115
|
+
documentVersion: number;
|
|
116
|
+
ruleId: string;
|
|
117
|
+
line: number;
|
|
118
|
+
diagnostic: Diagnostic;
|
|
119
|
+
edit?: ESLintAutoFixEdit;
|
|
120
|
+
suggestions?: ESLintSuggestionResult[];
|
|
121
|
+
};
|
|
122
|
+
export declare namespace Problem {
|
|
123
|
+
function isFixable(problem: Problem): problem is FixableProblem;
|
|
124
|
+
function hasSuggestions(problem: Problem): problem is SuggestionsProblem;
|
|
125
|
+
}
|
|
126
|
+
export type FixableProblem = Problem & {
|
|
127
|
+
edit: ESLintAutoFixEdit;
|
|
128
|
+
};
|
|
129
|
+
export declare namespace FixableProblem {
|
|
130
|
+
function createTextEdit(document: TextDocument, editInfo: FixableProblem): TextEdit;
|
|
131
|
+
}
|
|
132
|
+
export type SuggestionsProblem = Problem & {
|
|
133
|
+
suggestions: ESLintSuggestionResult[];
|
|
134
|
+
};
|
|
135
|
+
export declare namespace SuggestionsProblem {
|
|
136
|
+
function createTextEdit(document: TextDocument, suggestion: ESLintSuggestionResult): TextEdit;
|
|
137
|
+
}
|
|
138
|
+
interface ESLintClass extends Object {
|
|
139
|
+
lintText(content: string, options: {
|
|
140
|
+
filePath?: string;
|
|
141
|
+
warnIgnored?: boolean;
|
|
142
|
+
}): Promise<ESLintDocumentReport[]>;
|
|
143
|
+
isPathIgnored(path: string): Promise<boolean>;
|
|
144
|
+
getRulesMetaForResults?(results: ESLintDocumentReport[]): Record<string, RuleMetaData> | undefined;
|
|
145
|
+
calculateConfigForFile(path: string): Promise<ESLintConfig | undefined>;
|
|
146
|
+
isCLIEngine?: boolean;
|
|
147
|
+
}
|
|
148
|
+
declare namespace ESLintClass {
|
|
149
|
+
function getConfigType(eslint: ESLintClass): 'eslintrc' | 'flat';
|
|
150
|
+
}
|
|
151
|
+
interface ESLintClassConstructor {
|
|
152
|
+
configType?: 'eslintrc' | 'flat';
|
|
153
|
+
version?: string;
|
|
154
|
+
new (options: ESLintClassOptions): ESLintClass;
|
|
155
|
+
}
|
|
156
|
+
interface CLIEngineConstructor {
|
|
157
|
+
new (options: CLIOptions): CLIEngine;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* A loaded ESLint npm module.
|
|
161
|
+
*/
|
|
162
|
+
export type ESLintModule = {
|
|
163
|
+
ESLint: undefined;
|
|
164
|
+
CLIEngine: CLIEngineConstructor;
|
|
165
|
+
loadESLint?: undefined;
|
|
166
|
+
} | {
|
|
167
|
+
ESLint: ESLintClassConstructor;
|
|
168
|
+
CLIEngine: CLIEngineConstructor;
|
|
169
|
+
loadESLint?: undefined;
|
|
170
|
+
} | {
|
|
171
|
+
ESLint: ESLintClassConstructor;
|
|
172
|
+
isFlatConfig?: boolean;
|
|
173
|
+
CLIEngine: undefined;
|
|
174
|
+
loadESLint?: (options?: {
|
|
175
|
+
cwd?: string;
|
|
176
|
+
useFlatConfig?: boolean;
|
|
177
|
+
}) => Promise<ESLintClassConstructor>;
|
|
178
|
+
};
|
|
179
|
+
export declare namespace ESLintModule {
|
|
180
|
+
function hasLoadESLint(value: ESLintModule): value is {
|
|
181
|
+
ESLint: ESLintClassConstructor;
|
|
182
|
+
CLIEngine: undefined;
|
|
183
|
+
loadESLint: (options?: {
|
|
184
|
+
cwd?: string;
|
|
185
|
+
useFlatConfig?: boolean;
|
|
186
|
+
}) => Promise<ESLintClassConstructor>;
|
|
187
|
+
};
|
|
188
|
+
function hasESLintClass(value: ESLintModule): value is {
|
|
189
|
+
ESLint: ESLintClassConstructor;
|
|
190
|
+
CLIEngine: undefined;
|
|
191
|
+
};
|
|
192
|
+
function hasCLIEngine(value: ESLintModule): value is {
|
|
193
|
+
ESLint: undefined;
|
|
194
|
+
CLIEngine: CLIEngineConstructor;
|
|
195
|
+
};
|
|
196
|
+
function isFlatConfig(value: ESLintModule): value is {
|
|
197
|
+
ESLint: ESLintClassConstructor;
|
|
198
|
+
CLIEngine: undefined;
|
|
199
|
+
isFlatConfig: true;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
type RuleData = {
|
|
203
|
+
meta?: RuleMetaData;
|
|
204
|
+
};
|
|
205
|
+
declare namespace RuleData {
|
|
206
|
+
function hasMetaType(value: RuleMetaData | undefined): value is RuleMetaData & {
|
|
207
|
+
type: string;
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
interface CLIEngine {
|
|
211
|
+
executeOnText(content: string, file?: string, warn?: boolean): ESLintReport;
|
|
212
|
+
isPathIgnored(path: string): boolean;
|
|
213
|
+
getRules?(): Map<string, RuleData>;
|
|
214
|
+
getConfigForFile?(path: string): ESLintConfig;
|
|
215
|
+
}
|
|
216
|
+
declare namespace CLIEngine {
|
|
217
|
+
function hasRule(value: CLIEngine): value is CLIEngine & {
|
|
218
|
+
getRules(): Map<string, RuleData>;
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Class for dealing with Fixes.
|
|
223
|
+
*/
|
|
224
|
+
export declare class Fixes {
|
|
225
|
+
private edits;
|
|
226
|
+
constructor(edits: Map<string, Problem>);
|
|
227
|
+
static overlaps(a: FixableProblem | undefined, b: FixableProblem): boolean;
|
|
228
|
+
static sameRange(a: FixableProblem, b: FixableProblem): boolean;
|
|
229
|
+
isEmpty(): boolean;
|
|
230
|
+
getDocumentVersion(): number;
|
|
231
|
+
getScoped(diagnostics: Diagnostic[]): Problem[];
|
|
232
|
+
getAllSorted(): FixableProblem[];
|
|
233
|
+
getApplicable(): FixableProblem[];
|
|
234
|
+
}
|
|
235
|
+
export type SaveRuleConfigItem = {
|
|
236
|
+
offRules: Set<string>;
|
|
237
|
+
onRules: Set<string>;
|
|
238
|
+
options: ESLintOptions | undefined;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* Manages the special save rule configurations done in the VS Code settings.
|
|
242
|
+
*/
|
|
243
|
+
export declare namespace SaveRuleConfigs {
|
|
244
|
+
let inferFilePath: (documentOrUri: string | TextDocument | URI | undefined, useRealpaths: boolean) => string | undefined;
|
|
245
|
+
function get(uri: string, settings: TextDocumentSettings & {
|
|
246
|
+
library: ESLintModule;
|
|
247
|
+
}): Promise<SaveRuleConfigItem | undefined>;
|
|
248
|
+
function remove(key: string): boolean;
|
|
249
|
+
function clear(): void;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Manages rule severity overrides done using VS Code settings.
|
|
253
|
+
*/
|
|
254
|
+
export declare namespace RuleSeverities {
|
|
255
|
+
function getOverride(ruleId: string, customizations: RuleCustomization[], isFixable?: boolean): RuleSeverity | undefined;
|
|
256
|
+
function clear(): void;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Capture information necessary to compute code actions.
|
|
260
|
+
*/
|
|
261
|
+
export declare namespace CodeActions {
|
|
262
|
+
function get(uri: string): Map<string, Problem> | undefined;
|
|
263
|
+
function set(uri: string, value: Map<string, Problem>): void;
|
|
264
|
+
function remove(uri: string): boolean;
|
|
265
|
+
function record(document: TextDocument, diagnostic: Diagnostic, problem: ESLintProblem): void;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Wrapper round the ESLint npm module.
|
|
269
|
+
*/
|
|
270
|
+
export declare namespace ESLint {
|
|
271
|
+
function initialize($connection: ProposedFeatures.Connection, $documents: TextDocuments<TextDocument>, $inferFilePath: (documentOrUri: string | TextDocument | URI | undefined, useRealpaths: boolean) => string | undefined, $loadNodeModule: <T>(moduleName: string) => T | undefined): void;
|
|
272
|
+
function removeSettings(key: string): boolean;
|
|
273
|
+
function clearSettings(): void;
|
|
274
|
+
function unregisterAsFormatter(document: TextDocument): void;
|
|
275
|
+
function clearFormatters(): void;
|
|
276
|
+
function resolveSettings(document: TextDocument): Promise<TextDocumentSettings>;
|
|
277
|
+
function newClass(library: ESLintModule, newOptions: ESLintClassOptions | CLIOptions, settings: TextDocumentSettings): Promise<ESLintClass>;
|
|
278
|
+
function withClass<T>(func: (eslintClass: ESLintClass) => Promise<T>, settings: TextDocumentSettings & {
|
|
279
|
+
library: ESLintModule;
|
|
280
|
+
}, options?: ESLintClassOptions | CLIOptions): Promise<T>;
|
|
281
|
+
function getFilePath(document: TextDocument | undefined, settings: TextDocumentSettings): string | undefined;
|
|
282
|
+
function validate(document: TextDocument, settings: TextDocumentSettings & {
|
|
283
|
+
library: ESLintModule;
|
|
284
|
+
}): Promise<Diagnostic[]>;
|
|
285
|
+
function findWorkingDirectory(workspaceFolder: string, file: string | undefined): [string, boolean];
|
|
286
|
+
namespace ErrorHandlers {
|
|
287
|
+
const single: ((error: any, document: TextDocument, library: ESLintModule, settings: TextDocumentSettings) => Status | undefined)[];
|
|
288
|
+
function getMessage(err: any, document: TextDocument): string;
|
|
289
|
+
function clearNoConfigReported(): void;
|
|
290
|
+
function getConfigErrorReported(key: string): {
|
|
291
|
+
library: ESLintModule;
|
|
292
|
+
settings: TextDocumentSettings;
|
|
293
|
+
} | undefined;
|
|
294
|
+
function removeConfigErrorReported(key: string): boolean;
|
|
295
|
+
function clearMissingModuleReported(): void;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|