@eslinted/core 23.1.4 → 24.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/dist/_test/index.d.ts +16 -18
- package/dist/_test/index.d.ts.map +1 -1
- package/dist/_test/index.js +16 -18
- package/dist/_test/index.js.map +1 -1
- package/dist/factory.d.ts +20 -8
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +39 -24
- package/dist/factory.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -22
- package/dist/index.js.map +1 -1
- package/dist/interface/input/configuration/extensions.d.ts +4 -1
- package/dist/interface/input/configuration/extensions.d.ts.map +1 -1
- package/dist/interface/input/configuration/index.d.ts +2 -2
- package/dist/interface/input/configuration/index.d.ts.map +1 -1
- package/dist/interface/input/configuration/settings.d.ts +1 -1
- package/dist/interface/input/configuration/settings.d.ts.map +1 -1
- package/dist/interface/input/imports.d.ts +5 -0
- package/dist/interface/input/imports.d.ts.map +1 -0
- package/dist/interface/input/imports.js +2 -0
- package/dist/interface/input/imports.js.map +1 -0
- package/dist/interface/input/index.d.ts +4 -4
- package/dist/interface/input/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/_test/index.ts +16 -18
- package/src/factory.ts +62 -49
- package/src/index.ts +10 -35
- package/src/interface/input/configuration/extensions.ts +10 -0
- package/src/interface/input/configuration/index.ts +6 -2
- package/src/interface/input/configuration/settings.ts +1 -1
- package/src/interface/input/{imports/required.ts → imports.ts} +1 -1
- package/src/interface/input/index.ts +7 -7
- package/dist/interface/input/imports/index.d.ts +0 -7
- package/dist/interface/input/imports/index.d.ts.map +0 -1
- package/dist/interface/input/imports/index.js +0 -2
- package/dist/interface/input/imports/index.js.map +0 -1
- package/dist/interface/input/imports/optional.d.ts +0 -5
- package/dist/interface/input/imports/optional.d.ts.map +0 -1
- package/dist/interface/input/imports/optional.js +0 -2
- package/dist/interface/input/imports/optional.js.map +0 -1
- package/dist/interface/input/imports/required.d.ts +0 -5
- package/dist/interface/input/imports/required.d.ts.map +0 -1
- package/dist/interface/input/imports/required.js +0 -2
- package/dist/interface/input/imports/required.js.map +0 -1
- package/src/interface/input/imports/index.ts +0 -16
- package/src/interface/input/imports/optional.ts +0 -11
package/dist/_test/index.d.ts
CHANGED
@@ -1,23 +1,21 @@
|
|
1
1
|
export declare const TEST_INPUT: {
|
2
2
|
imports: {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
yml: string;
|
20
|
-
};
|
3
|
+
plugins: {
|
4
|
+
"@stylistic": string;
|
5
|
+
"@typescript-eslint": string;
|
6
|
+
mocha: string;
|
7
|
+
"chai-friendly": string;
|
8
|
+
"chai-expect": string;
|
9
|
+
"@html-eslint": string;
|
10
|
+
css: string;
|
11
|
+
json: string;
|
12
|
+
jsonc: string;
|
13
|
+
yml: string;
|
14
|
+
};
|
15
|
+
parsers: {
|
16
|
+
ts: string;
|
17
|
+
html: string;
|
18
|
+
yml: string;
|
21
19
|
};
|
22
20
|
};
|
23
21
|
configuration: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/_test/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/_test/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+PtB,CAAC"}
|
package/dist/_test/index.js
CHANGED
@@ -1,24 +1,22 @@
|
|
1
1
|
const ERROR = "error", OFF = "off", Plugin = "MOCK_PLUGIN", Parser = (scope) => `MOCK_PARSER:${scope}`;
|
2
2
|
export const TEST_INPUT = {
|
3
3
|
imports: {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
yml: Parser("YML"),
|
21
|
-
},
|
4
|
+
plugins: {
|
5
|
+
"@stylistic": Plugin,
|
6
|
+
"@typescript-eslint": Plugin,
|
7
|
+
mocha: Plugin,
|
8
|
+
"chai-friendly": Plugin,
|
9
|
+
"chai-expect": Plugin,
|
10
|
+
"@html-eslint": Plugin,
|
11
|
+
css: Plugin,
|
12
|
+
json: Plugin,
|
13
|
+
jsonc: Plugin,
|
14
|
+
yml: Plugin,
|
15
|
+
},
|
16
|
+
parsers: {
|
17
|
+
ts: Parser("TS"),
|
18
|
+
html: Parser("HTML"),
|
19
|
+
yml: Parser("YML"),
|
22
20
|
},
|
23
21
|
},
|
24
22
|
configuration: {
|
package/dist/_test/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/_test/index.ts"],"names":[],"mappings":"AAAA,MACA,KAAK,GAAG,OAAO,EACf,GAAG,GAAG,KAAK,EACX,MAAM,GAAG,aAAa,EACtB,MAAM,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,eAAe,KAAK,EAAE,CAAC;AAEnD,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,OAAO,EAAE;QACP,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/_test/index.ts"],"names":[],"mappings":"AAAA,MAC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BACN;wBACE,EAAE,EAAE,SAAS;wBACb,KAAK,EAAE;4BACL,QAAQ,EAAE,GAAG;yBACL;qBACX;oBACD;wBACE,EAAE,EAAE,kBAAkB;wBACtB,KAAK,EAAE;4BACL,aAAa,EAAE,KAAK;yBACZ;qBACX;iBACF;gBACD,IAAI,EAAE;oBACJ;wBACE,EAAE,EAAE,QAAQ;wBACZ,KAAK,EAAE;4BACL,gBAAgB,EAAE,KAAK;yBACf;qBACX;iBACF;gBACD,GAAG,EAAE;oBACH;wBACE,EAAE,EAAE,QAAQ;wBACZ,KAAK,EAAE;4BACL,cAAc,EAAE,KAAK;yBACb;qBACX;iBACF;gBACD,IAAI,EAAE;oBACJ;wBACE,EAAE,EAAE,QAAQ;wBACZ,KAAK,EAAE;4BACL,sBAAsB,EAAE,KAAK;4BAC7B,eAAe,EAAE;gCACf,KAAK;gCACL,OAAO;6BACR;4BACD,sBAAsB,EAAE;gCACtB,KAAK;gCACL,OAAO;6BACR;yBACO;qBACX;iBACF;gBACD,KAAK,EAAE;oBACL;wBACE,EAAE,EAAE,kBAAkB;wBACtB,KAAK,EAAE;4BACL,eAAe,EAAE;gCACf,KAAK;gCACL,OAAO;6BACR;yBACO;qBACX;iBACF;gBACD,MAAM,EAAE;oBACN;wBACE,EAAE,EAAE,gBAAgB;wBACpB,KAAK,EAAE;4BACL,sBAAsB,EAAE;gCACtB,KAAK;gCACL,OAAO;6BACR;yBACO;qBACX;iBACF;gBACD,GAAG,EAAE;oBACH;wBACE,EAAE,EAAE,QAAQ;wBACZ,KAAK,EAAE;4BACL,oBAAoB,EAAE,KAAK;yBACnB;qBACX;iBACF;aACF;SACF;QACD,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,EAAE;KAChB;CACF,CAAC"}
|
package/dist/factory.d.ts
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
import type { Input } from "./interface/index.js";
|
2
|
-
export declare class Factory<RequiredPlugin extends string, RequiredParser extends
|
2
|
+
export declare class Factory<RequiredPlugin extends string, RequiredParser extends Scope, Scope extends string, OptionalScope extends Scope> {
|
3
3
|
private readonly settings;
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
readonly attachments: Input<RequiredPlugin, RequiredParser, Scope, OptionalScope>["configuration"]["attachments"];
|
5
|
+
globalConfigs: {
|
6
|
+
plugins: {
|
7
|
+
name: "linted/*/plugins/";
|
8
|
+
plugins: Record<RequiredPlugin, unknown> & {
|
9
|
+
svelte?: unknown;
|
10
|
+
};
|
11
|
+
};
|
7
12
|
settings: {
|
8
13
|
name: "linted/*/settings/";
|
9
14
|
linterOptions: {
|
@@ -28,11 +33,18 @@ export declare class Factory<RequiredPlugin extends string, RequiredParser exten
|
|
28
33
|
rules: import("./interface/index.js").IConfig["rules"];
|
29
34
|
}[]>;
|
30
35
|
};
|
31
|
-
|
36
|
+
parsers: Record<RequiredParser, unknown> & Partial<Record<OptionalScope, unknown>>;
|
37
|
+
constructor(tree: Array<readonly [
|
32
38
|
Scope,
|
33
39
|
readonly Scope[]
|
34
|
-
]>,
|
40
|
+
]>, optionalScopes: readonly Scope[], imports: Input<RequiredPlugin, RequiredParser, Scope, OptionalScope>["imports"], settings: Input<RequiredPlugin, RequiredParser, Scope, OptionalScope>["configuration"]["settings"], defaults: Input<RequiredPlugin, RequiredParser, Scope, OptionalScope>["configuration"]["defaults"], { "*": globalExtension, ...scopeExtensions }?: Input<RequiredPlugin, RequiredParser, Scope, OptionalScope>["configuration"]["extensions"], attachments?: Input<RequiredPlugin, RequiredParser, Scope, OptionalScope>["configuration"]["attachments"]);
|
35
41
|
get globals(): readonly [
|
42
|
+
{
|
43
|
+
name: "linted/*/plugins/";
|
44
|
+
plugins: Record<RequiredPlugin, unknown> & {
|
45
|
+
svelte?: unknown;
|
46
|
+
};
|
47
|
+
},
|
36
48
|
{
|
37
49
|
name: "linted/*/settings/";
|
38
50
|
linterOptions: {
|
@@ -59,9 +71,9 @@ export declare class Factory<RequiredPlugin extends string, RequiredParser exten
|
|
59
71
|
processor?: string;
|
60
72
|
languageOptions?: {
|
61
73
|
parserOptions?: {
|
62
|
-
parser?: (Record<RequiredParser, unknown> & Partial<Record<
|
74
|
+
parser?: (Record<RequiredParser, unknown> & Partial<Record<OptionalScope, unknown>>)[RequiredParser | OptionalScope];
|
63
75
|
};
|
64
|
-
parser?: (Record<RequiredParser, unknown> & Partial<Record<
|
76
|
+
parser?: (Record<RequiredParser, unknown> & Partial<Record<OptionalScope, unknown>>)[RequiredParser | OptionalScope];
|
65
77
|
};
|
66
78
|
name: `linted/${string}/`;
|
67
79
|
files: Record<Scope, string[]>[Scope];
|
package/dist/factory.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,qBAAa,OAAO,CAClB,cAAc,SAAS,MAAM,EAC7B,cAAc,SAAS,
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,qBAAa,OAAO,CAClB,cAAc,SAAS,MAAM,EAC7B,cAAc,SAAS,KAAK,EAC5B,KAAK,SAAS,MAAM,EACpB,aAAa,SAAS,KAAK;IAoBzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;aAqBT,WAAW,EAAE,KAAK,CAChC,cAAc,EACd,cAAc,EACd,KAAK,EACL,aAAa,CACd,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC;IA5C5B,aAAa;;;;;;;;;;;;;;;;;;;;;;MAAC;IACd,MAAM;;;;;;;MAAC;IACP,OAAO,4EAAC;gBAGb,IAAI,EAAE,KAAK,CACT,SAAS;QACP,KAAK;QACL,SAAS,KAAK,EAAE;KACjB,CACF,EACD,cAAc,EAAE,SAAS,KAAK,EAAE,EAChC,OAAO,EAAE,KAAK,CACZ,cAAc,EACd,cAAc,EACd,KAAK,EACL,aAAa,CACd,CAAC,SAAS,CAAC,EACK,QAAQ,EAAE,KAAK,CAC9B,cAAc,EACd,cAAc,EACd,KAAK,EACL,aAAa,CACd,CAAC,eAAe,CAAC,CAAC,UAAU,CAAC,EAC9B,QAAQ,EAAE,KAAK,CACb,cAAc,EACd,cAAc,EACd,KAAK,EACL,aAAa,CACd,CAAC,eAAe,CAAC,CAAC,UAAU,CAAC,EAC9B,EACE,GAAG,EAAE,eAAoB,EACzB,GAAG,eAAe,EACnB,GAAE,KAAK,CACN,cAAc,EACd,cAAc,EACd,KAAK,EACL,aAAa,CACd,CAAC,eAAe,CAAC,CAAC,YAAY,CAAM,EACrB,WAAW,GAAE,KAAK,CAChC,cAAc,EACd,cAAc,EACd,KAAK,EACL,aAAa,CACd,CAAC,eAAe,CAAC,CAAC,aAAa,CAAM;IA8HxC,IAAW,OAAO;;;;;;;;;;;;;;;;;;OAMjB;IAEM,KAAK,CAAC,KAAK,EAAE,KAAK;;;;;;;;;;;;;;;;;;CAyG1B"}
|
package/dist/factory.js
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
export class Factory {
|
2
2
|
settings;
|
3
|
-
parsers;
|
4
3
|
attachments;
|
5
|
-
|
4
|
+
globalConfigs;
|
6
5
|
scopes;
|
7
|
-
|
6
|
+
parsers;
|
7
|
+
constructor(tree, optionalScopes, imports, settings, defaults, { "*": globalExtension = {}, ...scopeExtensions } = {}, attachments = []) {
|
8
8
|
this.settings = settings;
|
9
|
-
this.parsers = parsers;
|
10
9
|
this.attachments = attachments;
|
11
10
|
const { noInlineConfig = settings
|
12
11
|
.global
|
@@ -16,8 +15,19 @@ export class Factory {
|
|
16
15
|
.global
|
17
16
|
.sourceType, ecmaVersion = settings
|
18
17
|
.global
|
19
|
-
.ecmaVersion, } = globalExtension
|
20
|
-
this.
|
18
|
+
.ecmaVersion, } = globalExtension;
|
19
|
+
this.globalConfigs = {
|
20
|
+
plugins: {
|
21
|
+
name: "linted/*/plugins/",
|
22
|
+
plugins: {
|
23
|
+
...imports.plugins,
|
24
|
+
..."svelte" in scopeExtensions && "plugin" in scopeExtensions.svelte
|
25
|
+
? {
|
26
|
+
svelte: scopeExtensions.svelte.plugin,
|
27
|
+
}
|
28
|
+
: {},
|
29
|
+
},
|
30
|
+
},
|
21
31
|
settings: {
|
22
32
|
name: "linted/*/settings/",
|
23
33
|
linterOptions: {
|
@@ -32,45 +42,49 @@ export class Factory {
|
|
32
42
|
ignores: {
|
33
43
|
name: "linted/*/ignores/",
|
34
44
|
ignores: [
|
35
|
-
...override
|
45
|
+
...globalExtension.override === true
|
36
46
|
? []
|
37
|
-
: defaults
|
38
|
-
|
39
|
-
...ignores,
|
47
|
+
: defaults.ignores["*"],
|
48
|
+
...globalExtension.ignores ?? [],
|
40
49
|
],
|
41
50
|
},
|
42
51
|
};
|
43
52
|
this.scopes = {
|
44
|
-
files: defaults
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
53
|
+
files: defaults.files,
|
54
|
+
ignores: defaults.ignores,
|
55
|
+
rules: defaults.rules,
|
56
|
+
};
|
57
|
+
this.parsers = {
|
58
|
+
...imports.parsers,
|
59
|
+
...("svelte" in scopeExtensions && "parser" in scopeExtensions.svelte
|
60
|
+
? {
|
61
|
+
svelte: scopeExtensions.svelte.parser,
|
62
|
+
}
|
63
|
+
: {}),
|
50
64
|
};
|
51
65
|
for (const scope in scopeExtensions) {
|
52
|
-
const { [scope]: { files
|
66
|
+
const { [scope]: { files = [], ignores = [], rules = null, } = {}, } = scopeExtensions;
|
53
67
|
this
|
54
68
|
.scopes
|
55
69
|
.files[scope]
|
56
|
-
.push(...
|
70
|
+
.push(...files);
|
57
71
|
this
|
58
72
|
.scopes
|
59
73
|
.ignores[scope]
|
60
|
-
.push(...
|
61
|
-
if (
|
74
|
+
.push(...ignores);
|
75
|
+
if (rules !== null)
|
62
76
|
this
|
63
77
|
.scopes
|
64
78
|
.rules[scope]
|
65
79
|
.push({
|
66
80
|
id: scope + "/override",
|
67
|
-
rules
|
81
|
+
rules,
|
68
82
|
});
|
69
83
|
}
|
70
84
|
const OptionalScopes = new Set(optionalScopes);
|
71
85
|
for (const [scope, parents] of tree)
|
72
86
|
if (!OptionalScopes.has(scope)
|
73
|
-
|| scope in parsers)
|
87
|
+
|| scope in this.parsers)
|
74
88
|
for (const parent of parents) {
|
75
89
|
this
|
76
90
|
.scopes
|
@@ -88,8 +102,9 @@ export class Factory {
|
|
88
102
|
}
|
89
103
|
get globals() {
|
90
104
|
return [
|
91
|
-
this.
|
92
|
-
this.
|
105
|
+
this.globalConfigs.plugins,
|
106
|
+
this.globalConfigs.settings,
|
107
|
+
this.globalConfigs.ignores,
|
93
108
|
];
|
94
109
|
}
|
95
110
|
scope(scope) {
|
package/dist/factory.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,OAAO;
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,OAAO;IAwBC;IAqBD;IAvCX,aAAa,CAAC;IACd,MAAM,CAAC;IACP,OAAO,CAAC;IAEf,YACE,IAKC,EACD,cAAgC,EAChC,OAKY,EACK,QAKa,EAC9B,QAK8B,EAC9B,EACE,GAAG,EAAE,eAAe,GAAG,EAAE,EACzB,GAAG,eAAe,KAMe,EAAE,EACrB,cAKoB,EAAE;QA1BrB,aAAQ,GAAR,QAAQ,CAKK;QAgBd,gBAAW,GAAX,WAAW,CAKW;QAEtC,MAAM,EACJ,cAAc,GAAG,QAAQ;aACtB,MAAM;aACN,cAAc,EACjB,6BAA6B,GAAG,QAAQ;aACrC,MAAM;aACN,6BAA6B,EAChC,UAAU,GAAG,QAAQ;aAClB,MAAM;aACN,UAAU,EACb,WAAW,GAAG,QAAQ;aACnB,MAAM;aACN,WAAW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C,CAAC,CAAC,MAAM,KAAK,CAAC;mCACnD,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC;gCAClD,CAAC,CAAC,EAAE;gCACJ,CAAC,CAAC;oCACE,eAAe,EAAE;wCACf,GAAG,oBAAoB;wCACvB,GAAG,MAAM,KAAK,IAAI;4CAChB,CAAC,CAAC,EAAE;4CACJ,CAAC,CAAC;gDACE,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;6CAC7B;wCACL,GAAG,SAAS,KAAK,IAAI;+CAClB,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC;4CAClD,CAAC,CAAC,EAAE;4CACJ,CAAC,CAAC;gDACE,aAAa,EAAE;oDACb,GAAG,kBAAkB;oDACrB,GAAG,SAAS,KAAK,IAAI;wDACnB,CAAC,CAAC,EAAE;wDACJ,CAAC,CAAC;4DACE,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;yDAChC;iDACN;6CACF;qCACN;iCACF;4BACL,GAAG,SAAS,KAAK,IAAI;gCACnB,CAAC,CAAC,EAAE;gCACJ,CAAC,CAAC,EAAE,SAAS,EAAE;4BACjB,GAAG,QAAQ,KAAK,IAAI;gCAClB,CAAC,CAAC,EAAE;gCACJ,CAAC,CAAC,EAAE,QAAQ,EAAE;yBACjB;wBACD,GAAG,OAAO,CAAC,GAAG,CACZ,CACE,EACE,EAAE,EACF,KAAK,GACN,EACD,EAAE,CAAC,CAAC;4BACJ,IAAI,EAAE,UAAU,EAAE,GAAY;4BAC9B,KAAK;4BACL,OAAO;4BACP,KAAK;yBACN,CAAC,CACH;qBACF,CAAC;IACZ,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { Input } from "./interface/index.js";
|
2
2
|
import type { RequiredPlugin, RequiredParser } from "./scope/index.js";
|
3
3
|
import { scopes, optionalScopes } from "./scope/index.js";
|
4
|
-
export default function ({ imports
|
4
|
+
export default function ({ imports, configuration: { settings, defaults, extensions, attachments, }, }: Input<RequiredPlugin, RequiredParser, (typeof scopes[number]), (typeof optionalScopes[number])>): unknown[];
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EAEN,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,MAAM,EACN,cAAc,EAEf,MAAM,SAAS,CAAC;AAGjB,MAAM,CAAC,OAAO,WACZ,EACE,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EAEN,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,MAAM,EACN,cAAc,EAEf,MAAM,SAAS,CAAC;AAGjB,MAAM,CAAC,OAAO,WACZ,EACE,OAAO,EACP,aAAa,EAAE,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,GACF,EAAE,KAAK,CACN,cAAc,EACd,cAAc,EACd,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,EACvB,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,CAChC,aAgCF"}
|
package/dist/index.js
CHANGED
@@ -1,30 +1,11 @@
|
|
1
1
|
import { scopes, optionalScopes, tree, } from "./scope/index.js";
|
2
2
|
import { Factory } from "./factory.js";
|
3
|
-
export default function ({ imports
|
3
|
+
export default function ({ imports, configuration: { settings, defaults, extensions, attachments, }, }) {
|
4
4
|
try {
|
5
|
-
const factory = new Factory(optionalScopes,
|
6
|
-
...parsers,
|
7
|
-
..."svelte" in optional
|
8
|
-
? {
|
9
|
-
svelte: optional.svelte.parser,
|
10
|
-
}
|
11
|
-
: {},
|
12
|
-
}, defaults, extensions, attachments);
|
5
|
+
const factory = new Factory(tree, optionalScopes, imports, settings, defaults, extensions, attachments);
|
13
6
|
return [
|
14
|
-
{
|
15
|
-
name: "linted/*/plugins/",
|
16
|
-
plugins: {
|
17
|
-
...plugins,
|
18
|
-
..."svelte" in optional
|
19
|
-
? {
|
20
|
-
svelte: optional.svelte.plugin,
|
21
|
-
}
|
22
|
-
: {},
|
23
|
-
},
|
24
|
-
},
|
25
7
|
...factory.globals,
|
26
|
-
...scopes
|
27
|
-
.flatMap(scope => factory.scope(scope)),
|
8
|
+
...scopes.flatMap(scope => factory.scope(scope)),
|
28
9
|
...factory.attachments,
|
29
10
|
];
|
30
11
|
}
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,MAAM,EACN,cAAc,EACd,IAAI,GACL,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,OAAO,WACZ,EACE,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,MAAM,EACN,cAAc,EACd,IAAI,GACL,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,OAAO,WACZ,EACE,OAAO,EACP,aAAa,EAAE,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,GAMF;IAED,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,OAAO,CAMzB,IAAI,EACJ,cAAc,EACd,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAW,CACZ,CAAC;QAEF,OAAO;YACL,GAAG,OAAO,CAAC,OAAO;YAClB,GAAG,MAAM,CAAC,OAAO,CACf,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAC9B;YACD,GAAG,OAAO,CAAC,WAAW;SACO,CAAC;IAClC,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,eAAe,EACf,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { IConfig } from "../../config/index.js";
|
2
|
-
export type Extensions<Scope extends string> = {
|
2
|
+
export type Extensions<Scope extends string, OptionalScope extends Scope> = {
|
3
3
|
"*"?: Partial<IConfig["linterOptions"] & IConfig["languageOptions"]> & {
|
4
4
|
ignores?: string[];
|
5
5
|
override?: boolean;
|
@@ -8,5 +8,8 @@ export type Extensions<Scope extends string> = {
|
|
8
8
|
files?: string[];
|
9
9
|
ignores?: string[];
|
10
10
|
rules?: IConfig["rules"];
|
11
|
+
}>> & Partial<Record<OptionalScope, {
|
12
|
+
plugin: unknown;
|
13
|
+
parser: unknown;
|
11
14
|
}>>;
|
12
15
|
//# sourceMappingURL=extensions.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/configuration/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,UAAU,CACpB,KAAK,SAAS,MAAM,
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/configuration/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,UAAU,CACpB,KAAK,SAAS,MAAM,EACpB,aAAa,SAAS,KAAK,IAEzB;IACF,GAAG,CAAC,EAAE,OAAO,CACT,OAAO,CAAC,eAAe,CAAC,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAC7B,GAAG;QACF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;CACH,GACC,OAAO,CACP,MAAM,CACJ,KAAK,EACL;IACE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1B,CACF,CACF,GACC,OAAO,CACP,MAAM,CACJ,aAAa,EACb;IACE,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB,CACF,CACF,CAAC"}
|
@@ -2,10 +2,10 @@ import type { Settings } from "./settings.js";
|
|
2
2
|
import type { Defaults } from "./defaults.js";
|
3
3
|
import type { Extensions } from "./extensions.js";
|
4
4
|
import type { IAttachment } from "./attachment.js";
|
5
|
-
export interface Configuration<Scope extends string,
|
5
|
+
export interface Configuration<Parser extends Scope, Scope extends string, OptionalScope extends Scope> {
|
6
6
|
settings: Settings<Scope, Parser>;
|
7
7
|
defaults: Defaults<Scope>;
|
8
|
-
extensions: Extensions<Scope>;
|
8
|
+
extensions: Extensions<Scope, OptionalScope>;
|
9
9
|
attachments: readonly IAttachment[];
|
10
10
|
}
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/configuration/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,WAAW,aAAa,CAC5B,KAAK,SAAS,MAAM,EACpB,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/configuration/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,WAAW,aAAa,CAC5B,MAAM,SAAS,KAAK,EACpB,KAAK,SAAS,MAAM,EACpB,aAAa,SAAS,KAAK;IAE3B,QAAQ,EAAE,QAAQ,CAChB,KAAK,EACL,MAAM,CACP,CAAC;IACF,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1B,UAAU,EAAE,UAAU,CACpB,KAAK,EACL,aAAa,CACd,CAAC;IACF,WAAW,EAAE,SAAS,WAAW,EAAE,CAAC;CACrC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { IConfig } from "../../config/index.js";
|
2
2
|
import type { ScopeManifest } from "./manifest/index.js";
|
3
|
-
export interface Settings<Scope extends string, Parser extends
|
3
|
+
export interface Settings<Scope extends string, Parser extends Scope> {
|
4
4
|
global: IConfig["linterOptions"] & IConfig["languageOptions"];
|
5
5
|
registry: Record<Scope, ScopeManifest<Parser>>;
|
6
6
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/configuration/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,QAAQ,CACvB,KAAK,SAAS,MAAM,EACpB,MAAM,SAAS,
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/configuration/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,QAAQ,CACvB,KAAK,SAAS,MAAM,EACpB,MAAM,SAAS,KAAK;IAEpB,MAAM,EACF,OAAO,CAAC,eAAe,CAAC,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAC7B;IACD,QAAQ,EAAE,MAAM,CACd,KAAK,EACL,aAAa,CACX,MAAM,CACP,CACF,CAAC;CACH"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../../../src/interface/input/imports.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO,CACtB,cAAc,SAAS,MAAM,EAC7B,cAAc,SAAS,MAAM;IAE7B,OAAO,EAAE,MAAM,CACb,cAAc,EACd,OAAO,CACR,CAAC;IACF,OAAO,EAAE,MAAM,CACb,cAAc,EACd,OAAO,CACR,CAAC;CACH"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"imports.js","sourceRoot":"","sources":["../../../src/interface/input/imports.ts"],"names":[],"mappings":""}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type { Imports } from "./imports
|
1
|
+
import type { Imports } from "./imports.js";
|
2
2
|
import type { Configuration } from "./configuration/index.js";
|
3
|
-
export interface Input<RequiredPlugin extends string, RequiredParser extends
|
4
|
-
imports: Imports<RequiredPlugin, RequiredParser
|
5
|
-
configuration: Configuration<
|
3
|
+
export interface Input<RequiredPlugin extends string, RequiredParser extends Scope, Scope extends string, OptionalScope extends Scope> {
|
4
|
+
imports: Imports<RequiredPlugin, RequiredParser>;
|
5
|
+
configuration: Configuration<(RequiredParser | OptionalScope), Scope, OptionalScope>;
|
6
6
|
}
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/input/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,KAAK,CACpB,cAAc,SAAS,MAAM,EAC7B,cAAc,SAAS,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/input/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,KAAK,CACpB,cAAc,SAAS,MAAM,EAC7B,cAAc,SAAS,KAAK,EAC5B,KAAK,SAAS,MAAM,EACpB,aAAa,SAAS,KAAK;IAE3B,OAAO,EAAE,OAAO,CACd,cAAc,EACd,cAAc,CACf,CAAC;IACF,aAAa,EAAE,aAAa,CAC1B,CACI,cAAc,GACd,aAAa,CAChB,EACD,KAAK,EACL,aAAa,CACd,CAAC;CACH"}
|
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"$schema": "https://json.schemastore.org/package",
|
4
4
|
"$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
|
5
5
|
"name": "@eslinted/core",
|
6
|
-
"version": "
|
6
|
+
"version": "24.0.0",
|
7
7
|
"repository": "github:jimmy-zhening-luo/linted-core",
|
8
8
|
"description": "Internal core for npm package `linted`, responsible for producing an array of fully-formed ESLint configurations according to `linted` spec.",
|
9
9
|
"keywords": [],
|
package/src/_test/index.ts
CHANGED
@@ -6,24 +6,22 @@ Parser = (scope: string) => `MOCK_PARSER:${scope}`;
|
|
6
6
|
|
7
7
|
export const TEST_INPUT = {
|
8
8
|
imports: {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
yml: Parser("YML"),
|
26
|
-
},
|
9
|
+
plugins: {
|
10
|
+
"@stylistic": Plugin,
|
11
|
+
"@typescript-eslint": Plugin,
|
12
|
+
mocha: Plugin,
|
13
|
+
"chai-friendly": Plugin,
|
14
|
+
"chai-expect": Plugin,
|
15
|
+
"@html-eslint": Plugin,
|
16
|
+
css: Plugin,
|
17
|
+
json: Plugin,
|
18
|
+
jsonc: Plugin,
|
19
|
+
yml: Plugin,
|
20
|
+
},
|
21
|
+
parsers: {
|
22
|
+
ts: Parser("TS"),
|
23
|
+
html: Parser("HTML"),
|
24
|
+
yml: Parser("YML"),
|
27
25
|
},
|
28
26
|
},
|
29
27
|
configuration: {
|
package/src/factory.ts
CHANGED
@@ -2,41 +2,39 @@ import type { Input } from "./interface";
|
|
2
2
|
|
3
3
|
export class Factory<
|
4
4
|
RequiredPlugin extends string,
|
5
|
-
RequiredParser extends
|
6
|
-
OptionalImport extends string,
|
5
|
+
RequiredParser extends Scope,
|
7
6
|
Scope extends string,
|
7
|
+
OptionalScope extends Scope,
|
8
8
|
> {
|
9
|
-
public
|
9
|
+
public globalConfigs;
|
10
10
|
public scopes;
|
11
|
+
public parsers;
|
11
12
|
|
12
13
|
constructor(
|
13
|
-
optionalScopes: readonly Scope[],
|
14
14
|
tree: Array<
|
15
15
|
readonly [
|
16
16
|
Scope,
|
17
17
|
readonly Scope[],
|
18
18
|
]
|
19
19
|
>,
|
20
|
+
optionalScopes: readonly Scope[],
|
21
|
+
imports: Input<
|
22
|
+
RequiredPlugin,
|
23
|
+
RequiredParser,
|
24
|
+
Scope,
|
25
|
+
OptionalScope
|
26
|
+
>["imports"],
|
20
27
|
private readonly settings: Input<
|
21
28
|
RequiredPlugin,
|
22
29
|
RequiredParser,
|
23
|
-
|
24
|
-
|
30
|
+
Scope,
|
31
|
+
OptionalScope
|
25
32
|
>["configuration"]["settings"],
|
26
|
-
public parsers: Record<
|
27
|
-
RequiredParser,
|
28
|
-
unknown
|
29
|
-
> & Partial<
|
30
|
-
Record<
|
31
|
-
OptionalImport,
|
32
|
-
unknown
|
33
|
-
>
|
34
|
-
>,
|
35
33
|
defaults: Input<
|
36
34
|
RequiredPlugin,
|
37
35
|
RequiredParser,
|
38
|
-
|
39
|
-
|
36
|
+
Scope,
|
37
|
+
OptionalScope
|
40
38
|
>["configuration"]["defaults"],
|
41
39
|
{
|
42
40
|
"*": globalExtension = {},
|
@@ -44,14 +42,14 @@ export class Factory<
|
|
44
42
|
}: Input<
|
45
43
|
RequiredPlugin,
|
46
44
|
RequiredParser,
|
47
|
-
|
48
|
-
|
45
|
+
Scope,
|
46
|
+
OptionalScope
|
49
47
|
>["configuration"]["extensions"] = {},
|
50
48
|
public readonly attachments: Input<
|
51
49
|
RequiredPlugin,
|
52
50
|
RequiredParser,
|
53
|
-
|
54
|
-
|
51
|
+
Scope,
|
52
|
+
OptionalScope
|
55
53
|
>["configuration"]["attachments"] = [],
|
56
54
|
) {
|
57
55
|
const {
|
@@ -67,13 +65,20 @@ export class Factory<
|
|
67
65
|
ecmaVersion = settings
|
68
66
|
.global
|
69
67
|
.ecmaVersion,
|
70
|
-
} = globalExtension,
|
71
|
-
{
|
72
|
-
ignores = [],
|
73
|
-
override = false,
|
74
68
|
} = globalExtension;
|
75
69
|
|
76
|
-
this.
|
70
|
+
this.globalConfigs = {
|
71
|
+
plugins: {
|
72
|
+
name: "linted/*/plugins/" as const,
|
73
|
+
plugins: {
|
74
|
+
...imports.plugins,
|
75
|
+
..."svelte" in scopeExtensions && "plugin" in (scopeExtensions.svelte as object)
|
76
|
+
? {
|
77
|
+
svelte: (scopeExtensions.svelte as { plugin: unknown }).plugin,
|
78
|
+
}
|
79
|
+
: {},
|
80
|
+
},
|
81
|
+
},
|
77
82
|
settings: {
|
78
83
|
name: "linted/*/settings/" as const,
|
79
84
|
linterOptions: {
|
@@ -88,61 +93,68 @@ export class Factory<
|
|
88
93
|
ignores: {
|
89
94
|
name: "linted/*/ignores/" as const,
|
90
95
|
ignores: [
|
91
|
-
...override
|
96
|
+
...globalExtension.override === true
|
92
97
|
? []
|
93
|
-
: defaults
|
94
|
-
|
95
|
-
...ignores,
|
98
|
+
: defaults.ignores["*"],
|
99
|
+
...globalExtension.ignores ?? [],
|
96
100
|
],
|
97
101
|
},
|
98
102
|
};
|
99
103
|
this.scopes = {
|
100
|
-
files: defaults
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
104
|
+
files: defaults.files,
|
105
|
+
ignores: defaults.ignores,
|
106
|
+
rules: defaults.rules,
|
107
|
+
};
|
108
|
+
this.parsers = {
|
109
|
+
...imports.parsers,
|
110
|
+
...("svelte" in scopeExtensions && "parser" in (scopeExtensions.svelte as object)
|
111
|
+
? {
|
112
|
+
svelte: (scopeExtensions.svelte as { parser: unknown }).parser,
|
113
|
+
}
|
114
|
+
: {}) as unknown as Partial<
|
115
|
+
Record<
|
116
|
+
OptionalScope,
|
117
|
+
unknown
|
118
|
+
>
|
119
|
+
>,
|
106
120
|
};
|
107
121
|
|
108
122
|
for (const scope in scopeExtensions) {
|
109
123
|
const {
|
110
124
|
[scope as keyof typeof scopeExtensions]: {
|
111
|
-
files
|
112
|
-
ignores
|
113
|
-
rules
|
125
|
+
files = [],
|
126
|
+
ignores = [],
|
127
|
+
rules = null,
|
114
128
|
} = {},
|
115
129
|
} = scopeExtensions;
|
116
130
|
|
117
131
|
this
|
118
132
|
.scopes
|
119
133
|
.files[scope as keyof typeof scopeExtensions]
|
120
|
-
.push(...
|
134
|
+
.push(...files);
|
121
135
|
this
|
122
136
|
.scopes
|
123
137
|
.ignores[scope as keyof typeof scopeExtensions]
|
124
|
-
.push(...
|
138
|
+
.push(...ignores);
|
125
139
|
|
126
|
-
if (
|
140
|
+
if (rules !== null)
|
127
141
|
this
|
128
142
|
.scopes
|
129
143
|
.rules[scope as keyof typeof scopeExtensions]
|
130
144
|
.push(
|
131
145
|
{
|
132
146
|
id: scope + "/override",
|
133
|
-
rules
|
147
|
+
rules,
|
134
148
|
},
|
135
149
|
);
|
136
150
|
}
|
137
151
|
|
138
|
-
const OptionalScopes = new Set<Scope>(
|
139
|
-
optionalScopes,
|
140
|
-
);
|
152
|
+
const OptionalScopes = new Set<Scope>(optionalScopes);
|
141
153
|
|
142
154
|
for (const [scope, parents] of tree)
|
143
155
|
if (
|
144
156
|
!OptionalScopes.has(scope)
|
145
|
-
|| scope in parsers
|
157
|
+
|| scope in this.parsers
|
146
158
|
)
|
147
159
|
for (const parent of parents) {
|
148
160
|
this
|
@@ -166,8 +178,9 @@ export class Factory<
|
|
166
178
|
|
167
179
|
public get globals() {
|
168
180
|
return [
|
169
|
-
this.
|
170
|
-
this.
|
181
|
+
this.globalConfigs.plugins,
|
182
|
+
this.globalConfigs.settings,
|
183
|
+
this.globalConfigs.ignores,
|
171
184
|
] as const;
|
172
185
|
}
|
173
186
|
|
package/src/index.ts
CHANGED
@@ -15,13 +15,7 @@ import { Factory } from "./factory";
|
|
15
15
|
|
16
16
|
export default function (
|
17
17
|
{
|
18
|
-
imports
|
19
|
-
required: {
|
20
|
-
plugins,
|
21
|
-
parsers,
|
22
|
-
},
|
23
|
-
optional = {},
|
24
|
-
},
|
18
|
+
imports,
|
25
19
|
configuration: {
|
26
20
|
settings,
|
27
21
|
defaults,
|
@@ -31,50 +25,31 @@ export default function (
|
|
31
25
|
}: Input<
|
32
26
|
RequiredPlugin,
|
33
27
|
RequiredParser,
|
34
|
-
(typeof
|
35
|
-
(typeof
|
28
|
+
(typeof scopes[number]),
|
29
|
+
(typeof optionalScopes[number])
|
36
30
|
>,
|
37
31
|
) {
|
38
32
|
try {
|
39
33
|
const factory = new Factory<
|
40
34
|
RequiredPlugin,
|
41
35
|
RequiredParser,
|
42
|
-
(typeof
|
43
|
-
(typeof
|
36
|
+
(typeof scopes[number]),
|
37
|
+
(typeof optionalScopes[number])
|
44
38
|
>(
|
45
|
-
optionalScopes,
|
46
39
|
tree,
|
40
|
+
optionalScopes,
|
41
|
+
imports,
|
47
42
|
settings,
|
48
|
-
{
|
49
|
-
...parsers,
|
50
|
-
..."svelte" in optional
|
51
|
-
? {
|
52
|
-
svelte: optional.svelte.parser,
|
53
|
-
}
|
54
|
-
: {},
|
55
|
-
},
|
56
43
|
defaults,
|
57
44
|
extensions,
|
58
45
|
attachments,
|
59
46
|
);
|
60
47
|
|
61
48
|
return [
|
62
|
-
{
|
63
|
-
name: "linted/*/plugins/",
|
64
|
-
plugins: {
|
65
|
-
...plugins,
|
66
|
-
..."svelte" in optional
|
67
|
-
? {
|
68
|
-
svelte: optional.svelte.plugin,
|
69
|
-
}
|
70
|
-
: {},
|
71
|
-
},
|
72
|
-
},
|
73
49
|
...factory.globals,
|
74
|
-
...scopes
|
75
|
-
.
|
76
|
-
|
77
|
-
),
|
50
|
+
...scopes.flatMap(
|
51
|
+
scope => factory.scope(scope),
|
52
|
+
),
|
78
53
|
...factory.attachments,
|
79
54
|
] satisfies Output as unknown[];
|
80
55
|
}
|
@@ -2,6 +2,7 @@ import type { IConfig } from "../../config";
|
|
2
2
|
|
3
3
|
export type Extensions<
|
4
4
|
Scope extends string,
|
5
|
+
OptionalScope extends Scope,
|
5
6
|
>
|
6
7
|
= & {
|
7
8
|
"*"?: Partial<
|
@@ -21,4 +22,13 @@ export type Extensions<
|
|
21
22
|
rules?: IConfig["rules"];
|
22
23
|
}
|
23
24
|
>
|
25
|
+
>
|
26
|
+
& Partial<
|
27
|
+
Record<
|
28
|
+
OptionalScope,
|
29
|
+
{
|
30
|
+
plugin: unknown;
|
31
|
+
parser: unknown;
|
32
|
+
}
|
33
|
+
>
|
24
34
|
>;
|
@@ -4,14 +4,18 @@ import type { Extensions } from "./extensions";
|
|
4
4
|
import type { IAttachment } from "./attachment";
|
5
5
|
|
6
6
|
export interface Configuration<
|
7
|
+
Parser extends Scope,
|
7
8
|
Scope extends string,
|
8
|
-
|
9
|
+
OptionalScope extends Scope,
|
9
10
|
> {
|
10
11
|
settings: Settings<
|
11
12
|
Scope,
|
12
13
|
Parser
|
13
14
|
>;
|
14
15
|
defaults: Defaults<Scope>;
|
15
|
-
extensions: Extensions<
|
16
|
+
extensions: Extensions<
|
17
|
+
Scope,
|
18
|
+
OptionalScope
|
19
|
+
>;
|
16
20
|
attachments: readonly IAttachment[];
|
17
21
|
}
|
@@ -3,20 +3,20 @@ import type { Configuration } from "./configuration";
|
|
3
3
|
|
4
4
|
export interface Input<
|
5
5
|
RequiredPlugin extends string,
|
6
|
-
RequiredParser extends
|
7
|
-
OptionalImport extends string,
|
6
|
+
RequiredParser extends Scope,
|
8
7
|
Scope extends string,
|
8
|
+
OptionalScope extends Scope,
|
9
9
|
> {
|
10
10
|
imports: Imports<
|
11
11
|
RequiredPlugin,
|
12
|
-
RequiredParser
|
13
|
-
OptionalImport
|
12
|
+
RequiredParser
|
14
13
|
>;
|
15
14
|
configuration: Configuration<
|
16
|
-
Scope,
|
17
15
|
(
|
18
16
|
| RequiredParser
|
19
|
-
|
|
20
|
-
)
|
17
|
+
| OptionalScope
|
18
|
+
),
|
19
|
+
Scope,
|
20
|
+
OptionalScope
|
21
21
|
>;
|
22
22
|
}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import type { RequiredImports } from "./required.js";
|
2
|
-
import type { OptionalImports } from "./optional.js";
|
3
|
-
export interface Imports<RequiredPlugin extends string, RequiredParser extends string, OptionalImport extends string> {
|
4
|
-
required: RequiredImports<RequiredPlugin, RequiredParser>;
|
5
|
-
optional?: OptionalImports<OptionalImport>;
|
6
|
-
}
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/imports/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,WAAW,OAAO,CACtB,cAAc,SAAS,MAAM,EAC7B,cAAc,SAAS,MAAM,EAC7B,cAAc,SAAS,MAAM;IAE7B,QAAQ,EAAE,eAAe,CACvB,cAAc,EACd,cAAc,CACf,CAAC;IACF,QAAQ,CAAC,EAAE,eAAe,CACxB,cAAc,CACf,CAAC;CACH"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interface/input/imports/index.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"optional.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/imports/optional.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,CACzB,cAAc,SAAS,MAAM,IAC3B,OAAO,CACT,MAAM,CACJ,cAAc,EACd;IACE,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB,CACF,CACF,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"optional.js","sourceRoot":"","sources":["../../../../src/interface/input/imports/optional.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"required.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/imports/required.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe,CAC9B,cAAc,SAAS,MAAM,EAC7B,cAAc,SAAS,MAAM;IAE7B,OAAO,EAAE,MAAM,CACb,cAAc,EACd,OAAO,CACR,CAAC;IACF,OAAO,EAAE,MAAM,CACb,cAAc,EACd,OAAO,CACR,CAAC;CACH"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"required.js","sourceRoot":"","sources":["../../../../src/interface/input/imports/required.ts"],"names":[],"mappings":""}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import type { RequiredImports } from "./required";
|
2
|
-
import type { OptionalImports } from "./optional";
|
3
|
-
|
4
|
-
export interface Imports<
|
5
|
-
RequiredPlugin extends string,
|
6
|
-
RequiredParser extends string,
|
7
|
-
OptionalImport extends string,
|
8
|
-
> {
|
9
|
-
required: RequiredImports<
|
10
|
-
RequiredPlugin,
|
11
|
-
RequiredParser
|
12
|
-
>;
|
13
|
-
optional?: OptionalImports<
|
14
|
-
OptionalImport
|
15
|
-
>;
|
16
|
-
}
|