@eslinted/core 13.3.0-rc.1 → 13.3.0-rc.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/factory/index.d.ts +230 -2
- package/dist/factory/index.d.ts.map +1 -1
- package/dist/factory/index.js +65 -2
- package/dist/factory/index.js.map +1 -1
- package/dist/factory/scopes/html.d.ts +11 -0
- package/dist/factory/scopes/html.d.ts.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/html.js +3 -5
- package/dist/factory/scopes/html.js.map +1 -0
- package/dist/factory/scopes/js.d.ts +9 -0
- package/dist/factory/scopes/js.d.ts.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/js.js +3 -4
- package/dist/factory/scopes/js.js.map +1 -0
- package/dist/factory/scopes/json.d.ts +11 -0
- package/dist/factory/scopes/json.d.ts.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/json.js +3 -5
- package/dist/factory/scopes/json.js.map +1 -0
- package/dist/factory/scopes/jsonc.d.ts +11 -0
- package/dist/factory/scopes/jsonc.d.ts.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/jsonc.js +3 -5
- package/dist/factory/scopes/jsonc.js.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/mocha.d.ts +6 -4
- package/dist/factory/scopes/mocha.d.ts.map +1 -0
- package/dist/factory/scopes/mocha.js +19 -0
- package/dist/factory/scopes/mocha.js.map +1 -0
- package/dist/factory/{settings/setting.d.ts → scopes/setting/index.d.ts} +52 -39
- package/dist/factory/{settings/setting.d.ts.map → scopes/setting/index.d.ts.map} +1 -1
- package/dist/factory/{settings/setting.js → scopes/setting/index.js} +6 -7
- package/dist/factory/scopes/setting/index.js.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/svelte.d.ts +17 -13
- package/dist/factory/scopes/svelte.d.ts.map +1 -0
- package/dist/factory/scopes/svelte.js +19 -0
- package/dist/factory/scopes/svelte.js.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/ts.d.ts +11 -7
- package/dist/factory/scopes/ts.d.ts.map +1 -0
- package/dist/factory/scopes/ts.js +17 -0
- package/dist/factory/scopes/ts.js.map +1 -0
- package/dist/factory/scopes/yml.d.ts +11 -0
- package/dist/factory/scopes/yml.d.ts.map +1 -0
- package/dist/factory/{settings/scopes → scopes}/yml.js +3 -5
- package/dist/factory/scopes/yml.js.map +1 -0
- package/dist/factory/{settings/index.d.ts → settings.d.ts} +1 -2
- package/dist/factory/settings.d.ts.map +1 -0
- package/dist/factory/{settings/index.js → settings.js} +1 -1
- package/dist/factory/settings.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/factory/index.ts +104 -2
- package/src/factory/{settings/scopes → scopes}/html.ts +4 -9
- package/src/factory/scopes/js.ts +9 -0
- package/src/factory/{settings/scopes → scopes}/json.ts +4 -9
- package/src/factory/{settings/scopes → scopes}/jsonc.ts +4 -9
- package/src/factory/scopes/mocha.ts +24 -0
- package/src/factory/scopes/setting/index.ts +61 -0
- package/src/factory/scopes/svelte.ts +30 -0
- package/src/factory/scopes/ts.ts +27 -0
- package/src/factory/{settings/scopes → scopes}/yml.ts +4 -10
- package/src/factory/{settings/index.ts → settings.ts} +0 -1
- package/src/index.ts +3 -13
- package/dist/factory/factory.d.ts +0 -129
- package/dist/factory/factory.d.ts.map +0 -1
- package/dist/factory/factory.js +0 -46
- package/dist/factory/factory.js.map +0 -1
- package/dist/factory/settings/index.d.ts.map +0 -1
- package/dist/factory/settings/index.js.map +0 -1
- package/dist/factory/settings/scopes/html.d.ts +0 -10
- package/dist/factory/settings/scopes/html.d.ts.map +0 -1
- package/dist/factory/settings/scopes/html.js.map +0 -1
- package/dist/factory/settings/scopes/js.d.ts +0 -8
- package/dist/factory/settings/scopes/js.d.ts.map +0 -1
- package/dist/factory/settings/scopes/js.js.map +0 -1
- package/dist/factory/settings/scopes/json.d.ts +0 -10
- package/dist/factory/settings/scopes/json.d.ts.map +0 -1
- package/dist/factory/settings/scopes/json.js.map +0 -1
- package/dist/factory/settings/scopes/jsonc.d.ts +0 -10
- package/dist/factory/settings/scopes/jsonc.d.ts.map +0 -1
- package/dist/factory/settings/scopes/jsonc.js.map +0 -1
- package/dist/factory/settings/scopes/mocha.d.ts.map +0 -1
- package/dist/factory/settings/scopes/mocha.js +0 -20
- package/dist/factory/settings/scopes/mocha.js.map +0 -1
- package/dist/factory/settings/scopes/svelte.d.ts.map +0 -1
- package/dist/factory/settings/scopes/svelte.js +0 -20
- package/dist/factory/settings/scopes/svelte.js.map +0 -1
- package/dist/factory/settings/scopes/ts.d.ts.map +0 -1
- package/dist/factory/settings/scopes/ts.js +0 -18
- package/dist/factory/settings/scopes/ts.js.map +0 -1
- package/dist/factory/settings/scopes/yml.d.ts +0 -10
- package/dist/factory/settings/scopes/yml.d.ts.map +0 -1
- package/dist/factory/settings/scopes/yml.js.map +0 -1
- package/dist/factory/settings/setting.js.map +0 -1
- package/src/factory/factory.ts +0 -83
- package/src/factory/settings/scopes/js.ts +0 -11
- package/src/factory/settings/scopes/mocha.ts +0 -28
- package/src/factory/settings/scopes/svelte.ts +0 -32
- package/src/factory/settings/scopes/ts.ts +0 -28
- package/src/factory/settings/setting.ts +0 -65
@@ -1,28 +0,0 @@
|
|
1
|
-
import { ScopeSetting } from "../setting";
|
2
|
-
|
3
|
-
export default class TsSetting extends ScopeSetting<
|
4
|
-
"ts",
|
5
|
-
{
|
6
|
-
readonly project: "tsconfig.json";
|
7
|
-
readonly sourceType: "module";
|
8
|
-
readonly ecmaVersion: 2023;
|
9
|
-
},
|
10
|
-
1
|
11
|
-
> {
|
12
|
-
public readonly scope = "ts";
|
13
|
-
public readonly processor = {} as const;
|
14
|
-
public readonly language = {} as const;
|
15
|
-
|
16
|
-
public get languageOptions() {
|
17
|
-
const [parser] = this.parser;
|
18
|
-
|
19
|
-
return {
|
20
|
-
parser,
|
21
|
-
parserOptions: {
|
22
|
-
project: "tsconfig.json",
|
23
|
-
sourceType: "module",
|
24
|
-
ecmaVersion: 2023,
|
25
|
-
} as const,
|
26
|
-
} as const;
|
27
|
-
}
|
28
|
-
}
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import globals from "globals";
|
2
|
-
import type { Scopes } from "../..";
|
3
|
-
|
4
|
-
export abstract class ScopeSetting<
|
5
|
-
S extends Scopes,
|
6
|
-
ParserOptions extends
|
7
|
-
| object
|
8
|
-
| boolean = false,
|
9
|
-
ParserCount extends 0 | 1 | 2 = ParserOptions extends false ? 0 : 1,
|
10
|
-
G extends keyof typeof globals | false = false,
|
11
|
-
Processor extends object = object,
|
12
|
-
Language extends object = object,
|
13
|
-
> {
|
14
|
-
public abstract readonly scope: S;
|
15
|
-
public abstract readonly processor: (Processor extends never
|
16
|
-
? object
|
17
|
-
: Processor extends { readonly processor: infer P }
|
18
|
-
? string extends P
|
19
|
-
? object
|
20
|
-
: { readonly processor: P }
|
21
|
-
: object);
|
22
|
-
public abstract readonly language: (Language extends never
|
23
|
-
? object
|
24
|
-
: Language extends { readonly language: infer L }
|
25
|
-
? string extends L
|
26
|
-
? object
|
27
|
-
: { readonly language: L }
|
28
|
-
: object);
|
29
|
-
constructor(public readonly parser: readonly unknown[] & { length: ParserCount }) {}
|
30
|
-
|
31
|
-
public get option() {
|
32
|
-
const { languageOptions, processor, language } = this;
|
33
|
-
|
34
|
-
return {
|
35
|
-
languageOptions,
|
36
|
-
...processor,
|
37
|
-
...language,
|
38
|
-
} as const;
|
39
|
-
}
|
40
|
-
|
41
|
-
protected abstract get languageOptions():
|
42
|
-
(G extends never
|
43
|
-
? object
|
44
|
-
: G extends boolean
|
45
|
-
? object
|
46
|
-
: G extends string
|
47
|
-
? string extends G
|
48
|
-
? object
|
49
|
-
: { readonly globals: Readonly<Record<string, unknown>> }
|
50
|
-
: object
|
51
|
-
) & ParserOptions extends never
|
52
|
-
? object
|
53
|
-
: ParserOptions extends boolean
|
54
|
-
? ParserOptions extends true
|
55
|
-
? { readonly parser: unknown }
|
56
|
-
: object
|
57
|
-
: { readonly parser: unknown; readonly parserOptions: ParserOptions };
|
58
|
-
|
59
|
-
protected globals(global: G & keyof typeof globals) {
|
60
|
-
if (typeof global === "boolean")
|
61
|
-
throw new TypeError("`global` must be a string key of `globals` package");
|
62
|
-
|
63
|
-
return globals[global];
|
64
|
-
}
|
65
|
-
}
|