@eslinted/core 1.0.1 → 2.0.0-rc.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/boundary/boundary.d.ts +4 -0
- package/dist/boundary/boundary.d.ts.map +1 -0
- package/dist/boundary/boundary.js +2 -0
- package/dist/boundary/boundary.js.map +1 -0
- package/dist/boundary/input/files/base/base.d.ts +5 -0
- package/dist/boundary/input/files/base/base.d.ts.map +1 -0
- package/dist/boundary/input/files/base/base.js +2 -0
- package/dist/boundary/input/files/base/base.js.map +1 -0
- package/dist/boundary/input/files/base/list/list.d.ts +3 -0
- package/dist/boundary/input/files/base/list/list.d.ts.map +1 -0
- package/dist/boundary/input/files/base/list/list.js +2 -0
- package/dist/boundary/input/files/base/list/list.js.map +1 -0
- package/dist/boundary/input/files/files.d.ts +3 -6
- package/dist/boundary/input/files/files.d.ts.map +1 -1
- package/dist/boundary/input/files/includes/includes.d.ts +4 -0
- package/dist/boundary/input/files/includes/includes.d.ts.map +1 -0
- package/dist/boundary/input/files/includes/includes.js +2 -0
- package/dist/boundary/input/files/includes/includes.js.map +1 -0
- package/dist/boundary/input/files/list/list.d.ts +3 -0
- package/dist/boundary/input/files/list/list.d.ts.map +1 -0
- package/dist/boundary/input/files/list/list.js +2 -0
- package/dist/boundary/input/files/list/list.js.map +1 -0
- package/dist/boundary/input/input.d.ts +5 -20
- package/dist/boundary/input/input.d.ts.map +1 -1
- package/dist/boundary/input/overrides/overrides.d.ts +4 -4
- package/dist/boundary/input/overrides/overrides.d.ts.map +1 -1
- package/dist/boundary/input/parsers/parsers.d.ts +3 -6
- package/dist/boundary/input/parsers/parsers.d.ts.map +1 -1
- package/dist/boundary/input/plugins/plugins.d.ts +5 -6
- package/dist/boundary/input/plugins/plugins.d.ts.map +1 -1
- package/dist/boundary/input/rules/entry/entry.d.ts +3 -3
- package/dist/boundary/input/rules/entry/entry.d.ts.map +1 -1
- package/dist/boundary/input/rules/entry/object/object.d.ts +3 -3
- package/dist/boundary/input/rules/entry/object/object.d.ts.map +1 -1
- package/dist/boundary/input/rules/entry/object/state/level.d.ts +3 -0
- package/dist/boundary/input/rules/entry/object/state/level.d.ts.map +1 -0
- package/dist/boundary/input/rules/entry/object/state/level.js +2 -0
- package/dist/boundary/input/rules/entry/object/state/level.js.map +1 -0
- package/dist/boundary/input/rules/overrides/overrides.d.ts +5 -0
- package/dist/boundary/input/rules/overrides/overrides.d.ts.map +1 -0
- package/dist/boundary/input/rules/overrides/overrides.js +2 -0
- package/dist/boundary/input/rules/overrides/overrides.js.map +1 -0
- package/dist/boundary/input/rules/preset/entry/entry.d.ts +4 -0
- package/dist/boundary/input/rules/preset/entry/entry.d.ts.map +1 -0
- package/dist/boundary/input/rules/preset/entry/entry.js +2 -0
- package/dist/boundary/input/rules/preset/entry/entry.js.map +1 -0
- package/dist/boundary/input/rules/preset/entry/object/object.d.ts +4 -0
- package/dist/boundary/input/rules/preset/entry/object/object.d.ts.map +1 -0
- package/dist/boundary/input/rules/preset/entry/object/object.js +2 -0
- package/dist/boundary/input/rules/preset/entry/object/object.js.map +1 -0
- package/dist/boundary/input/rules/preset/entry/object/state/level.d.ts +3 -0
- package/dist/boundary/input/rules/preset/entry/object/state/level.d.ts.map +1 -0
- package/dist/boundary/input/rules/preset/entry/object/state/level.js +2 -0
- package/dist/boundary/input/rules/preset/entry/object/state/level.js.map +1 -0
- package/dist/boundary/input/rules/preset/preset.d.ts +5 -0
- package/dist/boundary/input/rules/preset/preset.d.ts.map +1 -0
- package/dist/boundary/input/rules/preset/preset.js +2 -0
- package/dist/boundary/input/rules/preset/preset.js.map +1 -0
- package/dist/boundary/input/rules/rules.d.ts +3 -5
- package/dist/boundary/input/rules/rules.d.ts.map +1 -1
- package/dist/boundary/output/config/config.d.ts +2 -2
- package/dist/boundary/output/config/config.d.ts.map +1 -1
- package/dist/boundary/output/output.d.ts +2 -2
- package/dist/dependency/dependency.d.ts +4 -0
- package/dist/dependency/dependency.d.ts.map +1 -0
- package/dist/dependency/dependency.js +2 -0
- package/dist/dependency/dependency.js.map +1 -0
- package/dist/dependency/parsers/index.d.ts +3 -0
- package/dist/dependency/parsers/index.d.ts.map +1 -0
- package/dist/dependency/parsers/index.js +2 -0
- package/dist/dependency/parsers/index.js.map +1 -0
- package/dist/dependency/plugins/index.d.ts +3 -0
- package/dist/dependency/plugins/index.d.ts.map +1 -0
- package/dist/dependency/plugins/index.js +2 -0
- package/dist/dependency/plugins/index.js.map +1 -0
- package/dist/factory/factory.d.ts +1 -1
- package/dist/factory/factory.js +1 -1
- package/dist/factory/files/Files.d.ts +3 -3
- package/dist/factory/files/Files.d.ts.map +1 -1
- package/dist/factory/files/Files.js.map +1 -1
- package/dist/factory/options/{options.d.ts → Options.d.ts} +1 -1
- package/dist/factory/options/{options.d.ts.map → Options.d.ts.map} +1 -1
- package/dist/factory/options/{options.js → Options.js} +1 -1
- package/dist/factory/options/{options.js.map → Options.js.map} +1 -1
- package/dist/factory/options/option/Option.d.ts +4 -3
- package/dist/factory/options/option/Option.d.ts.map +1 -1
- package/dist/factory/options/option/Option.js.map +1 -1
- package/dist/factory/ruleset/Ruleset.d.ts +3 -4
- package/dist/factory/ruleset/Ruleset.d.ts.map +1 -1
- package/dist/factory/ruleset/Ruleset.js.map +1 -1
- package/dist/factory/ruleset/rule/Rule.d.ts +3 -3
- package/dist/factory/ruleset/rule/Rule.d.ts.map +1 -1
- package/dist/factory/ruleset/rule/Rule.js.map +1 -1
- package/dist/index.d.ts +9 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -29
- package/dist/index.js.map +1 -1
- package/dist/scopes/{scopes.d.ts → Scopes.d.ts} +1 -1
- package/dist/scopes/Scopes.d.ts.map +1 -0
- package/dist/scopes/{scopes.js → Scopes.js} +1 -1
- package/dist/scopes/Scopes.js.map +1 -0
- package/package.json +7 -5
- package/src/boundary/boundary.ts +4 -0
- package/src/boundary/input/files/base/base.ts +9 -0
- package/src/boundary/input/files/base/list/list.ts +6 -0
- package/src/boundary/input/files/files.ts +6 -5
- package/src/boundary/input/files/includes/includes.ts +8 -0
- package/src/boundary/input/input.ts +8 -21
- package/src/boundary/input/parsers/parsers.ts +7 -8
- package/src/boundary/input/plugins/plugins.ts +7 -4
- package/src/boundary/input/rules/overrides/overrides.ts +9 -0
- package/src/boundary/input/rules/preset/entry/entry.ts +8 -0
- package/src/boundary/input/rules/preset/entry/object/object.ts +12 -0
- package/src/boundary/input/rules/preset/entry/object/state/level.ts +9 -0
- package/src/boundary/input/rules/preset/preset.ts +9 -0
- package/src/boundary/input/rules/rules.ts +4 -8
- package/src/boundary/output/config/config.ts +2 -2
- package/src/boundary/output/output.ts +2 -2
- package/src/dependency/dependency.ts +4 -0
- package/src/dependency/parsers/index.ts +9 -0
- package/src/dependency/plugins/index.ts +10 -0
- package/src/factory/factory.ts +1 -1
- package/src/factory/files/Files.ts +4 -4
- package/src/factory/options/option/Option.ts +4 -3
- package/src/factory/ruleset/Ruleset.ts +2 -3
- package/src/factory/ruleset/rule/Rule.ts +2 -2
- package/src/index.ts +64 -52
- package/dist/boundary/input/files/array/filearray.d.ts +0 -3
- package/dist/boundary/input/files/array/filearray.d.ts.map +0 -1
- package/dist/boundary/input/files/array/filearray.js +0 -2
- package/dist/boundary/input/files/array/filearray.js.map +0 -1
- package/dist/boundary/input/rules/entry/object/state/severity.d.ts +0 -3
- package/dist/boundary/input/rules/entry/object/state/severity.d.ts.map +0 -1
- package/dist/boundary/input/rules/entry/object/state/severity.js +0 -2
- package/dist/boundary/input/rules/entry/object/state/severity.js.map +0 -1
- package/dist/scopes/scopes.d.ts.map +0 -1
- package/dist/scopes/scopes.js.map +0 -1
- package/src/boundary/input/files/array/filearray.ts +0 -3
- package/src/boundary/input/overrides/overrides.ts +0 -6
- package/src/boundary/input/rules/entry/entry.ts +0 -5
- package/src/boundary/input/rules/entry/object/object.ts +0 -5
- package/src/boundary/input/rules/entry/object/state/severity.ts +0 -6
- /package/{types/project → src}/OmitFilesRuleset.d.ts +0 -0
- /package/src/factory/options/{options.ts → Options.ts} +0 -0
- /package/src/scopes/{scopes.ts → Scopes.ts} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Ruleset.js","sourceRoot":"","sources":["../../../src/factory/ruleset/Ruleset.ts"],"names":[],"mappings":"
|
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;IAKP;IAJH,OAAO,CAAkB;IAClC,SAAS,GAAe,IAAI,CAAC;IAEpC,YACmB,KAAoB,EACrC,GAAG,KAAsB;QADR,UAAK,GAAL,KAAK,CAAe;QAGrC,IAAI,CAAC;YACH,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;QAC5B,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,wBAAwB,EACxB,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IAAW,EAAE;QACX,IAAI,CAAC;YACH,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;YAEvB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,4BAA4B,EAC5B,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IAAW,OAAO;QAChB,IAAI,CAAC;YACH,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;YAEpC,OAAO;gBACL,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAU,CAAC;gBACzD,GAAG,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,CAAU,CAAU;aACjF,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,iCAAiC,EACjC,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;IAEM,QAAQ,CAAC,SAAoC;QAClD,IAAI,CAAC;YACH,IAAI,OAAO,SAAS,KAAK,WAAW;gBAClC,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CACvB,UAAU,EACV,SAAS,CACV,CAAC;YAEJ,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,kCAAkC,EAClC,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type Input from "../../../boundary/
|
1
|
+
import type { Input } from "../../../boundary/boundary.js";
|
2
2
|
export default class {
|
3
3
|
readonly id: string;
|
4
|
-
readonly rules: Input.Rules.Entry.Object;
|
5
|
-
constructor(id: string, rules: Input.Rules.Entry.Object);
|
4
|
+
readonly rules: Input.Rules.Preset.Entry.Object;
|
5
|
+
constructor(id: string, rules: Input.Rules.Preset.Entry.Object);
|
6
6
|
}
|
7
7
|
//# sourceMappingURL=Rule.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../../src/factory/ruleset/rule/Rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,
|
1
|
+
{"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../../src/factory/ruleset/rule/Rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO;aAEM,EAAE,EAAE,MAAM;aACV,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM;gBADtC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM;CAEzD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../../src/factory/ruleset/rule/Rule.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO;IAEM;IACA;IAFlB,YACkB,EAAU,EACV,
|
1
|
+
{"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../../src/factory/ruleset/rule/Rule.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO;IAEM;IACA;IAFlB,YACkB,EAAU,EACV,KAAsC;QADtC,OAAE,GAAF,EAAE,CAAQ;QACV,UAAK,GAAL,KAAK,CAAiC;IACrD,CAAC;CACL"}
|
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
import type * as Boundary from "./boundary/boundary.js";
|
2
|
+
export type { Boundary };
|
3
|
+
export default function (plugins: Boundary.Input.Plugins, parsers: Boundary.Input.Parsers, files: {
|
4
|
+
base: Boundary.Input.Files.Base;
|
5
|
+
includes: Boundary.Input.Files.Includes;
|
6
|
+
}, rules: {
|
7
|
+
preset: Boundary.Input.Rules.Preset;
|
8
|
+
overrides: Boundary.Input.Rules.Overrides;
|
9
|
+
}): Boundary.Output[];
|
6
10
|
//# 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,
|
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,CAqInB"}
|
package/dist/index.js
CHANGED
@@ -1,50 +1,56 @@
|
|
1
|
-
import scopes, {} from "./scopes/
|
1
|
+
import scopes, {} from "./scopes/Scopes.js";
|
2
2
|
import { Options, Files, Ruleset, Rule, } from "./factory/factory.js";
|
3
|
-
export default function (plugins, parsers,
|
3
|
+
export default function (plugins, parsers, files, rules) {
|
4
4
|
try {
|
5
|
-
const
|
6
|
-
js: new Ruleset("js", ...rules.js.map(args => new Rule(...args))),
|
7
|
-
ts: new Ruleset("ts", ...rules.ts.map(args => new Rule(...args))),
|
8
|
-
svelte: new Ruleset("svelte", ...rules.svelte.map(args => new Rule(...args))),
|
9
|
-
html: new Ruleset("html", ...rules.html.map(args => new Rule(...args))),
|
10
|
-
json: new Ruleset("json", ...rules.json.map(args => new Rule(...args))),
|
11
|
-
jsonc: new Ruleset("jsonc", ...rules.jsonc.map(args => new Rule(...args))),
|
12
|
-
yml: new Ruleset("yml", ...rules.yml.map(args => new Rule(...args))),
|
13
|
-
},
|
14
|
-
js: [
|
15
|
-
ts: [
|
16
|
-
svelte: [
|
17
|
-
|
18
|
-
|
19
|
-
],
|
20
|
-
|
21
|
-
json: [plugins.json, [parsers.json]],
|
22
|
-
jsonc: [plugins.jsonc, [parsers.jsonc]],
|
23
|
-
yml: [plugins.yml, [parsers.yml]],
|
5
|
+
const f = new Files(files.base, files.includes), rulesets = {
|
6
|
+
js: new Ruleset("js", ...rules.preset.js.map(args => new Rule(...args))),
|
7
|
+
ts: new Ruleset("ts", ...rules.preset.ts.map(args => new Rule(...args))),
|
8
|
+
svelte: new Ruleset("svelte", ...rules.preset.svelte.map(args => new Rule(...args))),
|
9
|
+
html: new Ruleset("html", ...rules.preset.html.map(args => new Rule(...args))),
|
10
|
+
json: new Ruleset("json", ...rules.preset.json.map(args => new Rule(...args))),
|
11
|
+
jsonc: new Ruleset("jsonc", ...rules.preset.jsonc.map(args => new Rule(...args))),
|
12
|
+
yml: new Ruleset("yml", ...rules.preset.yml.map(args => new Rule(...args))),
|
13
|
+
}, scopedParsers = {
|
14
|
+
js: [],
|
15
|
+
ts: [parsers.ts],
|
16
|
+
svelte: [parsers.svelte, parsers.ts],
|
17
|
+
html: [parsers.html],
|
18
|
+
json: [parsers.jsonc],
|
19
|
+
jsonc: [parsers.jsonc],
|
20
|
+
yml: [parsers.yml],
|
24
21
|
};
|
25
22
|
for (const scope of scopes)
|
26
|
-
rulesets[scope].override(overrides[scope]);
|
23
|
+
rulesets[scope].override(rules.overrides[scope]);
|
27
24
|
const options = {
|
28
25
|
js: new Options
|
29
|
-
.js(
|
26
|
+
.js(f.files("js"), rulesets.js, {
|
27
|
+
"@stylistic": plugins["@stylistic"],
|
28
|
+
}, scopedParsers.js)
|
30
29
|
.configs,
|
31
30
|
ts: new Options
|
32
|
-
.ts(
|
31
|
+
.ts(f.files("ts"), rulesets.ts, {
|
32
|
+
"@stylistic": plugins["@stylistic"],
|
33
|
+
"@typescript-eslint": plugins["@typescript-eslint"],
|
34
|
+
}, scopedParsers.ts)
|
33
35
|
.configs,
|
34
36
|
svelte: new Options
|
35
|
-
.svelte(
|
37
|
+
.svelte(f.files("svelte"), rulesets.svelte, {
|
38
|
+
"@stylistic": plugins["@stylistic"],
|
39
|
+
"@typescript-eslint": plugins["@typescript-eslint"],
|
40
|
+
svelte: plugins.svelte,
|
41
|
+
}, scopedParsers.svelte)
|
36
42
|
.configs,
|
37
43
|
html: new Options
|
38
|
-
.html(
|
44
|
+
.html(f.files("html"), rulesets.html, { "@html-eslint": plugins["@html-eslint"] }, scopedParsers.html)
|
39
45
|
.configs,
|
40
46
|
json: new Options
|
41
|
-
.json(
|
47
|
+
.json(f.files("json"), rulesets.json, { jsonc: plugins.jsonc }, scopedParsers.json)
|
42
48
|
.configs,
|
43
49
|
jsonc: new Options
|
44
|
-
.jsonc(
|
50
|
+
.jsonc(f.files("jsonc"), rulesets.jsonc, { jsonc: plugins.jsonc }, scopedParsers.jsonc)
|
45
51
|
.configs,
|
46
52
|
yml: new Options
|
47
|
-
.yml(
|
53
|
+
.yml(f.files("yml"), rulesets.yml, { yml: plugins.yml }, scopedParsers.yml)
|
48
54
|
.configs,
|
49
55
|
};
|
50
56
|
return scopes
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
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,CAAC,EAA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C"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Scopes.js","sourceRoot":"","sources":["../../src/scopes/Scopes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG;IACb,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;CACG,CAAC;AAEX,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
@@ -1,16 +1,21 @@
|
|
1
1
|
{
|
2
|
+
"_schemaVersion": "20.13.0",
|
2
3
|
"name": "@eslinted/core",
|
3
|
-
"version": "
|
4
|
+
"version": "2.0.0-rc.2",
|
4
5
|
"description": "Core ESLint flat config factory npm package `linted`.",
|
5
6
|
"keywords": [],
|
6
7
|
"license": "MIT",
|
7
8
|
"private": false,
|
9
|
+
"publishConfig": {
|
10
|
+
"access": "public"
|
11
|
+
},
|
8
12
|
"repository": "github:jimmy-zhening-luo/linted-core",
|
9
13
|
"homepage": "https://github.com/jimmy-zhening-luo/linted-core#readme",
|
10
14
|
"bugs": "https://github.com/jimmy-zhening-luo/linted-core/issues",
|
11
15
|
"type": "module",
|
12
16
|
"main": "dist/index.js",
|
13
17
|
"types": "dist/index.d.ts",
|
18
|
+
"engineStrict": true,
|
14
19
|
"engines": {
|
15
20
|
"node": ">=20.15.0",
|
16
21
|
"npm": ">=10.7.0"
|
@@ -21,7 +26,7 @@
|
|
21
26
|
"dependencies": {},
|
22
27
|
"devDependencies": {
|
23
28
|
"eslint": "~8.57.0",
|
24
|
-
"linted": "~15.4.
|
29
|
+
"linted": "~15.4.14",
|
25
30
|
"npm-run-all": "^4.1.5",
|
26
31
|
"typescript": "^5.5.4"
|
27
32
|
},
|
@@ -45,8 +50,5 @@
|
|
45
50
|
"predeploy": "npm test",
|
46
51
|
"deploy": ""
|
47
52
|
},
|
48
|
-
"config": {
|
49
|
-
"PACKAGE_JSON": "20.12.0"
|
50
|
-
},
|
51
53
|
"author": "Jimmy Zhening Luo <1450044+jimmy-zhening-luo@users.noreply.github.com> (https://jimm.my/)"
|
52
54
|
}
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import type
|
2
|
-
import type
|
1
|
+
import type Base from "./base/base.js";
|
2
|
+
import type Includes from "./includes/includes.js";
|
3
3
|
|
4
|
-
type
|
5
|
-
|
6
|
-
|
4
|
+
export type {
|
5
|
+
Base,
|
6
|
+
Includes,
|
7
|
+
};
|
@@ -1,22 +1,9 @@
|
|
1
|
-
import type
|
2
|
-
import type
|
3
|
-
import type files from "./files/files.js";
|
4
|
-
import type rules from "./rules/rules.js";
|
5
|
-
import type { RuleEntry, RuleObject } from "./rules/rules.js";
|
6
|
-
import type overrides from "./overrides/overrides.js";
|
1
|
+
import type Plugins from "./plugins/plugins.js";
|
2
|
+
import type Parsers from "./parsers/parsers.js";
|
7
3
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
export type Entry = RuleEntry;
|
15
|
-
export namespace Entry {
|
16
|
-
export type Object = RuleObject;
|
17
|
-
}
|
18
|
-
}
|
19
|
-
export type Overrides = overrides;
|
20
|
-
}
|
21
|
-
|
22
|
-
export type { Input as default };
|
4
|
+
export type {
|
5
|
+
Plugins,
|
6
|
+
Parsers,
|
7
|
+
};
|
8
|
+
export type * as Files from "./files/files.js";
|
9
|
+
export type * as Rules from "./rules/rules.js";
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import type {
|
2
|
-
import type { Options } from "../../../factory/factory.js";
|
1
|
+
import type { Parsers as Dependencies } from "../../../dependency/dependency.js";
|
3
2
|
|
4
|
-
type Parsers =
|
5
|
-
readonly [S in Scope]: ConstructorParameters<typeof Options[S]>[2] extends readonly [unknown, ...unknown[]]
|
6
|
-
? unknown
|
7
|
-
: null
|
8
|
-
};
|
3
|
+
type Parsers = Readonly<Record<Dependencies, unknown>>;
|
9
4
|
|
10
|
-
export type {
|
5
|
+
export type {
|
6
|
+
Parsers as default,
|
7
|
+
Parsers,
|
8
|
+
Dependencies,
|
9
|
+
};
|
@@ -1,6 +1,9 @@
|
|
1
|
-
import type {
|
2
|
-
import type { Options } from "../../../factory/factory.js";
|
1
|
+
import type { Plugins as Dependencies } from "../../../dependency/dependency.js";
|
3
2
|
|
4
|
-
type Plugins = {
|
3
|
+
type Plugins = Readonly<Record<Dependencies, { configs: unknown }>>;
|
5
4
|
|
6
|
-
export type {
|
5
|
+
export type {
|
6
|
+
Plugins as default,
|
7
|
+
Plugins,
|
8
|
+
Dependencies,
|
9
|
+
};
|
@@ -1,11 +1,7 @@
|
|
1
|
-
import type
|
2
|
-
import type
|
3
|
-
import type RuleObject from "./entry/object/object.js";
|
4
|
-
|
5
|
-
type Rules = Record<Scope, readonly RuleEntry[]>;
|
1
|
+
import type Preset from "./preset/preset.js";
|
2
|
+
import type Overrides from "./overrides/overrides.js";
|
6
3
|
|
7
4
|
export type {
|
8
|
-
|
9
|
-
|
10
|
-
RuleObject,
|
5
|
+
Preset,
|
6
|
+
Overrides,
|
11
7
|
};
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import type
|
1
|
+
import type { Rules } from "../../input/input.js";
|
2
2
|
|
3
3
|
export default interface Config {
|
4
4
|
name: `linted/scope:${string}/rule:${string}+${string}`;
|
5
|
-
rules:
|
5
|
+
rules: Rules.Preset.Entry.Object;
|
6
6
|
files: readonly string[];
|
7
7
|
linterOptions: {
|
8
8
|
noInlineConfig: true;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import type
|
1
|
+
import type Config from "./config/config.js";
|
2
2
|
|
3
|
-
export type {
|
3
|
+
export type { Config as default };
|
package/src/factory/factory.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import type { Scope } from "../../scopes/
|
2
|
-
import type Input from "../../boundary/
|
1
|
+
import type { Scope } from "../../scopes/Scopes.js";
|
2
|
+
import type { Input } from "../../boundary/boundary.js";
|
3
3
|
|
4
4
|
export default class Files {
|
5
5
|
constructor(
|
6
|
-
private readonly base: Input.Files,
|
7
|
-
private readonly includes:
|
6
|
+
private readonly base: Input.Files.Base,
|
7
|
+
private readonly includes: Input.Files.Includes,
|
8
8
|
) {}
|
9
9
|
|
10
10
|
public files(scope: Scope): readonly string[] {
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import type { Scope } from "../../../scopes/
|
1
|
+
import type { Scope } from "../../../scopes/Scopes.js";
|
2
2
|
import type { Ruleset } from "../../factory.js";
|
3
|
-
import type
|
3
|
+
import type { Plugins } from "../../../dependency/dependency.js";
|
4
|
+
import type { Output } from "../../../boundary/boundary.js";
|
4
5
|
|
5
6
|
export default abstract class Option<
|
6
7
|
S extends Scope,
|
7
|
-
PluginId extends
|
8
|
+
PluginId extends Plugins,
|
8
9
|
IsEcma extends boolean = true,
|
9
10
|
ParserOptions extends object | boolean = false,
|
10
11
|
ParserCount extends 0 | 1 | 2 = 0,
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import type { Scope } from "../../scopes/
|
2
|
-
import type Input from "../../boundary/input/input.js";
|
1
|
+
import type { Scope } from "../../scopes/Scopes.js";
|
3
2
|
import Rule from "./rule/Rule.js";
|
4
3
|
|
5
4
|
export { Rule };
|
@@ -53,7 +52,7 @@ export default class Ruleset<S extends Scope> {
|
|
53
52
|
}
|
54
53
|
}
|
55
54
|
|
56
|
-
public override(overrides: undefined |
|
55
|
+
public override(overrides: undefined | Rule["rules"]) {
|
57
56
|
try {
|
58
57
|
if (typeof overrides !== "undefined")
|
59
58
|
this.overrides = new Rule(
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import type Input from "../../../boundary/
|
1
|
+
import type { Input } from "../../../boundary/boundary.js";
|
2
2
|
|
3
3
|
export default class {
|
4
4
|
constructor(
|
5
5
|
public readonly id: string,
|
6
|
-
public readonly rules: Input.Rules.Entry.Object,
|
6
|
+
public readonly rules: Input.Rules.Preset.Entry.Object,
|
7
7
|
) {}
|
8
8
|
}
|