@eslinted/core 3.0.3-rc.1 → 3.0.3-rc.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/boundary/input/files/base/base.d.ts +1 -1
- package/dist/boundary/input/files/base/base.d.ts.map +1 -1
- package/dist/boundary/input/files/base/list/list.d.ts +1 -1
- package/dist/boundary/input/files/base/list/list.d.ts.map +1 -1
- package/dist/boundary/input/files/files.d.ts +1 -1
- package/dist/boundary/input/files/files.d.ts.map +1 -1
- package/dist/boundary/input/files/includes/includes.d.ts +1 -1
- package/dist/boundary/input/files/includes/includes.d.ts.map +1 -1
- package/dist/boundary/input/input.d.ts +1 -1
- package/dist/boundary/input/input.d.ts.map +1 -1
- package/dist/boundary/input/parsers/parsers.d.ts +1 -1
- package/dist/boundary/input/parsers/parsers.d.ts.map +1 -1
- package/dist/boundary/input/plugins/plugins.d.ts +1 -1
- package/dist/boundary/input/plugins/plugins.d.ts.map +1 -1
- package/dist/boundary/input/rules/overrides/overrides.d.ts +1 -1
- package/dist/boundary/input/rules/overrides/overrides.d.ts.map +1 -1
- package/dist/boundary/input/rules/preset/entry/entry.d.ts +1 -1
- package/dist/boundary/input/rules/preset/entry/entry.d.ts.map +1 -1
- package/dist/boundary/input/rules/preset/entry/object/object.d.ts +1 -1
- package/dist/boundary/input/rules/preset/entry/object/object.d.ts.map +1 -1
- package/dist/boundary/input/rules/preset/entry/object/state/level.d.ts +1 -1
- package/dist/boundary/input/rules/preset/entry/object/state/level.d.ts.map +1 -1
- package/dist/boundary/input/rules/preset/preset.d.ts +1 -1
- package/dist/boundary/input/rules/preset/preset.d.ts.map +1 -1
- package/dist/boundary/input/rules/rules.d.ts +1 -1
- package/dist/boundary/input/rules/rules.d.ts.map +1 -1
- package/dist/dependency/dependency.d.ts +1 -1
- package/dist/dependency/dependency.d.ts.map +1 -1
- package/dist/factory/files/Files.d.ts.map +1 -1
- package/dist/factory/files/Files.js +1 -4
- package/dist/factory/files/Files.js.map +1 -1
- package/dist/factory/options/option/Option.d.ts.map +1 -1
- package/dist/factory/options/option/Option.js +2 -10
- package/dist/factory/options/option/Option.js.map +1 -1
- package/dist/factory/options/option/html/index.d.ts.map +1 -1
- package/dist/factory/options/option/html/index.js +2 -7
- package/dist/factory/options/option/html/index.js.map +1 -1
- package/dist/factory/options/option/js/index.d.ts.map +1 -1
- package/dist/factory/options/option/js/index.js +4 -9
- package/dist/factory/options/option/js/index.js.map +1 -1
- package/dist/factory/options/option/json/index.d.ts.map +1 -1
- package/dist/factory/options/option/json/index.js +2 -7
- package/dist/factory/options/option/json/index.js.map +1 -1
- package/dist/factory/options/option/jsonc/index.d.ts.map +1 -1
- package/dist/factory/options/option/jsonc/index.js +2 -7
- package/dist/factory/options/option/jsonc/index.js.map +1 -1
- package/dist/factory/options/option/md/index.d.ts.map +1 -1
- package/dist/factory/options/option/md/index.js +2 -7
- package/dist/factory/options/option/md/index.js.map +1 -1
- package/dist/factory/options/option/mocha/index.d.ts +1 -1
- package/dist/factory/options/option/mocha/index.d.ts.map +1 -1
- package/dist/factory/options/option/mocha/index.js +8 -17
- package/dist/factory/options/option/mocha/index.js.map +1 -1
- package/dist/factory/options/option/svelte/index.d.ts +5 -5
- package/dist/factory/options/option/svelte/index.d.ts.map +1 -1
- package/dist/factory/options/option/svelte/index.js +11 -16
- package/dist/factory/options/option/svelte/index.js.map +1 -1
- package/dist/factory/options/option/ts/index.d.ts +3 -3
- package/dist/factory/options/option/ts/index.d.ts.map +1 -1
- package/dist/factory/options/option/ts/index.js +7 -16
- package/dist/factory/options/option/ts/index.js.map +1 -1
- package/dist/factory/options/option/yml/index.d.ts.map +1 -1
- package/dist/factory/options/option/yml/index.js +2 -7
- package/dist/factory/options/option/yml/index.js.map +1 -1
- package/dist/factory/ruleset/Ruleset.d.ts +1 -1
- package/dist/factory/ruleset/Ruleset.d.ts.map +1 -1
- package/dist/factory/ruleset/Ruleset.js +5 -15
- package/dist/factory/ruleset/Ruleset.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -37
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/boundary/input/files/base/base.ts +1 -4
- package/src/boundary/input/files/base/list/list.ts +1 -4
- package/src/boundary/input/files/files.ts +1 -4
- package/src/boundary/input/files/includes/includes.ts +1 -4
- package/src/boundary/input/input.ts +1 -4
- package/src/boundary/input/parsers/parsers.ts +1 -5
- package/src/boundary/input/plugins/plugins.ts +1 -5
- package/src/boundary/input/rules/overrides/overrides.ts +1 -4
- package/src/boundary/input/rules/preset/entry/entry.ts +1 -4
- package/src/boundary/input/rules/preset/entry/object/object.ts +1 -4
- package/src/boundary/input/rules/preset/entry/object/state/level.ts +1 -4
- package/src/boundary/input/rules/preset/preset.ts +1 -4
- package/src/boundary/input/rules/rules.ts +1 -4
- package/src/dependency/dependency.ts +1 -5
- package/src/factory/files/Files.ts +2 -10
- package/src/factory/options/option/Option.ts +15 -45
- package/src/factory/options/option/html/index.ts +2 -10
- package/src/factory/options/option/js/index.ts +4 -12
- package/src/factory/options/option/json/index.ts +2 -10
- package/src/factory/options/option/jsonc/index.ts +2 -10
- package/src/factory/options/option/md/index.ts +2 -10
- package/src/factory/options/option/mocha/index.ts +10 -22
- package/src/factory/options/option/svelte/index.ts +12 -22
- package/src/factory/options/option/ts/index.ts +8 -21
- package/src/factory/options/option/yml/index.ts +2 -10
- package/src/factory/ruleset/Ruleset.ts +8 -40
- package/src/index.ts +16 -47
- package/src/OmitFilesRuleset.d.ts +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAErC,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,MAAM,CACpC,IAAI,EACJ,oBAAoB,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EACpD,IAAI,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAErC,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,MAAM,CACpC,IAAI,EACJ,oBAAoB,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EACpD,IAAI,EACJ;IAAE,OAAO,EAAE,eAAe,CAAA;CAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,EAC9D,CAAC,CACF;IACC,SAAgB,KAAK,QAAQ;IAC7B,SAAgB,SAAS,KAAe;IAExC,IAAW,eAAe;;;;;;;;;MASzB;CACF"}
|
@@ -3,22 +3,13 @@ export default class Ts extends Option {
|
|
3
3
|
scope = "ts";
|
4
4
|
processor = {};
|
5
5
|
get languageOptions() {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
ecmaVersion: "latest",
|
14
|
-
sourceType: "module",
|
15
|
-
project: "tsconfig.json",
|
16
|
-
},
|
17
|
-
};
|
18
|
-
}
|
19
|
-
catch (e) {
|
20
|
-
throw new Error(`linted.factory.options.ts: languageOptions`, { cause: e });
|
21
|
-
}
|
6
|
+
const [parser] = this.parser;
|
7
|
+
return {
|
8
|
+
ecmaVersion: "latest",
|
9
|
+
sourceType: "module",
|
10
|
+
parser,
|
11
|
+
parserOptions: { project: "tsconfig.json", ecmaVersion: "latest", sourceType: "module" },
|
12
|
+
};
|
22
13
|
}
|
23
14
|
}
|
24
15
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAGlC,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAGlC,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,MAM/B;IACiB,KAAK,GAAG,IAAI,CAAC;IACb,SAAS,GAAG,EAAW,CAAC;IAExC,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO;YACL,WAAW,EAAE,QAAQ;YACrB,UAAU,EAAE,QAAQ;YACpB,MAAM;YACN,aAAa,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE;SAChF,CAAC;IACb,CAAC;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/yml/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,MAAM,CACrC,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,KAAK,SAAS;IAC9B,SAAgB,SAAS,KAAe;IAExC,IAAW,eAAe;;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/yml/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,MAAM,CACrC,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,KAAK,SAAS;IAC9B,SAAgB,SAAS,KAAe;IAExC,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -3,13 +3,8 @@ export default class Yml extends Option {
|
|
3
3
|
scope = "yml";
|
4
4
|
processor = {};
|
5
5
|
get languageOptions() {
|
6
|
-
|
7
|
-
|
8
|
-
return { parser };
|
9
|
-
}
|
10
|
-
catch (e) {
|
11
|
-
throw new Error(`linted.factory.options.yml: languageOptions`, { cause: e });
|
12
|
-
}
|
6
|
+
const [parser] = this.parser;
|
7
|
+
return { parser };
|
13
8
|
}
|
14
9
|
}
|
15
10
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/yml/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,MAMhC;IACiB,KAAK,GAAG,KAAK,CAAC;IACd,SAAS,GAAG,EAAW,CAAC;IAExC,IAAW,eAAe;QACxB,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/yml/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,MAMhC;IACiB,KAAK,GAAG,KAAK,CAAC;IACd,SAAS,GAAG,EAAW,CAAC;IAExC,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO,EAAE,MAAM,EAAW,CAAC;IAC7B,CAAC;CACF"}
|
@@ -7,7 +7,7 @@ export default class Ruleset<S extends Scope> {
|
|
7
7
|
overrides: Null<Rule>;
|
8
8
|
constructor(scope: literalful<S>, ...rules: readonly Rule[]);
|
9
9
|
get id(): literalful<S>;
|
10
|
-
get records(): (readonly [string, Readonly<Record<string, import("../../boundary/input/rules/preset/entry/object/state/level.js").
|
10
|
+
get records(): (readonly [string, Readonly<Record<string, import("../../boundary/input/rules/preset/entry/object/state/level.js").Level | readonly [import("../../boundary/input/rules/preset/entry/object/state/level.js").Level, ...unknown[]]>>])[];
|
11
11
|
override(overrides: undefined | Rule["rules"]): this;
|
12
12
|
}
|
13
13
|
//# sourceMappingURL=Ruleset.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Ruleset.d.ts","sourceRoot":"","sources":["../../../src/factory/ruleset/Ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,MAAM,CAAC,OAAO,OAAO,OAAO,CAAC,CAAC,SAAS,KAAK;
|
1
|
+
{"version":3,"file":"Ruleset.d.ts","sourceRoot":"","sources":["../../../src/factory/ruleset/Ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,MAAM,CAAC,OAAO,OAAO,OAAO,CAAC,CAAC,SAAS,KAAK;IAI9B,OAAO,CAAC,QAAQ,CAAC,KAAK;IAHlC,SAAgB,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC;IAClC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAQ;gBAEP,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,SAAS,IAAI,EAAE;IAO5E,IAAW,EAAE,kBAIZ;IAED,IAAW,OAAO,4OAUjB;IAEM,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC;CAMrD"}
|
@@ -14,13 +14,8 @@ export default class Ruleset {
|
|
14
14
|
}
|
15
15
|
}
|
16
16
|
get id() {
|
17
|
-
|
18
|
-
|
19
|
-
return scope;
|
20
|
-
}
|
21
|
-
catch (e) {
|
22
|
-
throw new Error(`linted.factory.Ruleset: id`, { cause: e });
|
23
|
-
}
|
17
|
+
const { scope } = this;
|
18
|
+
return scope;
|
24
19
|
}
|
25
20
|
get records() {
|
26
21
|
try {
|
@@ -35,14 +30,9 @@ export default class Ruleset {
|
|
35
30
|
}
|
36
31
|
}
|
37
32
|
override(overrides) {
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
return this;
|
42
|
-
}
|
43
|
-
catch (e) {
|
44
|
-
throw new Error(`linted.factory.Ruleset: override`, { cause: e });
|
45
|
-
}
|
33
|
+
if (typeof overrides !== "undefined")
|
34
|
+
this.overrides = new Rule("override", overrides);
|
35
|
+
return this;
|
46
36
|
}
|
47
37
|
}
|
48
38
|
//# sourceMappingURL=Ruleset.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Ruleset.js","sourceRoot":"","sources":["../../../src/factory/ruleset/Ruleset.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,MAAM,CAAC,OAAO,OAAO,OAAO;
|
1
|
+
{"version":3,"file":"Ruleset.js","sourceRoot":"","sources":["../../../src/factory/ruleset/Ruleset.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,MAAM,CAAC,OAAO,OAAO,OAAO;IAIG;IAHb,OAAO,CAAkB;IAClC,SAAS,GAAe,IAAI,CAAC;IAEpC,YAA6B,KAAoB,EAAE,GAAG,KAAsB;QAA/C,UAAK,GAAL,KAAK,CAAe;QAC/C,IAAI,CAAC;YACH,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;QAC5B,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAAC,CAAC;IACxE,CAAC;IAED,IAAW,EAAE;QACX,MAAM,EAAE,KAAK,EAAE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CAAC,QAAQ,CAAC;CACzC,EACD,KAAK,EAAE;IACL,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;IACpC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC;CAC3C,GACA,QAAQ,CAAC,MAAM,EAAE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AASxD,YAAY,EAAE,QAAQ,EAAE,CAAC;AACzB,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,EAC/B,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,EAC/B,KAAK,EAAE;IACL,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;IAChC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;CACzC,EACD,KAAK,EAAE;IACL,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;IACpC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC;CAC3C,GACA,QAAQ,CAAC,MAAM,EAAE,CAsInB"}
|
package/dist/index.js
CHANGED
@@ -27,54 +27,28 @@ export default function (plugins, parsers, files, rules) {
|
|
27
27
|
rulesets[scope].override(rules.overrides[scope]);
|
28
28
|
const options = {
|
29
29
|
js: new Options
|
30
|
-
.js(f.files("js"), rulesets.js, {
|
31
|
-
"@stylistic": plugins["@stylistic"],
|
32
|
-
}, scopedParsers.js)
|
33
|
-
.configs,
|
30
|
+
.js(f.files("js"), rulesets.js, { "@stylistic": plugins["@stylistic"] }, scopedParsers.js).configs,
|
34
31
|
ts: new Options
|
35
|
-
.ts(f.files("ts"), rulesets.ts, {
|
36
|
-
"@stylistic": plugins["@stylistic"],
|
37
|
-
"@typescript-eslint": plugins["@typescript-eslint"],
|
38
|
-
}, scopedParsers.ts)
|
39
|
-
.configs,
|
32
|
+
.ts(f.files("ts"), rulesets.ts, { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"] }, scopedParsers.ts).configs,
|
40
33
|
svelte: new Options
|
41
|
-
.svelte(f.files("svelte"), rulesets.svelte, {
|
42
|
-
"@stylistic": plugins["@stylistic"],
|
43
|
-
"@typescript-eslint": plugins["@typescript-eslint"],
|
44
|
-
svelte: plugins.svelte,
|
45
|
-
}, scopedParsers.svelte)
|
46
|
-
.configs,
|
34
|
+
.svelte(f.files("svelte"), rulesets.svelte, { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], svelte: plugins.svelte }, scopedParsers.svelte).configs,
|
47
35
|
mocha: new Options
|
48
|
-
.mocha(f.files("mocha"), rulesets.mocha, {
|
49
|
-
"@stylistic": plugins["@stylistic"],
|
50
|
-
"@typescript-eslint": plugins["@typescript-eslint"],
|
51
|
-
mocha: plugins.mocha,
|
52
|
-
}, scopedParsers.mocha)
|
53
|
-
.configs,
|
36
|
+
.mocha(f.files("mocha"), rulesets.mocha, { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], mocha: plugins.mocha }, scopedParsers.mocha).configs,
|
54
37
|
html: new Options
|
55
|
-
.html(f.files("html"), rulesets.html, { "@html-eslint": plugins["@html-eslint"] }, scopedParsers.html)
|
56
|
-
.configs,
|
38
|
+
.html(f.files("html"), rulesets.html, { "@html-eslint": plugins["@html-eslint"] }, scopedParsers.html).configs,
|
57
39
|
json: new Options
|
58
|
-
.json(f.files("json"), rulesets.json, { jsonc: plugins.jsonc }, scopedParsers.json)
|
59
|
-
.configs,
|
40
|
+
.json(f.files("json"), rulesets.json, { jsonc: plugins.jsonc }, scopedParsers.json).configs,
|
60
41
|
jsonc: new Options
|
61
|
-
.jsonc(f.files("jsonc"), rulesets.jsonc, { jsonc: plugins.jsonc }, scopedParsers.jsonc)
|
62
|
-
.configs,
|
42
|
+
.jsonc(f.files("jsonc"), rulesets.jsonc, { jsonc: plugins.jsonc }, scopedParsers.jsonc).configs,
|
63
43
|
yml: new Options
|
64
|
-
.yml(f.files("yml"), rulesets.yml, { yml: plugins.yml }, scopedParsers.yml)
|
65
|
-
.configs,
|
44
|
+
.yml(f.files("yml"), rulesets.yml, { yml: plugins.yml }, scopedParsers.yml).configs,
|
66
45
|
md: new Options
|
67
|
-
.md(f.files("md"), rulesets.md, {
|
68
|
-
markdownlint: plugins.markdownlint,
|
69
|
-
}, scopedParsers.md)
|
70
|
-
.configs,
|
46
|
+
.md(f.files("md"), rulesets.md, { markdownlint: plugins.markdownlint }, scopedParsers.md).configs,
|
71
47
|
};
|
72
|
-
return scopes
|
73
|
-
.map(scope => options[scope])
|
74
|
-
.flat();
|
48
|
+
return scopes.flatMap(scope => options[scope]);
|
75
49
|
}
|
76
50
|
catch (e) {
|
77
|
-
throw new Error(`linted
|
51
|
+
throw new Error(`linted-core`, { cause: e });
|
78
52
|
}
|
79
53
|
}
|
80
54
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,EAAE,EAAc,MAAM,oBAAoB,CAAC;AACxD,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,GACL,MAAM,sBAAsB,CAAC;AAG9B,MAAM,CAAC,OAAO,WACZ,OAA+B,EAC/B,OAA+B,EAC/B,KAGC,EACD,KAGC;IAED,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,KAAK,CACjB,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,QAAQ,CACf,EACD,QAAQ,GAAG;YACT,EAAE,EAAE,IAAI,OAAO,CACb,IAAI,EACJ,GAAG,KAAK,CAAC,MAAM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,KAAK,EAAE,EACxB,aAAa,CAAC,IAAI,CACnB,CAAC,OAAO;YACX,KAAK,EAAE,IAAI,OAAO;iBACf,KAAK,CACJ,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,EAChB,QAAQ,CAAC,KAAK,EACd,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EACxB,aAAa,CAAC,KAAK,CACpB,CAAC,OAAO;YACX,GAAG,EAAE,IAAI,OAAO;iBACb,GAAG,CACF,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EACd,QAAQ,CAAC,GAAG,EACZ,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EACpB,aAAa,CAAC,GAAG,CAClB,CAAC,OAAO;YACX,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EACb,QAAQ,CAAC,EAAE,EACX,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,EACtC,aAAa,CAAC,EAAE,CACjB,CAAC,OAAO;SACZ,CAAC;QAEF,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QAAC,MAAM,IAAI,KAAK,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC;AAC7D,CAAC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"_schemaVersion": "20.14.0",
|
3
3
|
"name": "@eslinted/core",
|
4
|
-
"version": "3.0.3-rc.
|
4
|
+
"version": "3.0.3-rc.3",
|
5
5
|
"description": "Core ESLint flat config factory npm package `linted`.",
|
6
6
|
"keywords": [],
|
7
7
|
"license": "MIT",
|
@@ -23,11 +23,11 @@
|
|
23
23
|
"peerDependencies": {},
|
24
24
|
"peerDependenciesMeta": {},
|
25
25
|
"dependencies": {
|
26
|
-
"globals": "^15.
|
26
|
+
"globals": "^15.9.0"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
29
|
"eslint": "~9.8.0",
|
30
|
-
"linted": "~16.1.
|
30
|
+
"linted": "~16.1.1",
|
31
31
|
"npm-run-all": "^4.1.5",
|
32
32
|
"typescript": "^5.5.4"
|
33
33
|
},
|
@@ -1,9 +1,6 @@
|
|
1
1
|
import type Plugins from "./plugins/plugins.js";
|
2
2
|
import type Parsers from "./parsers/parsers.js";
|
3
3
|
|
4
|
-
export type {
|
5
|
-
Plugins,
|
6
|
-
Parsers,
|
7
|
-
};
|
4
|
+
export type { Plugins, Parsers };
|
8
5
|
export type * as Files from "./files/files.js";
|
9
6
|
export type * as Rules from "./rules/rules.js";
|
@@ -2,8 +2,4 @@ import type { Parsers as Dependencies } from "../../../dependency/dependency.js"
|
|
2
2
|
|
3
3
|
type Parsers = Readonly<Record<Dependencies, unknown>>;
|
4
4
|
|
5
|
-
export type {
|
6
|
-
Parsers as default,
|
7
|
-
Parsers,
|
8
|
-
Dependencies,
|
9
|
-
};
|
5
|
+
export type { Dependencies, Parsers, Parsers as default };
|
@@ -2,8 +2,4 @@ import type { Plugins as Dependencies } from "../../../dependency/dependency.js"
|
|
2
2
|
|
3
3
|
type Plugins = Readonly<Record<Dependencies, { configs: unknown }>>;
|
4
4
|
|
5
|
-
export type {
|
6
|
-
Plugins as default,
|
7
|
-
Plugins,
|
8
|
-
Dependencies,
|
9
|
-
};
|
5
|
+
export type { Dependencies, Plugins, Plugins as default };
|
@@ -9,16 +9,8 @@ export default class Files {
|
|
9
9
|
|
10
10
|
public files(scope: Scope): readonly string[] {
|
11
11
|
try {
|
12
|
-
return [
|
13
|
-
...this.base[scope],
|
14
|
-
...this.includes[scope] ?? [],
|
15
|
-
];
|
16
|
-
}
|
17
|
-
catch (e) {
|
18
|
-
throw new Error(
|
19
|
-
`linted.factory.Files/scope:${scope}`,
|
20
|
-
{ cause: e },
|
21
|
-
);
|
12
|
+
return [...this.base[scope], ...this.includes[scope] ?? []];
|
22
13
|
}
|
14
|
+
catch (e) { throw new Error(`linted.factory.Files/scope:${scope}`, { cause: e }); }
|
23
15
|
}
|
24
16
|
}
|
@@ -13,10 +13,7 @@ export default abstract class Option<
|
|
13
13
|
GlobalTypes extends keyof typeof globals = never,
|
14
14
|
Processor extends object = never,
|
15
15
|
> {
|
16
|
-
private readonly linterOptions = {
|
17
|
-
noInlineConfig: true,
|
18
|
-
reportUnusedDisableDirectives: "error",
|
19
|
-
} as const;
|
16
|
+
private readonly linterOptions = { noInlineConfig: true, reportUnusedDisableDirectives: "error" } as const;
|
20
17
|
|
21
18
|
public abstract readonly scope: literalful<S>;
|
22
19
|
public abstract readonly processor: Interface<Processor> extends never
|
@@ -42,35 +39,25 @@ export default abstract class Option<
|
|
42
39
|
} = this;
|
43
40
|
|
44
41
|
if (ruleset.id !== scope)
|
45
|
-
throw new TypeError(
|
46
|
-
`Option and Ruleset scope mismatch`,
|
47
|
-
{ cause: { option: scope, ruleset: ruleset.id } },
|
48
|
-
);
|
42
|
+
throw new TypeError(`Option and Ruleset scope mismatch`, { cause: { option: scope, ruleset: ruleset.id } });
|
49
43
|
else if (files.length < 1)
|
50
44
|
return [];
|
51
45
|
else {
|
52
46
|
const baseName = `linted/scope:${scope}/rule:${ruleset.id}` as const;
|
53
47
|
|
54
|
-
return ruleset.records.map(
|
55
|
-
|
56
|
-
const name = `${baseName}+${ruleId}` as const;
|
48
|
+
return ruleset.records.map(([ruleId, rules]) => {
|
49
|
+
const name = `${baseName}+${ruleId}` as const;
|
57
50
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
);
|
51
|
+
return {
|
52
|
+
name,
|
53
|
+
files,
|
54
|
+
rules,
|
55
|
+
...option,
|
56
|
+
};
|
57
|
+
});
|
66
58
|
}
|
67
59
|
}
|
68
|
-
catch (e) {
|
69
|
-
throw new Error(
|
70
|
-
`linted.factory.Option/scope:${this.scope}: configs`,
|
71
|
-
{ cause: e },
|
72
|
-
);
|
73
|
-
}
|
60
|
+
catch (e) { throw new Error(`linted.factory.Option/scope:${this.scope}: configs`, { cause: e }); }
|
74
61
|
}
|
75
62
|
|
76
63
|
private get option() {
|
@@ -95,29 +82,12 @@ export default abstract class Option<
|
|
95
82
|
Processor
|
96
83
|
>;
|
97
84
|
}
|
98
|
-
catch (e) {
|
99
|
-
throw new Error(
|
100
|
-
`linted.factory.Option/scope:${this.scope}: option`,
|
101
|
-
{ cause: e },
|
102
|
-
);
|
103
|
-
}
|
85
|
+
catch (e) { throw new Error(`linted.factory.Option/scope:${this.scope}: option`, { cause: e }); }
|
104
86
|
}
|
105
87
|
|
106
|
-
protected abstract get languageOptions(): IOLanguage<
|
107
|
-
IsEcma,
|
108
|
-
ParserOptions,
|
109
|
-
GlobalTypes
|
110
|
-
>;
|
88
|
+
protected abstract get languageOptions(): IOLanguage<IsEcma, ParserOptions, GlobalTypes>;
|
111
89
|
|
112
90
|
protected globals(type: GlobalTypes) {
|
113
|
-
|
114
|
-
return globals[type];
|
115
|
-
}
|
116
|
-
catch (e) {
|
117
|
-
throw new Error(
|
118
|
-
`linted.factory.Option/scope:${this.scope}: globals`,
|
119
|
-
{ cause: e },
|
120
|
-
);
|
121
|
-
}
|
91
|
+
return globals[type];
|
122
92
|
}
|
123
93
|
}
|
@@ -11,16 +11,8 @@ export default class Html extends Option<
|
|
11
11
|
public readonly processor = {} as const;
|
12
12
|
|
13
13
|
public get languageOptions() {
|
14
|
-
|
15
|
-
const [parser] = this.parser;
|
14
|
+
const [parser] = this.parser;
|
16
15
|
|
17
|
-
|
18
|
-
}
|
19
|
-
catch (e) {
|
20
|
-
throw new Error(
|
21
|
-
`linted.factory.options.html: languageOptions`,
|
22
|
-
{ cause: e },
|
23
|
-
);
|
24
|
-
}
|
16
|
+
return { parser } as const;
|
25
17
|
}
|
26
18
|
}
|
@@ -5,17 +5,9 @@ export default class Js extends Option<"js", "@stylistic"> {
|
|
5
5
|
public readonly processor = {};
|
6
6
|
|
7
7
|
public get languageOptions() {
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
} as const;
|
13
|
-
}
|
14
|
-
catch (e) {
|
15
|
-
throw new Error(
|
16
|
-
`linted.factory.options.js: languageOptions`,
|
17
|
-
{ cause: e },
|
18
|
-
);
|
19
|
-
}
|
8
|
+
return {
|
9
|
+
ecmaVersion: "latest",
|
10
|
+
sourceType: "module",
|
11
|
+
} as const;
|
20
12
|
}
|
21
13
|
}
|
@@ -11,16 +11,8 @@ export default class Json extends Option<
|
|
11
11
|
public readonly processor = {} as const;
|
12
12
|
|
13
13
|
public get languageOptions() {
|
14
|
-
|
15
|
-
const [parser] = this.parser;
|
14
|
+
const [parser] = this.parser;
|
16
15
|
|
17
|
-
|
18
|
-
}
|
19
|
-
catch (e) {
|
20
|
-
throw new Error(
|
21
|
-
`linted.factory.options.json: languageOptions`,
|
22
|
-
{ cause: e },
|
23
|
-
);
|
24
|
-
}
|
16
|
+
return { parser } as const;
|
25
17
|
}
|
26
18
|
}
|
@@ -11,16 +11,8 @@ export default class Jsonc extends Option<
|
|
11
11
|
public readonly processor = {} as const;
|
12
12
|
|
13
13
|
public get languageOptions() {
|
14
|
-
|
15
|
-
const [parser] = this.parser;
|
14
|
+
const [parser] = this.parser;
|
16
15
|
|
17
|
-
|
18
|
-
}
|
19
|
-
catch (e) {
|
20
|
-
throw new Error(
|
21
|
-
`linted.factory.options.jsonc: languageOptions`,
|
22
|
-
{ cause: e },
|
23
|
-
);
|
24
|
-
}
|
16
|
+
return { parser } as const;
|
25
17
|
}
|
26
18
|
}
|
@@ -11,16 +11,8 @@ export default class Md extends Option<
|
|
11
11
|
public readonly processor = {} as const;
|
12
12
|
|
13
13
|
public get languageOptions() {
|
14
|
-
|
15
|
-
const [parser] = this.parser;
|
14
|
+
const [parser] = this.parser;
|
16
15
|
|
17
|
-
|
18
|
-
}
|
19
|
-
catch (e) {
|
20
|
-
throw new Error(
|
21
|
-
`linted.factory.options.md: languageOptions`,
|
22
|
-
{ cause: e },
|
23
|
-
);
|
24
|
-
}
|
16
|
+
return { parser } as const;
|
25
17
|
}
|
26
18
|
}
|