vscode-eslint 0.0.3 → 0.0.5
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 +9 -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/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,51 @@
|
|
|
1
|
+
export declare namespace Is {
|
|
2
|
+
function boolean(value: any): value is boolean;
|
|
3
|
+
function string(value: any): value is string;
|
|
4
|
+
function objectLiteral(value: any): value is object;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Converts a path to the OS representation,
|
|
8
|
+
* @param path the path to convert.
|
|
9
|
+
* @returns the converted path.
|
|
10
|
+
*/
|
|
11
|
+
export declare function toOSPath(path: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Converts a path to a posix path.
|
|
14
|
+
* @param path the path to convert.
|
|
15
|
+
* @returns the posix path.
|
|
16
|
+
*/
|
|
17
|
+
export declare function toPosixPath(path: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Find a ESLint installation at a given root path.
|
|
20
|
+
* @param rootPath the root path.
|
|
21
|
+
* @returns the eslint installation or the unresolved command eslint.
|
|
22
|
+
*/
|
|
23
|
+
export declare function findEslint(rootPath: string): Promise<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Converts a pattern in string from to a regular expression.
|
|
26
|
+
*
|
|
27
|
+
* @param pattern the pattern as a string to be converted
|
|
28
|
+
* @returns the regular expression or undefined if the pattern can't be converted.
|
|
29
|
+
*/
|
|
30
|
+
export declare function convert2RegExp(pattern: string): RegExp | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* A semaphore implementation.
|
|
33
|
+
*/
|
|
34
|
+
export declare class Semaphore<T = void> {
|
|
35
|
+
private _capacity;
|
|
36
|
+
private _active;
|
|
37
|
+
private _waiting;
|
|
38
|
+
constructor(capacity?: number);
|
|
39
|
+
/**
|
|
40
|
+
* Takes a lock and executes the thunk.
|
|
41
|
+
* @param thunk the thunk to execute
|
|
42
|
+
* @returns a promise for the result of the thunk
|
|
43
|
+
*/
|
|
44
|
+
lock(thunk: () => T | PromiseLike<T>): Promise<T>;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the numbers of the active thunks.
|
|
47
|
+
*/
|
|
48
|
+
get active(): number;
|
|
49
|
+
private runNext;
|
|
50
|
+
private doRunNext;
|
|
51
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Uri } from 'vscode';
|
|
2
|
+
export type ValidateItem = {
|
|
3
|
+
language: string;
|
|
4
|
+
autoFix?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare namespace ValidateItem {
|
|
7
|
+
function is(item: any): item is ValidateItem;
|
|
8
|
+
}
|
|
9
|
+
export type LegacyDirectoryItem = {
|
|
10
|
+
directory: string;
|
|
11
|
+
changeProcessCWD: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare namespace LegacyDirectoryItem {
|
|
14
|
+
function is(item: any): item is LegacyDirectoryItem;
|
|
15
|
+
}
|
|
16
|
+
export type PatternItem = {
|
|
17
|
+
pattern: string;
|
|
18
|
+
'!cwd'?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare namespace PatternItem {
|
|
21
|
+
function is(item: any): item is PatternItem;
|
|
22
|
+
}
|
|
23
|
+
export declare class Migration {
|
|
24
|
+
private workspaceConfig;
|
|
25
|
+
private eslintConfig;
|
|
26
|
+
private editorConfig;
|
|
27
|
+
private codeActionOnSave;
|
|
28
|
+
private languageSpecificSettings;
|
|
29
|
+
private autoFixOnSave;
|
|
30
|
+
private validate;
|
|
31
|
+
private workingDirectories;
|
|
32
|
+
private didChangeConfiguration;
|
|
33
|
+
constructor(resource: Uri);
|
|
34
|
+
record(): void;
|
|
35
|
+
captureDidChangeSetting(func: () => void): void;
|
|
36
|
+
private recordAutoFixOnSave;
|
|
37
|
+
private recordValidate;
|
|
38
|
+
private recordWorkingDirectories;
|
|
39
|
+
needsUpdate(): boolean;
|
|
40
|
+
update(): Promise<void>;
|
|
41
|
+
}
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A task provider that adds ESLint checking tasks.
|
|
3
|
+
*/
|
|
4
|
+
export declare class TaskProvider {
|
|
5
|
+
/**
|
|
6
|
+
* A Disposable to unregister the task provider inside
|
|
7
|
+
* VS Code.
|
|
8
|
+
*/
|
|
9
|
+
private taskProvider;
|
|
10
|
+
/**
|
|
11
|
+
* The actual providers per workspace folder.
|
|
12
|
+
*/
|
|
13
|
+
private readonly providers;
|
|
14
|
+
/**
|
|
15
|
+
* A disposable to unregister event listeners
|
|
16
|
+
*/
|
|
17
|
+
private disposable;
|
|
18
|
+
constructor();
|
|
19
|
+
start(): void;
|
|
20
|
+
dispose(): void;
|
|
21
|
+
/**
|
|
22
|
+
* The workspace folders have changed.
|
|
23
|
+
*/
|
|
24
|
+
private updateWorkspaceFolders;
|
|
25
|
+
/**
|
|
26
|
+
* The configuration has changed.
|
|
27
|
+
*/
|
|
28
|
+
private updateConfiguration;
|
|
29
|
+
private updateProvider;
|
|
30
|
+
private getTasks;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "vscode-eslint",
|
|
3
3
|
"displayName": "ESLint",
|
|
4
4
|
"description": "Integrates ESLint JavaScript into VS Code.",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.5",
|
|
6
6
|
"author": "Microsoft Corporation",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
"bin": {
|
|
17
17
|
"vscode-eslint": "bin/vscode-eslint"
|
|
18
18
|
},
|
|
19
|
+
"files": [
|
|
20
|
+
"bin",
|
|
21
|
+
"build",
|
|
22
|
+
"client/out",
|
|
23
|
+
"server/out",
|
|
24
|
+
"shared",
|
|
25
|
+
"eslint_icon.png"
|
|
26
|
+
],
|
|
19
27
|
"icon": "eslint_icon.png",
|
|
20
28
|
"categories": [
|
|
21
29
|
"Programming Languages",
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
export interface IDiffChange {
|
|
2
|
+
/**
|
|
3
|
+
* The position of the first element in the original sequence which
|
|
4
|
+
* this change affects.
|
|
5
|
+
*/
|
|
6
|
+
originalStart: number;
|
|
7
|
+
/**
|
|
8
|
+
* The number of elements from the original sequence which were
|
|
9
|
+
* affected.
|
|
10
|
+
*/
|
|
11
|
+
originalLength: number;
|
|
12
|
+
/**
|
|
13
|
+
* The position of the first element in the modified sequence which
|
|
14
|
+
* this change affects.
|
|
15
|
+
*/
|
|
16
|
+
modifiedStart: number;
|
|
17
|
+
/**
|
|
18
|
+
* The number of elements from the modified sequence which were
|
|
19
|
+
* affected (added).
|
|
20
|
+
*/
|
|
21
|
+
modifiedLength: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function stringDiff(original: string, modified: string, pretty: boolean): IDiffChange[];
|
|
24
|
+
interface ISequence {
|
|
25
|
+
getElements(): Int32Array;
|
|
26
|
+
}
|
|
27
|
+
interface IContinueProcessingPredicate {
|
|
28
|
+
(furthestOriginalIndex: number, matchLengthOfLongest: number): boolean;
|
|
29
|
+
}
|
|
30
|
+
interface IDiffResult {
|
|
31
|
+
quitEarly: boolean;
|
|
32
|
+
changes: IDiffChange[];
|
|
33
|
+
}
|
|
34
|
+
export declare class Debug {
|
|
35
|
+
static Assert(condition: boolean, message: string): void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* An implementation of the difference algorithm described in
|
|
39
|
+
* "An O(ND) Difference Algorithm and its variations" by Eugene W. Myers
|
|
40
|
+
*/
|
|
41
|
+
export declare class LcsDiff {
|
|
42
|
+
private readonly ContinueProcessingPredicate;
|
|
43
|
+
private readonly _hasStrings;
|
|
44
|
+
private readonly _originalStringElements;
|
|
45
|
+
private readonly _originalElementsOrHash;
|
|
46
|
+
private readonly _modifiedStringElements;
|
|
47
|
+
private readonly _modifiedElementsOrHash;
|
|
48
|
+
private m_forwardHistory;
|
|
49
|
+
private m_reverseHistory;
|
|
50
|
+
/**
|
|
51
|
+
* Constructs the DiffFinder
|
|
52
|
+
*/
|
|
53
|
+
constructor(originalSequence: ISequence, modifiedSequence: ISequence, continueProcessingPredicate?: IContinueProcessingPredicate | null);
|
|
54
|
+
private static _getElements;
|
|
55
|
+
private ElementsAreEqual;
|
|
56
|
+
private OriginalElementsAreEqual;
|
|
57
|
+
private ModifiedElementsAreEqual;
|
|
58
|
+
ComputeDiff(pretty: boolean): IDiffResult;
|
|
59
|
+
/**
|
|
60
|
+
* Computes the differences between the original and modified input
|
|
61
|
+
* sequences on the bounded range.
|
|
62
|
+
* @returns An array of the differences between the two input sequences.
|
|
63
|
+
*/
|
|
64
|
+
private _ComputeDiff;
|
|
65
|
+
/**
|
|
66
|
+
* Private helper method which computes the differences on the bounded range
|
|
67
|
+
* recursively.
|
|
68
|
+
* @returns An array of the differences between the two input sequences.
|
|
69
|
+
*/
|
|
70
|
+
private ComputeDiffRecursive;
|
|
71
|
+
private WALKTRACE;
|
|
72
|
+
/**
|
|
73
|
+
* Given the range to compute the diff on, this method finds the point:
|
|
74
|
+
* (midOriginal, midModified)
|
|
75
|
+
* that exists in the middle of the LCS of the two sequences and
|
|
76
|
+
* is the point at which the LCS problem may be broken down recursively.
|
|
77
|
+
* This method will try to keep the LCS trace in memory. If the LCS recursion
|
|
78
|
+
* point is calculated and the full trace is available in memory, then this method
|
|
79
|
+
* will return the change list.
|
|
80
|
+
* @param originalStart The start bound of the original sequence range
|
|
81
|
+
* @param originalEnd The end bound of the original sequence range
|
|
82
|
+
* @param modifiedStart The start bound of the modified sequence range
|
|
83
|
+
* @param modifiedEnd The end bound of the modified sequence range
|
|
84
|
+
* @param midOriginal The middle point of the original sequence range
|
|
85
|
+
* @param midModified The middle point of the modified sequence range
|
|
86
|
+
* @returns The diff changes, if available, otherwise null
|
|
87
|
+
*/
|
|
88
|
+
private ComputeRecursionPoint;
|
|
89
|
+
/**
|
|
90
|
+
* Shifts the given changes to provide a more intuitive diff.
|
|
91
|
+
* While the first element in a diff matches the first element after the diff,
|
|
92
|
+
* we shift the diff down.
|
|
93
|
+
*
|
|
94
|
+
* @param changes The list of changes to shift
|
|
95
|
+
* @returns The shifted changes
|
|
96
|
+
*/
|
|
97
|
+
private PrettifyChanges;
|
|
98
|
+
private _OriginalIsBoundary;
|
|
99
|
+
private _OriginalRegionIsBoundary;
|
|
100
|
+
private _ModifiedIsBoundary;
|
|
101
|
+
private _ModifiedRegionIsBoundary;
|
|
102
|
+
private _boundaryScore;
|
|
103
|
+
/**
|
|
104
|
+
* Concatenates the two input DiffChange lists and returns the resulting
|
|
105
|
+
* list.
|
|
106
|
+
* @param The left changes
|
|
107
|
+
* @param The right changes
|
|
108
|
+
* @returns The concatenated list
|
|
109
|
+
*/
|
|
110
|
+
private ConcatenateChanges;
|
|
111
|
+
/**
|
|
112
|
+
* Returns true if the two changes overlap and can be merged into a single
|
|
113
|
+
* change
|
|
114
|
+
* @param left The left change
|
|
115
|
+
* @param right The right change
|
|
116
|
+
* @param mergedChange The merged change if the two overlap, null otherwise
|
|
117
|
+
* @returns True if the two changes overlap
|
|
118
|
+
*/
|
|
119
|
+
private ChangesOverlap;
|
|
120
|
+
/**
|
|
121
|
+
* Helper method used to clip a diagonal index to the range of valid
|
|
122
|
+
* diagonals. This also decides whether or not the diagonal index,
|
|
123
|
+
* if it exceeds the boundary, should be clipped to the boundary or clipped
|
|
124
|
+
* one inside the boundary depending on the Even/Odd status of the boundary
|
|
125
|
+
* and numDifferences.
|
|
126
|
+
* @param diagonal The index of the diagonal to clip.
|
|
127
|
+
* @param numDifferences The current number of differences being iterated upon.
|
|
128
|
+
* @param diagonalBaseIndex The base reference diagonal.
|
|
129
|
+
* @param numDiagonals The total number of diagonals.
|
|
130
|
+
* @returns The clipped diagonal index.
|
|
131
|
+
*/
|
|
132
|
+
private ClipDiagonalBound;
|
|
133
|
+
}
|
|
134
|
+
export {};
|