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.
Files changed (180) hide show
  1. package/bin/vscode-eslint +24 -1
  2. package/client/out/client.d.ts +13 -0
  3. package/client/out/extension.d.ts +3 -0
  4. package/client/out/extension.js +2 -0
  5. package/client/out/extension.js.map +1 -0
  6. package/client/out/node-utils.d.ts +51 -0
  7. package/client/out/settings.d.ts +41 -0
  8. package/client/out/shared/customMessages.d.ts +89 -0
  9. package/client/out/shared/settings.d.ts +106 -0
  10. package/client/out/tasks.d.ts +31 -0
  11. package/client/out/tests/glob.test.d.ts +1 -0
  12. package/client/out/vscode-utils.d.ts +5 -0
  13. package/package.json +8 -1
  14. package/server/out/diff.d.ts +134 -0
  15. package/server/out/eslint.d.ts +298 -0
  16. package/server/out/eslintServer.d.ts +1 -0
  17. package/server/out/eslintServer.js +2 -0
  18. package/server/out/eslintServer.js.map +1 -0
  19. package/server/out/is.d.ts +3 -0
  20. package/server/out/languageDefaults.d.ts +6 -0
  21. package/server/out/linkedMap.d.ts +53 -0
  22. package/server/out/paths.d.ts +22 -0
  23. package/server/out/shared/customMessages.d.ts +89 -0
  24. package/server/out/shared/settings.d.ts +106 -0
  25. package/$shared/customMessages.ts +0 -113
  26. package/$shared/settings.ts +0 -189
  27. package/.CodeQL.yml +0 -5
  28. package/.azure-pipelines.yml +0 -27
  29. package/.gemini/agents/vscode-eslint.md +0 -23
  30. package/.github/commands.yml +0 -127
  31. package/.github/locker.yml +0 -6
  32. package/.github/needs_more_info.yml +0 -6
  33. package/.github/workflows/npm-publish.yml +0 -53
  34. package/.github/workflows/release-please.yml +0 -22
  35. package/.lsifrc.json +0 -4
  36. package/.vscode/launch.json +0 -20
  37. package/.vscode/settings.json +0 -52
  38. package/.vscode/spellright.dict +0 -8
  39. package/.vscode/tasks.json +0 -39
  40. package/.vscodeignore +0 -23
  41. package/CHANGELOG.md +0 -524
  42. package/SECURITY.md +0 -41
  43. package/agents.md +0 -36
  44. package/build/azure-pipelines/linux/build.yml +0 -14
  45. package/build/azure-pipelines/pre-release.yml +0 -42
  46. package/build/azure-pipelines/release.yml +0 -45
  47. package/build/azure-pipelines/win32/build.yml +0 -14
  48. package/build/bin/all.js +0 -29
  49. package/build/bin/linking.js +0 -102
  50. package/build/bin/symlink.js +0 -35
  51. package/client/.mocharc.json +0 -6
  52. package/client/agents.md +0 -5
  53. package/client/package-lock.json +0 -176
  54. package/client/package.json +0 -29
  55. package/client/src/client.ts +0 -992
  56. package/client/src/extension.ts +0 -180
  57. package/client/src/node-utils.ts +0 -393
  58. package/client/src/settings.ts +0 -379
  59. package/client/src/tasks.ts +0 -186
  60. package/client/src/tests/glob.test.ts +0 -31
  61. package/client/src/vscode-utils.ts +0 -28
  62. package/client/test/mocha.opts +0 -3
  63. package/client/tsconfig.json +0 -20
  64. package/client/webpack.config.js +0 -25
  65. package/contributing.md +0 -19
  66. package/esbuild.js +0 -62
  67. package/eslint.config.js +0 -129
  68. package/history/settings_1_9_x.md +0 -110
  69. package/images/2_1_10/eslint-dialog.png +0 -0
  70. package/images/2_1_10/eslint-status.png +0 -0
  71. package/package-json-schema.json +0 -9
  72. package/playgrounds/7.0/.eslintignore +0 -1
  73. package/playgrounds/7.0/.eslintrc.json +0 -71
  74. package/playgrounds/7.0/.vscode/settings.json +0 -85
  75. package/playgrounds/7.0/app.js +0 -12
  76. package/playgrounds/7.0/build/.eslintignore +0 -1
  77. package/playgrounds/7.0/build/.eslintrc.json +0 -30
  78. package/playgrounds/7.0/build/build.js +0 -11
  79. package/playgrounds/7.0/jsconfig.json +0 -5
  80. package/playgrounds/7.0/package-lock.json +0 -2133
  81. package/playgrounds/7.0/package.json +0 -10
  82. package/playgrounds/7.0/readme.md +0 -0
  83. package/playgrounds/7.0/subDir/sub.js +0 -11
  84. package/playgrounds/7.0/subDir/test.jsx +0 -10
  85. package/playgrounds/7.0/test.js +0 -11
  86. package/playgrounds/7.0/test.sh +0 -1
  87. package/playgrounds/7.0/test.vue +0 -33
  88. package/playgrounds/7.0/test2.html +0 -8
  89. package/playgrounds/8.0/.eslintignore +0 -1
  90. package/playgrounds/8.0/.eslintrc.json +0 -71
  91. package/playgrounds/8.0/.vscode/settings.json +0 -91
  92. package/playgrounds/8.0/app.js +0 -12
  93. package/playgrounds/8.0/build/.eslintignore +0 -1
  94. package/playgrounds/8.0/build/.eslintrc.json +0 -30
  95. package/playgrounds/8.0/build/build.js +0 -11
  96. package/playgrounds/8.0/jsconfig.json +0 -5
  97. package/playgrounds/8.0/package-lock.json +0 -2321
  98. package/playgrounds/8.0/package.json +0 -10
  99. package/playgrounds/8.0/readme.md +0 -17
  100. package/playgrounds/8.0/subDir/sub.js +0 -11
  101. package/playgrounds/8.0/subDir/test.jsx +0 -10
  102. package/playgrounds/8.0/test.ipynb +0 -49
  103. package/playgrounds/8.0/test.js +0 -3
  104. package/playgrounds/8.0/test.sh +0 -1
  105. package/playgrounds/8.0/test.vue +0 -33
  106. package/playgrounds/8.0/test2.html +0 -8
  107. package/playgrounds/9.0/flat/.vscode/settings.json +0 -3
  108. package/playgrounds/9.0/flat/app.js +0 -12
  109. package/playgrounds/9.0/flat/dist/ignore.js +0 -12
  110. package/playgrounds/9.0/flat/eslint.config.js +0 -61
  111. package/playgrounds/9.0/flat/package-lock.json +0 -1053
  112. package/playgrounds/9.0/flat/package.json +0 -9
  113. package/playgrounds/9.0/rc/.eslintrc.json +0 -57
  114. package/playgrounds/9.0/rc/.vscode/settings.json +0 -3
  115. package/playgrounds/9.0/rc/app.js +0 -12
  116. package/playgrounds/9.0/rc/package-lock.json +0 -1345
  117. package/playgrounds/9.0/rc/package.json +0 -9
  118. package/playgrounds/flat-config/.vscode/settings.json +0 -22
  119. package/playgrounds/flat-config/app.js +0 -12
  120. package/playgrounds/flat-config/eslint.config.js +0 -51
  121. package/playgrounds/flat-config/package-lock.json +0 -2733
  122. package/playgrounds/flat-config/package.json +0 -12
  123. package/playgrounds/flat-config/sub/sub.js +0 -2
  124. package/playgrounds/flat-config/test.ts +0 -7
  125. package/playgrounds/flat-config/tsconfig.json +0 -11
  126. package/playgrounds/flat-config-fail/f1/app.js +0 -12
  127. package/playgrounds/flat-config-fail/f1/eslint.config.js +0 -51
  128. package/playgrounds/flat-config-fail/package-lock.json +0 -1683
  129. package/playgrounds/flat-config-fail/package.json +0 -11
  130. package/playgrounds/flat-config-mjs/.vscode/settings.json +0 -21
  131. package/playgrounds/flat-config-mjs/app.js +0 -12
  132. package/playgrounds/flat-config-mjs/eslint.config.mjs +0 -53
  133. package/playgrounds/flat-config-mjs/package-lock.json +0 -2860
  134. package/playgrounds/flat-config-mjs/package.json +0 -11
  135. package/playgrounds/flat-config-mjs/sub/sub.js +0 -2
  136. package/playgrounds/flat-config-mjs/test.ts +0 -7
  137. package/playgrounds/flat-config-mjs/tsconfig.json +0 -11
  138. package/playgrounds/load-eslint/.vscode/settings.json +0 -21
  139. package/playgrounds/load-eslint/app.js +0 -12
  140. package/playgrounds/load-eslint/eslint.config.js +0 -51
  141. package/playgrounds/load-eslint/package-lock.json +0 -2860
  142. package/playgrounds/load-eslint/package.json +0 -11
  143. package/playgrounds/load-eslint/sub/sub.js +0 -2
  144. package/playgrounds/load-eslint/test.ts +0 -7
  145. package/playgrounds/load-eslint/tsconfig.json +0 -11
  146. package/playgrounds/noLib/test.js +0 -22
  147. package/playgrounds/noWD/.vscode/settings.json +0 -2
  148. package/playgrounds/noWD/src/.eslintrc.json +0 -18
  149. package/playgrounds/noWD/src/package-lock.json +0 -2812
  150. package/playgrounds/noWD/src/package.json +0 -12
  151. package/playgrounds/noWD/src/test.js +0 -3
  152. package/playgrounds/notebooks/notebook.ipynb +0 -7072
  153. package/playgrounds/notebooks/notebook2.ipynb +0 -20
  154. package/playgrounds/testing.code-workspace +0 -28
  155. package/playgrounds/ts/.eslintrc.base.json +0 -23
  156. package/playgrounds/ts/.eslintrc.json +0 -191
  157. package/playgrounds/ts/.vscode/settings.json +0 -12
  158. package/playgrounds/ts/package-lock.json +0 -2687
  159. package/playgrounds/ts/package.json +0 -11
  160. package/playgrounds/ts/test copy.ts +0 -4
  161. package/playgrounds/ts/test.ipynb +0 -49
  162. package/playgrounds/ts/test.ts +0 -4
  163. package/playgrounds/ts/test.tsx +0 -14
  164. package/playgrounds/ts/tsconfig.json +0 -100
  165. package/server/agents.md +0 -9
  166. package/server/package-lock.json +0 -93
  167. package/server/package.json +0 -32
  168. package/server/src/diff.ts +0 -1079
  169. package/server/src/eslint.ts +0 -1471
  170. package/server/src/eslintServer.ts +0 -865
  171. package/server/src/is.ts +0 -18
  172. package/server/src/languageDefaults.ts +0 -40
  173. package/server/src/linkedMap.ts +0 -448
  174. package/server/src/paths.ts +0 -128
  175. package/server/src/thenable.d.ts +0 -5
  176. package/server/tsconfig.json +0 -21
  177. package/server/webpack.config.js +0 -25
  178. package/shared.webpack.config.js +0 -59
  179. package/tsconfig.base.json +0 -9
  180. package/tsconfig.json +0 -21
