@eslinted/core 0.7.0-rc.3 → 0.7.0-rc.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/boundary/input/input.d.ts +3 -2
- package/dist/boundary/input/input.d.ts.map +1 -1
- package/dist/boundary/input/parsers/parsers.d.ts +7 -0
- package/dist/boundary/input/parsers/parsers.d.ts.map +1 -0
- package/dist/boundary/input/parsers/parsers.js +2 -0
- package/dist/boundary/input/parsers/parsers.js.map +1 -0
- package/dist/boundary/input/plugins/plugins.d.ts +6 -0
- package/dist/boundary/input/plugins/plugins.d.ts.map +1 -0
- package/dist/boundary/input/plugins/plugins.js +2 -0
- package/dist/boundary/input/plugins/plugins.js.map +1 -0
- package/dist/boundary/output/config/IConfig.d.ts +19 -0
- package/dist/boundary/output/config/IConfig.d.ts.map +1 -0
- package/dist/boundary/output/config/IConfig.js +2 -0
- package/dist/boundary/output/config/IConfig.js.map +1 -0
- package/dist/boundary/output/output.d.ts +2 -2
- package/dist/boundary/output/output.d.ts.map +1 -1
- package/dist/factory/Factory.d.ts +1 -0
- package/dist/factory/Factory.d.ts.map +1 -1
- package/dist/factory/Factory.js.map +1 -1
- package/dist/factory/options/Options.d.ts +7 -7
- package/dist/factory/options/Options.d.ts.map +1 -1
- package/dist/factory/options/Options.js.map +1 -1
- package/dist/factory/options/option/Option.d.ts +26 -3
- package/dist/factory/options/option/Option.d.ts.map +1 -1
- package/dist/factory/options/option/Option.js +22 -3
- package/dist/factory/options/option/Option.js.map +1 -1
- package/dist/factory/options/option/html/index.d.ts +6 -2
- package/dist/factory/options/option/html/index.d.ts.map +1 -1
- package/dist/factory/options/option/html/index.js +5 -11
- package/dist/factory/options/option/html/index.js.map +1 -1
- package/dist/factory/options/option/js/index.d.ts +6 -1
- package/dist/factory/options/option/js/index.d.ts.map +1 -1
- package/dist/factory/options/option/js/index.js +7 -14
- package/dist/factory/options/option/js/index.js.map +1 -1
- package/dist/factory/options/option/json/index.d.ts +6 -2
- package/dist/factory/options/option/json/index.d.ts.map +1 -1
- package/dist/factory/options/option/json/index.js +5 -11
- package/dist/factory/options/option/json/index.js.map +1 -1
- package/dist/factory/options/option/jsonc/index.d.ts +6 -2
- package/dist/factory/options/option/jsonc/index.d.ts.map +1 -1
- package/dist/factory/options/option/jsonc/index.js +5 -11
- package/dist/factory/options/option/jsonc/index.js.map +1 -1
- package/dist/factory/options/option/svelte/index.d.ts +21 -4
- package/dist/factory/options/option/svelte/index.d.ts.map +1 -1
- package/dist/factory/options/option/svelte/index.js +13 -20
- package/dist/factory/options/option/svelte/index.js.map +1 -1
- package/dist/factory/options/option/ts/index.d.ts +14 -3
- package/dist/factory/options/option/ts/index.d.ts.map +1 -1
- package/dist/factory/options/option/ts/index.js +11 -17
- package/dist/factory/options/option/ts/index.js.map +1 -1
- package/dist/factory/options/option/yml/index.d.ts +6 -2
- package/dist/factory/options/option/yml/index.d.ts.map +1 -1
- package/dist/factory/options/option/yml/index.js +5 -11
- package/dist/factory/options/option/yml/index.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/boundary/input/input.ts +4 -2
- package/src/boundary/input/parsers/parsers.ts +6 -0
- package/src/boundary/input/plugins/plugins.ts +7 -0
- package/src/boundary/output/config/{index.ts → IConfig.ts} +3 -4
- package/src/boundary/output/config/interface/option/IOption.d.ts +15 -20
- package/src/boundary/output/config/interface/option/language/IOLanguage.d.ts +16 -13
- package/src/boundary/output/config/interface/option/language/ecma/IOLanguageEcma.d.ts +1 -19
- package/src/boundary/output/config/interface/option/language/globals/IOLanguageGlobals.d.ts +1 -3
- package/src/boundary/output/config/interface/option/language/source/IOLanguageSource.d.ts +3 -12
- package/src/boundary/output/config/interface/option/linter/IOLinter.d.ts +3 -29
- package/src/boundary/output/config/interface/option/name/IOName.d.ts +1 -3
- package/src/boundary/output/config/interface/option/plugins/IOPlugins.d.ts +1 -3
- package/src/boundary/output/config/interface/option/processor/IOProcessor.d.ts +1 -3
- package/src/boundary/output/output.ts +2 -2
- package/src/factory/Factory.ts +1 -0
- package/src/factory/options/Options.ts +1 -1
- package/src/factory/options/option/Option.ts +47 -16
- package/src/factory/options/option/html/index.ts +9 -22
- package/src/factory/options/option/js/index.ts +8 -19
- package/src/factory/options/option/json/index.ts +9 -22
- package/src/factory/options/option/jsonc/index.ts +9 -22
- package/src/factory/options/option/svelte/index.ts +22 -33
- package/src/factory/options/option/ts/index.ts +19 -28
- package/src/factory/options/option/yml/index.ts +9 -22
- package/src/index.ts +30 -23
- package/types/project/OmitLast.d.ts +1 -0
- package/src/boundary/input/parsers/index.ts +0 -12
- package/src/boundary/input/plugins/index.ts +0 -20
- package/src/boundary/output/config/interface/files/IFiles.d.ts +0 -1
- package/src/boundary/output/config/interface/option/language/parser/IOLanguageParser.d.ts +0 -3
- package/src/boundary/output/config/interface/option/language/parserOptions/IOLanguageParserOptions.d.ts +0 -5
- package/src/boundary/output/config/interface/rules/IRules.d.ts +0 -1
- /package/src/boundary/output/config/interface/rules/{rule/IRule.d.ts → IRule.d.ts} +0 -0
- /package/src/boundary/output/config/interface/rules/{rule/state → state}/RuleSeverity.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/base32.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/base64.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/binary.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/decimal.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/hex.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/octal.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/quatral.d.ts +0 -0
- /package/types/{literal → typioca/literal}/number/ternary.d.ts +0 -0
- /package/types/{literal → typioca/literal}/string/base64char.d.ts +0 -0
- /package/types/{literal → typioca/literal}/string/digit.d.ts +0 -0
- /package/types/{literal → typioca/literal}/string/hexchar.d.ts +0 -0
- /package/types/{literal → typioca/literal}/string/letter.d.ts +0 -0
- /package/types/{safe → typioca/safe}/Safe.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/finite/Finite.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/finite.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/fint.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/int/Int.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/int.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/numberful.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/polarity/Negative.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/polarity/Positive.d.ts +0 -0
- /package/types/{safe → typioca/safe}/numbers/polarity/pole/Pole.d.ts +0 -0
- /package/types/{safe → typioca/safe}/primitive.d.ts +0 -0
- /package/types/{safe → typioca/safe}/strings/char.d.ts +0 -0
- /package/types/{safe → typioca/safe}/strings/length/PropLength.d.ts +0 -0
- /package/types/{safe → typioca/safe}/strings/stringful.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/Particord.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/Property.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/Recordful.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/Table.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/properties/Field.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/properties/Flag.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/properties/Limit.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/properties/List.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/properties/Listish.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/properties/Scalar.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/tables/FieldTable.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/tables/FlagTable.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/tables/ListTable.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/tables/ListishTable.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/construct/tables/ScalarTable.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/identity/Interface.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/identity/Keys.d.ts +0 -0
- /package/types/{utility → typioca/utility}/interface/transform/Unrequire.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/construct/ArrayN.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/construct/Tuple.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/construct/arrays/Arrays.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/construct/tuples/Tuples.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/identity/DyadType.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/identity/MonadType.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/identity/TriadType.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/identity/array/ArrayType.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/identity/array/length/ArrayLength.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/transform/Join.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/transform/Unflat.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/transform/stringarray/Chain.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/transform/stringarray/PathN.d.ts +0 -0
- /package/types/{utility → typioca/utility}/iterable/transform/stringarray/stringify/Stringify.d.ts +0 -0
- /package/types/{utility → typioca/utility}/length/Length.d.ts +0 -0
- /package/types/{utility → typioca/utility}/null/null.d.ts +0 -0
- /package/types/{utility → typioca/utility}/null/nullable.d.ts +0 -0
- /package/types/{utility → typioca/utility}/primitive/Primeval.d.ts +0 -0
- /package/types/{utility → typioca/utility}/primitive/boolean/True.d.ts +0 -0
- /package/types/{utility → typioca/utility}/primitive/number/Numbered.d.ts +0 -0
- /package/types/{utility → typioca/utility}/primitive/string/literal.d.ts +0 -0
- /package/types/{utility → typioca/utility}/primitive/string/literalful.d.ts +0 -0
@@ -3,43 +3,32 @@ import type TsOption from "../ts/index.js";
|
|
3
3
|
|
4
4
|
export default class SvelteOption extends Option<
|
5
5
|
"svelte",
|
6
|
-
"svelte" | keyof TsOption["
|
6
|
+
"svelte" | keyof TsOption["option"]["plugins"],
|
7
7
|
true,
|
8
|
-
& TsOption["
|
8
|
+
& TsOption["option"]["languageOptions"]["parserOptions"]
|
9
9
|
& { parser: unknown }
|
10
|
-
& { extraFileExtensions: [".svelte"] },
|
10
|
+
& { extraFileExtensions: readonly [".svelte"] },
|
11
|
+
2,
|
11
12
|
never,
|
12
|
-
"svelte/svelte"
|
13
|
+
{ processor: "svelte/svelte" }
|
13
14
|
> {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
languageOptions: {
|
31
|
-
ecmaVersion: "latest",
|
32
|
-
sourceType: "module",
|
33
|
-
parser: svelteParser,
|
34
|
-
parserOptions: {
|
35
|
-
ecmaVersion: "latest",
|
36
|
-
sourceType: "module",
|
37
|
-
project: "tsconfig.json",
|
38
|
-
extraFileExtensions: [".svelte"],
|
39
|
-
parser: tsParser,
|
40
|
-
},
|
41
|
-
},
|
15
|
+
public readonly name = "scope:svelte";
|
16
|
+
public readonly processor = { processor: "svelte/svelte" } as const;
|
17
|
+
|
18
|
+
public get languageOptions() {
|
19
|
+
const [parser, tsParser] = this.parser;
|
20
|
+
|
21
|
+
return {
|
22
|
+
ecmaVersion: "latest",
|
23
|
+
sourceType: "module",
|
24
|
+
parser,
|
25
|
+
parserOptions: {
|
26
|
+
ecmaVersion: "latest",
|
27
|
+
sourceType: "module",
|
28
|
+
project: "tsconfig.json",
|
29
|
+
extraFileExtensions: [".svelte"] as const,
|
30
|
+
parser: tsParser,
|
42
31
|
},
|
43
|
-
|
32
|
+
} as const;
|
44
33
|
}
|
45
34
|
}
|
@@ -3,36 +3,27 @@ import type JsOption from "../js/index.js";
|
|
3
3
|
|
4
4
|
export default class TsOption extends Option<
|
5
5
|
"ts",
|
6
|
-
"@typescript-eslint" | keyof JsOption["
|
6
|
+
"@typescript-eslint" | keyof JsOption["option"]["plugins"],
|
7
7
|
true,
|
8
|
-
& JsOption["
|
9
|
-
& { project: "tsconfig.json" }
|
8
|
+
& JsOption["option"]["languageOptions"]
|
9
|
+
& { project: "tsconfig.json" },
|
10
|
+
1
|
10
11
|
> {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
languageOptions: {
|
26
|
-
ecmaVersion: "latest",
|
27
|
-
sourceType: "module",
|
28
|
-
parser,
|
29
|
-
parserOptions: {
|
30
|
-
ecmaVersion: "latest",
|
31
|
-
sourceType: "module",
|
32
|
-
project: "tsconfig.json",
|
33
|
-
},
|
34
|
-
},
|
12
|
+
public readonly name = "scope:ts";
|
13
|
+
public readonly processor = {} as const;
|
14
|
+
|
15
|
+
public get languageOptions() {
|
16
|
+
const [parser] = this.parser;
|
17
|
+
|
18
|
+
return {
|
19
|
+
ecmaVersion: "latest",
|
20
|
+
sourceType: "module",
|
21
|
+
parser,
|
22
|
+
parserOptions: {
|
23
|
+
ecmaVersion: "latest",
|
24
|
+
sourceType: "module",
|
25
|
+
project: "tsconfig.json",
|
35
26
|
},
|
36
|
-
|
27
|
+
} as const;
|
37
28
|
}
|
38
29
|
}
|
@@ -3,29 +3,16 @@ import Option from "../Option.js";
|
|
3
3
|
export default class YmlOption extends Option<
|
4
4
|
"yml",
|
5
5
|
"yml",
|
6
|
+
false,
|
6
7
|
true,
|
7
|
-
|
8
|
-
never,
|
9
|
-
never,
|
10
|
-
never,
|
11
|
-
never
|
8
|
+
1
|
12
9
|
> {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
name: "linted/scope:yml",
|
21
|
-
files,
|
22
|
-
plugins,
|
23
|
-
linterOptions: {
|
24
|
-
noInlineConfig: true,
|
25
|
-
reportUnusedDisableDirectives: "error",
|
26
|
-
},
|
27
|
-
languageOptions: { parser },
|
28
|
-
},
|
29
|
-
);
|
10
|
+
public readonly name = "scope:yml";
|
11
|
+
public readonly processor = {} as const;
|
12
|
+
|
13
|
+
public get languageOptions() {
|
14
|
+
const [parser] = this.parser;
|
15
|
+
|
16
|
+
return { parser } as const;
|
30
17
|
}
|
31
18
|
}
|
package/src/index.ts
CHANGED
@@ -26,7 +26,21 @@ export default function (
|
|
26
26
|
const files = new Files(
|
27
27
|
base,
|
28
28
|
includes,
|
29
|
-
)
|
29
|
+
),
|
30
|
+
imports: {
|
31
|
+
[S in Scope]: OmitFirst<ConstructorParameters<typeof Options[S]>>;
|
32
|
+
} = {
|
33
|
+
js: [plugins.js, []] as const,
|
34
|
+
ts: [plugins.ts, [parsers.ts]] as const,
|
35
|
+
svelte: [
|
36
|
+
plugins.svelte,
|
37
|
+
[parsers.svelte, parsers.ts],
|
38
|
+
] as const,
|
39
|
+
html: [plugins.html, [parsers.html]] as const,
|
40
|
+
json: [plugins.json, [parsers.json]] as const,
|
41
|
+
jsonc: [plugins.jsonc, [parsers.jsonc]] as const,
|
42
|
+
yml: [plugins.yml, [parsers.yml]] as const,
|
43
|
+
} as const;
|
30
44
|
|
31
45
|
for (const scope of scopes)
|
32
46
|
rulesets[scope].override(overrides[scope]);
|
@@ -34,57 +48,50 @@ export default function (
|
|
34
48
|
const options: {
|
35
49
|
[S in Scope]: InstanceType<
|
36
50
|
typeof Options[S]
|
37
|
-
>["
|
51
|
+
>["option"]
|
38
52
|
} = {
|
39
53
|
js: new Options
|
40
54
|
.js(
|
41
|
-
plugins.js,
|
42
55
|
files.files("js"),
|
56
|
+
...imports.js,
|
43
57
|
)
|
44
|
-
.
|
58
|
+
.option,
|
45
59
|
ts: new Options
|
46
60
|
.ts(
|
47
|
-
plugins.ts,
|
48
|
-
parsers.ts,
|
49
61
|
files.files("ts"),
|
62
|
+
...imports.ts,
|
50
63
|
)
|
51
|
-
.
|
64
|
+
.option,
|
52
65
|
svelte: new Options
|
53
66
|
.svelte(
|
54
|
-
plugins.svelte,
|
55
|
-
parsers.svelte,
|
56
|
-
parsers.ts,
|
57
67
|
files.files("svelte"),
|
68
|
+
...imports.svelte,
|
58
69
|
)
|
59
|
-
.
|
70
|
+
.option,
|
60
71
|
html: new Options
|
61
72
|
.html(
|
62
|
-
plugins.html,
|
63
|
-
parsers.html,
|
64
73
|
files.files("html"),
|
74
|
+
...imports.html,
|
65
75
|
)
|
66
|
-
.
|
76
|
+
.option,
|
67
77
|
json: new Options
|
68
78
|
.json(
|
69
|
-
plugins.json,
|
70
|
-
parsers.json,
|
71
79
|
files.files("json"),
|
80
|
+
...imports.json,
|
72
81
|
)
|
73
|
-
.
|
82
|
+
.option,
|
74
83
|
jsonc: new Options
|
75
84
|
.jsonc(
|
76
|
-
plugins.jsonc,
|
77
|
-
parsers.jsonc,
|
78
85
|
files.files("jsonc"),
|
86
|
+
...imports.jsonc,
|
79
87
|
)
|
80
|
-
.
|
88
|
+
.option,
|
81
89
|
yml: new Options
|
82
90
|
.yml(
|
83
|
-
plugins.yml,
|
84
|
-
parsers.yml,
|
85
91
|
files.files("yml"),
|
92
|
+
...imports.yml,
|
86
93
|
)
|
87
|
-
.
|
94
|
+
.option,
|
88
95
|
};
|
89
96
|
|
90
97
|
return scopes
|
@@ -0,0 +1 @@
|
|
1
|
+
declare type OmitFirst<A> = A extends readonly [unknown, ...infer An_1] ? An_1 : never;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import type { Scope } from "../input.js";
|
2
|
-
|
3
|
-
type PluginImport = { configs: unknown };
|
4
|
-
|
5
|
-
export default interface Plugins extends Record<Scope, Record<string, PluginImport>> {
|
6
|
-
js: { "@stylistic": PluginImport };
|
7
|
-
ts: {
|
8
|
-
"@stylistic": PluginImport;
|
9
|
-
"@typescript-eslint": PluginImport;
|
10
|
-
};
|
11
|
-
svelte: {
|
12
|
-
"@stylistic": PluginImport;
|
13
|
-
"@typescript-eslint": PluginImport;
|
14
|
-
svelte: PluginImport;
|
15
|
-
};
|
16
|
-
html: { "@html-eslint": PluginImport };
|
17
|
-
json: { jsonc: PluginImport };
|
18
|
-
jsonc: { jsonc: PluginImport };
|
19
|
-
yml: { yml: PluginImport };
|
20
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
declare interface IFiles { files: readonly string[] }
|
@@ -1 +0,0 @@
|
|
1
|
-
declare interface IRules { rules: IRule }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/package/types/{utility → typioca/utility}/iterable/transform/stringarray/stringify/Stringify.d.ts
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|