eslint-interactive 13.0.1 → 14.0.0
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/README.md +19 -10
- package/dist/action/convert-error-to-warning-per-file.d.ts +2 -4
- package/dist/action/convert-error-to-warning-per-file.d.ts.map +1 -1
- package/dist/action/convert-error-to-warning-per-file.js +2 -2
- package/dist/action/convert-error-to-warning-per-file.js.map +1 -1
- package/dist/action/disable-per-file.d.ts +2 -4
- package/dist/action/disable-per-file.d.ts.map +1 -1
- package/dist/action/disable-per-file.js +2 -2
- package/dist/action/disable-per-file.js.map +1 -1
- package/dist/action/disable-per-line.d.ts +2 -4
- package/dist/action/disable-per-line.d.ts.map +1 -1
- package/dist/action/disable-per-line.js +2 -2
- package/dist/action/disable-per-line.js.map +1 -1
- package/dist/action/fix.d.ts +2 -4
- package/dist/action/fix.d.ts.map +1 -1
- package/dist/action/fix.js +2 -2
- package/dist/action/fix.js.map +1 -1
- package/dist/action/print-result-details.d.ts +2 -3
- package/dist/action/print-result-details.d.ts.map +1 -1
- package/dist/action/print-result-details.js +3 -2
- package/dist/action/print-result-details.js.map +1 -1
- package/dist/cli/log.d.ts +1 -0
- package/dist/cli/log.d.ts.map +1 -1
- package/dist/cli/log.js +25 -0
- package/dist/cli/log.js.map +1 -1
- package/dist/cli/parse-argv.d.ts.map +1 -1
- package/dist/cli/parse-argv.js +31 -10
- package/dist/cli/parse-argv.js.map +1 -1
- package/dist/cli/prompt.d.ts.map +1 -1
- package/dist/cli/prompt.js +53 -91
- package/dist/cli/prompt.js.map +1 -1
- package/dist/cli/run.d.ts +1 -3
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +3 -27
- package/dist/cli/run.js.map +1 -1
- package/dist/core.d.ts +2 -2
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +10 -7
- package/dist/core.js.map +1 -1
- package/dist/fix/disable-per-file.d.ts +1 -1
- package/dist/fix/disable-per-file.d.ts.map +1 -1
- package/dist/fix/disable-per-line.d.ts +1 -1
- package/dist/fix/disable-per-line.d.ts.map +1 -1
- package/dist/formatter/filter-rule-statistics.d.ts +9 -0
- package/dist/formatter/filter-rule-statistics.d.ts.map +1 -0
- package/dist/formatter/filter-rule-statistics.js +22 -0
- package/dist/formatter/filter-rule-statistics.js.map +1 -0
- package/dist/formatter/format-by-rules.d.ts +4 -3
- package/dist/formatter/format-by-rules.d.ts.map +1 -1
- package/dist/formatter/format-by-rules.js +7 -5
- package/dist/formatter/format-by-rules.js.map +1 -1
- package/dist/formatter/index.d.ts +3 -2
- package/dist/formatter/index.d.ts.map +1 -1
- package/dist/formatter/index.js +3 -2
- package/dist/formatter/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/scene/check-results.d.ts.map +1 -1
- package/dist/scene/check-results.js +2 -5
- package/dist/scene/check-results.js.map +1 -1
- package/dist/scene/lint.d.ts +2 -3
- package/dist/scene/lint.d.ts.map +1 -1
- package/dist/scene/lint.js +13 -9
- package/dist/scene/lint.js.map +1 -1
- package/dist/scene/select-action.d.ts +2 -3
- package/dist/scene/select-action.d.ts.map +1 -1
- package/dist/scene/select-action.js.map +1 -1
- package/dist/scene/select-rule-ids.d.ts +2 -3
- package/dist/scene/select-rule-ids.d.ts.map +1 -1
- package/dist/scene/select-rule-ids.js.map +1 -1
- package/dist/type.d.ts +2 -0
- package/dist/type.d.ts.map +1 -1
- package/dist/util/terminal-link.d.ts +2 -0
- package/dist/util/terminal-link.d.ts.map +1 -0
- package/dist/util/terminal-link.js +16 -0
- package/dist/util/terminal-link.js.map +1 -0
- package/package.json +5 -6
- package/src/action/convert-error-to-warning-per-file.ts +4 -6
- package/src/action/disable-per-file.ts +4 -6
- package/src/action/disable-per-line.ts +4 -6
- package/src/action/fix.ts +4 -10
- package/src/action/print-result-details.ts +5 -9
- package/src/cli/log.ts +25 -0
- package/src/cli/parse-argv.ts +32 -11
- package/src/cli/prompt.ts +56 -92
- package/src/cli/run.ts +3 -29
- package/src/core.ts +13 -6
- package/src/fix/disable-per-file.ts +1 -1
- package/src/fix/disable-per-line.ts +1 -1
- package/src/formatter/filter-rule-statistics.ts +27 -0
- package/src/formatter/format-by-rules.ts +10 -7
- package/src/formatter/index.ts +4 -3
- package/src/index.ts +1 -1
- package/src/scene/check-results.ts +2 -5
- package/src/scene/lint.ts +14 -12
- package/src/scene/select-action.ts +2 -4
- package/src/scene/select-rule-ids.ts +2 -6
- package/src/type.ts +2 -0
- package/src/util/terminal-link.ts +16 -0
- package/dist/cli/spinner.d.ts +0 -4
- package/dist/cli/spinner.d.ts.map +0 -1
- package/dist/cli/spinner.js +0 -20
- package/dist/cli/spinner.js.map +0 -1
- package/dist/core-worker.d.ts +0 -21
- package/dist/core-worker.d.ts.map +0 -1
- package/dist/core-worker.js +0 -47
- package/dist/core-worker.js.map +0 -1
- package/src/cli/spinner.ts +0 -22
- package/src/core-worker.ts +0 -55
- package/src/typings/enquirer.d.ts +0 -7
package/dist/core-worker.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { parentPort } from 'node:worker_threads';
|
|
2
|
-
import { expose, proxy } from 'comlink';
|
|
3
|
-
import nodeEndpoint from 'comlink/dist/esm/node-adapter.mjs';
|
|
4
|
-
import { Core } from './core.js';
|
|
5
|
-
/**
|
|
6
|
-
* @file This is a wrapper module for using the Core API with comlink.
|
|
7
|
-
*/
|
|
8
|
-
if (parentPort === null)
|
|
9
|
-
throw new Error('This module must be started on a worker.');
|
|
10
|
-
/**
|
|
11
|
-
* This is a wrapper for using the Core API from comlink.
|
|
12
|
-
*
|
|
13
|
-
* The arguments of the methods wrapped in comlink must be serializable.
|
|
14
|
-
* The methods in this class are serializable versions of the Core API methods.
|
|
15
|
-
*/
|
|
16
|
-
export class SerializableCore {
|
|
17
|
-
constructor(config) {
|
|
18
|
-
this.core = new Core(config);
|
|
19
|
-
}
|
|
20
|
-
async lint(...args) {
|
|
21
|
-
return this.core.lint(...args);
|
|
22
|
-
}
|
|
23
|
-
formatResultSummary(...args) {
|
|
24
|
-
return this.core.formatResultSummary(...args);
|
|
25
|
-
}
|
|
26
|
-
getSortedRuleIdsInResults(...args) {
|
|
27
|
-
return this.core.getSortedRuleIdsInResults(...args);
|
|
28
|
-
}
|
|
29
|
-
async formatResultDetails(...args) {
|
|
30
|
-
return this.core.formatResultDetails(...args);
|
|
31
|
-
}
|
|
32
|
-
async applyAutoFixes(...args) {
|
|
33
|
-
return proxy(await this.core.applyAutoFixes(...args));
|
|
34
|
-
}
|
|
35
|
-
async disablePerLine(...args) {
|
|
36
|
-
return proxy(await this.core.disablePerLine(...args));
|
|
37
|
-
}
|
|
38
|
-
async disablePerFile(...args) {
|
|
39
|
-
return proxy(await this.core.disablePerFile(...args));
|
|
40
|
-
}
|
|
41
|
-
async convertErrorToWarningPerFile(...args) {
|
|
42
|
-
return proxy(await this.core.convertErrorToWarningPerFile(...args));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
|
-
expose(SerializableCore, nodeEndpoint(parentPort));
|
|
47
|
-
//# sourceMappingURL=core-worker.js.map
|
package/dist/core-worker.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core-worker.js","sourceRoot":"","sources":["../src/core-worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,YAAY,MAAM,mCAAmC,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC;;GAEG;AAEH,IAAI,UAAU,KAAK,IAAI;IAAE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;AAErF;;;;;GAKG;AACH,MAAM,OAAO,gBAAgB;IAE3B,YAAY,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gBAAgB,EAAG,YAAoB,CAAC,UAAU,CAAC,CAAC,CAAC"}
|
package/src/cli/spinner.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createSpinner } from 'nanospinner';
|
|
2
|
-
|
|
3
|
-
export async function lintingSpinner<T>(cb: () => Promise<T>): Promise<T> {
|
|
4
|
-
const spinner = createSpinner('Linting...').start();
|
|
5
|
-
const result = await cb();
|
|
6
|
-
spinner.success();
|
|
7
|
-
return result;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export async function fixingSpinner<T>(cb: () => Promise<T>): Promise<T> {
|
|
11
|
-
const spinner = createSpinner('Fixing...').start();
|
|
12
|
-
const result = await cb();
|
|
13
|
-
spinner.success();
|
|
14
|
-
return result;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export async function undoingSpinner<T>(cb: () => Promise<T>): Promise<T> {
|
|
18
|
-
const spinner = createSpinner('Undoing...').start();
|
|
19
|
-
const result = await cb();
|
|
20
|
-
spinner.success();
|
|
21
|
-
return result;
|
|
22
|
-
}
|
package/src/core-worker.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { parentPort } from 'node:worker_threads';
|
|
2
|
-
import { expose, proxy } from 'comlink';
|
|
3
|
-
import nodeEndpoint from 'comlink/dist/esm/node-adapter.mjs';
|
|
4
|
-
import { Core } from './core.js';
|
|
5
|
-
import type { Config } from './type.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @file This is a wrapper module for using the Core API with comlink.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
if (parentPort === null) throw new Error('This module must be started on a worker.');
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* This is a wrapper for using the Core API from comlink.
|
|
15
|
-
*
|
|
16
|
-
* The arguments of the methods wrapped in comlink must be serializable.
|
|
17
|
-
* The methods in this class are serializable versions of the Core API methods.
|
|
18
|
-
*/
|
|
19
|
-
export class SerializableCore {
|
|
20
|
-
readonly core: Core;
|
|
21
|
-
constructor(config: Config) {
|
|
22
|
-
this.core = new Core(config);
|
|
23
|
-
}
|
|
24
|
-
async lint(...args: Parameters<Core['lint']>): ReturnType<Core['lint']> {
|
|
25
|
-
return this.core.lint(...args);
|
|
26
|
-
}
|
|
27
|
-
formatResultSummary(...args: Parameters<Core['formatResultSummary']>): ReturnType<Core['formatResultSummary']> {
|
|
28
|
-
return this.core.formatResultSummary(...args);
|
|
29
|
-
}
|
|
30
|
-
getSortedRuleIdsInResults(
|
|
31
|
-
...args: Parameters<Core['getSortedRuleIdsInResults']>
|
|
32
|
-
): ReturnType<Core['getSortedRuleIdsInResults']> {
|
|
33
|
-
return this.core.getSortedRuleIdsInResults(...args);
|
|
34
|
-
}
|
|
35
|
-
async formatResultDetails(...args: Parameters<Core['formatResultDetails']>): ReturnType<Core['formatResultDetails']> {
|
|
36
|
-
return this.core.formatResultDetails(...args);
|
|
37
|
-
}
|
|
38
|
-
async applyAutoFixes(...args: Parameters<Core['applyAutoFixes']>): ReturnType<Core['applyAutoFixes']> {
|
|
39
|
-
return proxy(await this.core.applyAutoFixes(...args));
|
|
40
|
-
}
|
|
41
|
-
async disablePerLine(...args: Parameters<Core['disablePerLine']>): ReturnType<Core['disablePerLine']> {
|
|
42
|
-
return proxy(await this.core.disablePerLine(...args));
|
|
43
|
-
}
|
|
44
|
-
async disablePerFile(...args: Parameters<Core['disablePerFile']>): ReturnType<Core['disablePerFile']> {
|
|
45
|
-
return proxy(await this.core.disablePerFile(...args));
|
|
46
|
-
}
|
|
47
|
-
async convertErrorToWarningPerFile(
|
|
48
|
-
...args: Parameters<Core['convertErrorToWarningPerFile']>
|
|
49
|
-
): ReturnType<Core['convertErrorToWarningPerFile']> {
|
|
50
|
-
return proxy(await this.core.convertErrorToWarningPerFile(...args));
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
55
|
-
expose(SerializableCore, (nodeEndpoint as any)(parentPort));
|