@@ -0,0 +1,3 @@
1
+ export declare function boolean(value: any): value is boolean;
2
+ export declare function nullOrUndefined(value: any): value is null | undefined;
3
+ export declare function string(value: any): value is string;
@@ -0,0 +1,6 @@
1
+ declare namespace LanguageDefaults {
2
+ function getLineComment(languageId: string): string;
3
+ function getBlockComment(languageId: string): [string, string];
4
+ function getExtension(languageId: string): string | undefined;
5
+ }
6
+ export default LanguageDefaults;
@@ -0,0 +1,53 @@
1
+ export declare namespace Touch {
2
+ const None: 0;
3
+ const First: 1;
4
+ const AsOld: 1;
5
+ const Last: 2;
6
+ const AsNew: 2;
7
+ }
8
+ export type Touch = 0 | 1 | 2;
9
+ export declare class LinkedMap<K, V> implements Map<K, V> {
10
+ readonly [Symbol.toStringTag] = "LinkedMap";
11
+ private _map;
12
+ private _head;
13
+ private _tail;
14
+ private _size;
15
+ private _state;
16
+ constructor();
17
+ clear(): void;
18
+ isEmpty(): boolean;
19
+ get size(): number;
20
+ get first(): V | undefined;
21
+ get last(): V | undefined;
22
+ has(key: K): boolean;
23
+ get(key: K, touch?: Touch): V | undefined;
24
+ set(key: K, value: V, touch?: Touch): this;
25
+ delete(key: K): boolean;
26
+ remove(key: K): V | undefined;
27
+ shift(): V | undefined;
28
+ forEach(callbackfn: (value: V, key: K, map: LinkedMap<K, V>) => void, thisArg?: any): void;
29
+ keys(): IterableIterator<K>;
30
+ values(): IterableIterator<V>;
31
+ entries(): IterableIterator<[K, V]>;
32
+ [Symbol.iterator](): IterableIterator<[K, V]>;
33
+ protected trimOld(newSize: number): void;
34
+ private addItemFirst;
35
+ private addItemLast;
36
+ private removeItem;
37
+ private touch;
38
+ toJSON(): [K, V][];
39
+ fromJSON(data: [K, V][]): void;
40
+ }
41
+ export declare class LRUCache<K, V> extends LinkedMap<K, V> {
42
+ private _limit;
43
+ private _ratio;
44
+ constructor(limit: number, ratio?: number);
45
+ get limit(): number;
46
+ set limit(limit: number);
47
+ get ratio(): number;
48
+ set ratio(ratio: number);
49
+ get(key: K, touch?: Touch): V | undefined;
50
+ peek(key: K): V | undefined;
51
+ set(key: K, value: V): this;
52
+ private checkTrim;
53
+ }
@@ -0,0 +1,22 @@
1
+ import { URI } from 'vscode-uri';
2
+ import { TextDocument } from 'vscode-languageserver-textdocument';
3
+ /**
4
+ * Special functions to deal with path conversions in the context of ESLint
5
+ */
6
+ /**
7
+ * Normalizes the drive letter to upper case which is the default in Node but not in
8
+ * VS Code.
9
+ */
10
+ export declare function normalizeDriveLetter(path: string): string;
11
+ /**
12
+ * Check if the path follows this pattern: `\\hostname\sharename`.
13
+ *
14
+ * @see https://msdn.microsoft.com/en-us/library/gg465305.aspx
15
+ * @return A boolean indication if the path is a UNC path, on none-windows
16
+ * always false.
17
+ */
18
+ export declare function isUNC(path: string): boolean;
19
+ export declare function getFileSystemPath(uri: URI, useRealpaths: boolean): string;
20
+ export declare function normalizePath(path: string): string;
21
+ export declare function normalizePath(path: undefined): undefined;
22
+ export declare function getUri(documentOrUri: string | TextDocument | URI): URI;
@@ -0,0 +1,89 @@
1
+ import { NotificationType, NotificationType0, RequestType, TextDocumentIdentifier } from 'vscode-languageserver-protocol';
2
+ export declare enum Status {
3
+ ok = 1,
4
+ warn = 2,
5
+ error = 3
6
+ }
7
+ export type StatusParams = {
8
+ uri: string;
9
+ state: Status;
10
+ validationTime?: number;
11
+ };
12
+ /**
13
+ * The status notification is sent from the server to the client to
14
+ * inform the client about server status changes.
15
+ */
16
+ export declare namespace StatusNotification {
17
+ const method: 'eslint/status';
18
+ const type: NotificationType<StatusParams>;
19
+ }
20
+ export type NoConfigParams = {
21
+ message: string;
22
+ document: TextDocumentIdentifier;
23
+ };
24
+ export type NoConfigResult = {};
25
+ /**
26
+ * The NoConfigRequest is sent from the server to the client to inform
27
+ * the client that no eslint configuration file could be found when
28
+ * trying to lint a file.
29
+ */
30
+ export declare namespace NoConfigRequest {
31
+ const method: 'eslint/noConfig';
32
+ const type: RequestType<NoConfigParams, NoConfigResult, void>;
33
+ }
34
+ export type NoESLintLibraryParams = {
35
+ source: TextDocumentIdentifier;
36
+ };
37
+ export type NoESLintLibraryResult = {};
38
+ /**
39
+ * The NoESLintLibraryRequest is sent from the server to the client to
40
+ * inform the client that no eslint library could be found when trying
41
+ * to lint a file.
42
+ */
43
+ export declare namespace NoESLintLibraryRequest {
44
+ const method: 'eslint/noLibrary';
45
+ const type: RequestType<NoESLintLibraryParams, NoESLintLibraryResult, void>;
46
+ }
47
+ export type OpenESLintDocParams = {
48
+ url: string;
49
+ };
50
+ export type OpenESLintDocResult = {};
51
+ /**
52
+ * The eslint/openDoc request is sent from the server to the client to
53
+ * ask the client to open the documentation URI for a given
54
+ * ESLint rule.
55
+ */
56
+ export declare namespace OpenESLintDocRequest {
57
+ const method: 'eslint/openDoc';
58
+ const type: RequestType<OpenESLintDocParams, OpenESLintDocResult, void>;
59
+ }
60
+ export type ProbeFailedParams = {
61
+ textDocument: TextDocumentIdentifier;
62
+ };
63
+ /**
64
+ * The eslint/probeFailed request is sent from the server to the client
65
+ * to tell the client the the lint probing for a certain document has
66
+ * failed and that there is no need to sync that document to the server
67
+ * anymore.
68
+ */
69
+ export declare namespace ProbeFailedRequest {
70
+ const method: 'eslint/probeFailed';
71
+ const type: RequestType<ProbeFailedParams, void, void>;
72
+ }
73
+ /**
74
+ * The eslint/showOutputChannel notification is sent from the server to
75
+ * the client to ask the client to reveal it's output channel.
76
+ */
77
+ export declare namespace ShowOutputChannel {
78
+ const method: 'eslint/showOutputChannel';
79
+ const type: NotificationType0;
80
+ }
81
+ /**
82
+ * The eslint/exitCalled notification is sent from the server to the client
83
+ * to inform the client that a process.exit call on the server got intercepted.
84
+ * The call was very likely made by an ESLint plugin.
85
+ */
86
+ export declare namespace ExitCalled {
87
+ const method: 'eslint/exitCalled';
88
+ const type: NotificationType<[number, string]>;
89
+ }
@@ -0,0 +1,106 @@
1
+ import { WorkspaceFolder } from 'vscode-languageserver-protocol';
2
+ export declare enum Validate {
3
+ on = "on",
4
+ off = "off",
5
+ probe = "probe"
6
+ }
7
+ export type CodeActionSettings = {
8
+ disableRuleComment: {
9
+ enable: boolean;
10
+ location: 'separateLine' | 'sameLine';
11
+ commentStyle: 'line' | 'block';
12
+ };
13
+ showDocumentation: {
14
+ enable: boolean;
15
+ };
16
+ };
17
+ export declare enum CodeActionsOnSaveMode {
18
+ all = "all",
19
+ problems = "problems"
20
+ }
21
+ export declare namespace CodeActionsOnSaveMode {
22
+ function from(value: string | undefined | null): CodeActionsOnSaveMode;
23
+ }
24
+ export declare namespace CodeActionsOnSaveRules {
25
+ function from(value: string[] | undefined | null): string[] | undefined;
26
+ }
27
+ export declare namespace CodeActionsOnSaveOptions {
28
+ function from(value: object | undefined | null): ESLintOptions | undefined;
29
+ }
30
+ export type CodeActionsOnSaveSettings = {
31
+ mode: CodeActionsOnSaveMode;
32
+ rules?: string[];
33
+ options?: ESLintOptions;
34
+ };
35
+ export declare enum ESLintSeverity {
36
+ off = "off",
37
+ warn = "warn",
38
+ error = "error"
39
+ }
40
+ export declare namespace ESLintSeverity {
41
+ function from(value: string | undefined | null): ESLintSeverity;
42
+ }
43
+ export declare enum RuleSeverity {
44
+ info = "info",
45
+ warn = "warn",
46
+ error = "error",
47
+ off = "off",
48
+ default = "default",
49
+ downgrade = "downgrade",
50
+ upgrade = "upgrade"
51
+ }
52
+ export type RuleCustomization = {
53
+ rule: string;
54
+ severity: RuleSeverity;
55
+ /** Only apply to autofixable rules */
56
+ fixable?: boolean;
57
+ };
58
+ export type RunValues = 'onType' | 'onSave';
59
+ export declare enum ModeEnum {
60
+ auto = "auto",
61
+ location = "location"
62
+ }
63
+ export declare namespace ModeEnum {
64
+ function is(value: string): value is ModeEnum;
65
+ }
66
+ export type ModeItem = {
67
+ mode: ModeEnum;
68
+ };
69
+ export declare namespace ModeItem {
70
+ function is(item: any): item is ModeItem;
71
+ }
72
+ export type DirectoryItem = {
73
+ directory: string;
74
+ '!cwd'?: boolean;
75
+ };
76
+ export declare namespace DirectoryItem {
77
+ function is(item: any): item is DirectoryItem;
78
+ }
79
+ export type PackageManagers = 'npm' | 'yarn' | 'pnpm';
80
+ export type ESLintOptions = object & {
81
+ fixTypes?: string[];
82
+ };
83
+ export type ConfigurationSettings = {
84
+ validate: Validate;
85
+ packageManager: PackageManagers;
86
+ useESLintClass: boolean;
87
+ useFlatConfig?: boolean | undefined;
88
+ useRealpaths: boolean;
89
+ experimental?: {
90
+ useFlatConfig: boolean;
91
+ };
92
+ codeAction: CodeActionSettings;
93
+ codeActionOnSave: CodeActionsOnSaveSettings;
94
+ format: boolean;
95
+ quiet: boolean;
96
+ onIgnoredFiles: ESLintSeverity;
97
+ options: ESLintOptions | undefined;
98
+ rulesCustomizations: RuleCustomization[];
99
+ run: RunValues;
100
+ problems: {
101
+ shortenToSingleLine: boolean;
102
+ };
103
+ nodePath: string | null;
104
+ workspaceFolder: WorkspaceFolder | undefined;
105
+ workingDirectory: ModeItem | DirectoryItem | undefined;
106
+ };
@@ -1,113 +0,0 @@
1
- /* --------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- * ------------------------------------------------------------------------------------------ */
5
-
6
- import { NotificationType, NotificationType0, RequestType, TextDocumentIdentifier } from 'vscode-languageserver-protocol';
7
-
8
- export enum Status {
9
- ok = 1,
10
- warn = 2,
11
- error = 3
12
- }
13
-
14
- export type StatusParams = {
15
- uri: string;
16
- state: Status;
17
- validationTime?: number;
18
- };
19
-
20
- /**
21
- * The status notification is sent from the server to the client to
22
- * inform the client about server status changes.
23
- */
24
- export namespace StatusNotification {
25
- export const method: 'eslint/status' = 'eslint/status';
26
- export const type = new NotificationType<StatusParams>(method);
27
- }
28
-
29
- export type NoConfigParams = {
30
- message: string;
31
- document: TextDocumentIdentifier;
32
- };
33
-
34
- export type NoConfigResult = {
35
- };
36
-
37
- /**
38
- * The NoConfigRequest is sent from the server to the client to inform
39
- * the client that no eslint configuration file could be found when
40
- * trying to lint a file.
41
- */
42
- export namespace NoConfigRequest {
43
- export const method: 'eslint/noConfig' = 'eslint/noConfig';
44
- export const type = new RequestType<NoConfigParams, NoConfigResult, void>(method);
45
- }
46
-
47
- export type NoESLintLibraryParams = {
48
- source: TextDocumentIdentifier;
49
- };
50
-
51
- export type NoESLintLibraryResult = {
52
- };
53
-
54
- /**
55
- * The NoESLintLibraryRequest is sent from the server to the client to
56
- * inform the client that no eslint library could be found when trying
57
- * to lint a file.
58
- */
59
- export namespace NoESLintLibraryRequest {
60
- export const method: 'eslint/noLibrary' = 'eslint/noLibrary';
61
- export const type = new RequestType<NoESLintLibraryParams, NoESLintLibraryResult, void>(method);
62
- }
63
-
64
- export type OpenESLintDocParams = {
65
- url: string;
66
- };
67
-
68
- export type OpenESLintDocResult = {
69
- };
70
-
71
- /**
72
- * The eslint/openDoc request is sent from the server to the client to
73
- * ask the client to open the documentation URI for a given
74
- * ESLint rule.
75
- */
76
- export namespace OpenESLintDocRequest {
77
- export const method: 'eslint/openDoc' = 'eslint/openDoc';
78
- export const type = new RequestType<OpenESLintDocParams, OpenESLintDocResult, void>(method);
79
- }
80
-
81
- export type ProbeFailedParams = {
82
- textDocument: TextDocumentIdentifier;
83
- };
84
-
85
- /**
86
- * The eslint/probeFailed request is sent from the server to the client
87
- * to tell the client the the lint probing for a certain document has
88
- * failed and that there is no need to sync that document to the server
89
- * anymore.
90
- */
91
- export namespace ProbeFailedRequest {
92
- export const method: 'eslint/probeFailed' = 'eslint/probeFailed';
93
- export const type = new RequestType<ProbeFailedParams, void, void>(method);
94
- }
95
-
96
- /**
97
- * The eslint/showOutputChannel notification is sent from the server to
98
- * the client to ask the client to reveal it's output channel.
99
- */
100
- export namespace ShowOutputChannel {
101
- export const method: 'eslint/showOutputChannel' = 'eslint/showOutputChannel';
102
- export const type = new NotificationType0('eslint/showOutputChannel');
103
- }
104
-
105
- /**
106
- * The eslint/exitCalled notification is sent from the server to the client
107
- * to inform the client that a process.exit call on the server got intercepted.
108
- * The call was very likely made by an ESLint plugin.
109
- */
110
- export namespace ExitCalled {
111
- export const method: 'eslint/exitCalled' = 'eslint/exitCalled';
112
- export const type = new NotificationType<[number, string]>(method);
113
- }
@@ -1,189 +0,0 @@
1
- /* --------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- * ------------------------------------------------------------------------------------------ */
5
-
6
- import {
7
- WorkspaceFolder
8
- } from 'vscode-languageserver-protocol';
9
-
10
- namespace Is {
11
- const toString = Object.prototype.toString;
12
-
13
- export function boolean(value: any): value is boolean {
14
- return value === true || value === false;
15
- }
16
-
17
- export function string(value: any): value is string {
18
- return toString.call(value) === '[object String]';
19
- }
20
- }
21
-
22
- export enum Validate {
23
- on = 'on',
24
- off = 'off',
25
- probe = 'probe'
26
- }
27
-
28
- export type CodeActionSettings = {
29
- disableRuleComment: {
30
- enable: boolean;
31
- location: 'separateLine' | 'sameLine';
32
- commentStyle: 'line' | 'block';
33
- };
34
- showDocumentation: {
35
- enable: boolean;
36
- };
37
- };
38
-
39
- export enum CodeActionsOnSaveMode {
40
- all = 'all',
41
- problems = 'problems'
42
- }
43
-
44
- export namespace CodeActionsOnSaveMode {
45
- export function from(value: string | undefined | null): CodeActionsOnSaveMode {
46
- if (value === undefined || value === null || !Is.string(value)) {
47
- return CodeActionsOnSaveMode.all;
48
- }
49
- switch(value.toLowerCase()) {
50
- case CodeActionsOnSaveMode.problems:
51
- return CodeActionsOnSaveMode.problems;
52
- default:
53
- return CodeActionsOnSaveMode.all;
54
- }
55
- }
56
- }
57
-
58
- export namespace CodeActionsOnSaveRules {
59
- export function from(value: string[] | undefined | null): string[] | undefined {
60
- if (value === undefined || value === null || !Array.isArray(value)) {
61
- return undefined;
62
- }
63
- return value.filter(item => Is.string(item));
64
- }
65
- }
66
-
67
- export namespace CodeActionsOnSaveOptions {
68
- export function from(value: object | undefined | null): ESLintOptions | undefined {
69
- if (value === undefined || value === null || typeof value !== 'object') {
70
- return undefined;
71
- }
72
- return value;
73
- }
74
- }
75
-
76
- export type CodeActionsOnSaveSettings = {
77
- mode: CodeActionsOnSaveMode;
78
- rules?: string[];
79
- options?: ESLintOptions;
80
- };
81
-
82
- export enum ESLintSeverity {
83
- off = 'off',
84
- warn = 'warn',
85
- error = 'error'
86
- }
87
-
88
- export namespace ESLintSeverity {
89
- export function from(value: string | undefined | null): ESLintSeverity {
90
- if (value === undefined || value === null) {
91
- return ESLintSeverity.off;
92
- }
93
- switch (value.toLowerCase()) {
94
- case ESLintSeverity.off:
95
- return ESLintSeverity.off;
96
- case ESLintSeverity.warn:
97
- return ESLintSeverity.warn;
98
- case ESLintSeverity.error:
99
- return ESLintSeverity.error;
100
- default:
101
- return ESLintSeverity.off;
102
- }
103
- }
104
- }
105
-
106
- export enum RuleSeverity {
107
- // Original ESLint values
108
- info = 'info',
109
- warn = 'warn',
110
- error = 'error',
111
- off = 'off',
112
-
113
- // Added severity override changes
114
- default = 'default',
115
- downgrade = 'downgrade',
116
- upgrade = 'upgrade'
117
- }
118
-
119
- export type RuleCustomization = {
120
- rule: string;
121
- severity: RuleSeverity;
122
- /** Only apply to autofixable rules */
123
- fixable?: boolean;
124
- };
125
-
126
- export type RunValues = 'onType' | 'onSave';
127
-
128
- export enum ModeEnum {
129
- auto = 'auto',
130
- location = 'location'
131
- }
132
-
133
- export namespace ModeEnum {
134
- export function is(value: string): value is ModeEnum {
135
- return value === ModeEnum.auto || value === ModeEnum.location;
136
- }
137
- }
138
-
139
- export type ModeItem = {
140
- mode: ModeEnum;
141
- };
142
-
143
- export namespace ModeItem {
144
- export function is(item: any): item is ModeItem {
145
- const candidate = item as ModeItem;
146
- return candidate && ModeEnum.is(candidate.mode);
147
- }
148
- }
149
-
150
- export type DirectoryItem = {
151
- directory: string;
152
- '!cwd'?: boolean;
153
- };
154
-
155
- export namespace DirectoryItem {
156
- export function is(item: any): item is DirectoryItem {
157
- const candidate = item as DirectoryItem;
158
- return candidate && Is.string(candidate.directory) && (Is.boolean(candidate['!cwd']) || candidate['!cwd'] === undefined);
159
- }
160
- }
161
-
162
- export type PackageManagers = 'npm' | 'yarn' | 'pnpm';
163
-
164
- export type ESLintOptions = object & { fixTypes?: string[] };
165
-
166
- export type ConfigurationSettings = {
167
- validate: Validate;
168
- packageManager: PackageManagers;
169
- useESLintClass: boolean;
170
- useFlatConfig?: boolean | undefined;
171
- useRealpaths: boolean;
172
- experimental?: {
173
- useFlatConfig: boolean;
174
- };
175
- codeAction: CodeActionSettings;
176
- codeActionOnSave: CodeActionsOnSaveSettings;
177
- format: boolean;
178
- quiet: boolean;
179
- onIgnoredFiles: ESLintSeverity;
180
- options: ESLintOptions | undefined;
181
- rulesCustomizations: RuleCustomization[];
182
- run: RunValues;
183
- problems: {
184
- shortenToSingleLine: boolean;
185
- };
186
- nodePath: string | null;
187
- workspaceFolder: WorkspaceFolder | undefined;
188
- workingDirectory: ModeItem | DirectoryItem | undefined;
189
- };
package/.CodeQL.yml DELETED
@@ -1,5 +0,0 @@
1
- path_classifiers:
2
- tests:
3
- - playgrounds
4
- library:
5
- - "node_modules/**"
@@ -1,27 +0,0 @@
1
- trigger:
2
- batch: true
3
- branches:
4
- include:
5
- - '*'
6
-
7
- pr:
8
- branches:
9
- include:
10
- - main
11
- - release/*
12
-
13
- variables:
14
- Codeql.Enabled: true
15
-
16
- jobs:
17
- - job: Windows
18
- pool:
19
- vmImage: 'windows-latest'
20
- steps:
21
- - template: build/azure-pipelines/win32/build.yml
22
-
23
- - job: Linux
24
- pool:
25
- vmImage: 'ubuntu-latest'
26
- steps:
27
- - template: build/azure-pipelines/linux/build.yml
@@ -1,23 +0,0 @@
1
- ---
2
- name: vscode-eslint-agent
3
- description: Specialized agent that uses the vscode-eslint LSP server for advanced linting and code analysis.
4
- kind: local
5
- # Note: This binary currently speaks LSP. If using as an MCP server, a bridge may be required.
6
- mcpServers:
7
- eslint-lsp:
8
- command: "node"
9
- args: ["./node_modules/.bin/vscode-eslint", "--stdio"]
10
- tools:
11
- - mcp_eslint-lsp_*
12
- ---
13
-
14
- # VSCode ESLint Agent
15
-
16
- You are an expert at JavaScript/TypeScript linting using the `vscode-eslint` LSP server.
17
- Your role is to:
18
- 1. Analyze code for style and correctness issues.
19
- 2. Provide precise fixes for identified problems.
20
- 3. Help the user understand complex ESLint configurations and rules.
21
-
22
- You have access to the `vscode-eslint` binary via an MCP-to-LSP bridge (assumed).
23
- If you cannot communicate with the server, report the error to the user.