@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.
Files changed (145) hide show
  1. package/dist/boundary/boundary.d.ts +4 -0
  2. package/dist/boundary/boundary.d.ts.map +1 -0
  3. package/dist/boundary/boundary.js +2 -0
  4. package/dist/boundary/boundary.js.map +1 -0
  5. package/dist/boundary/input/files/base/base.d.ts +5 -0
  6. package/dist/boundary/input/files/base/base.d.ts.map +1 -0
  7. package/dist/boundary/input/files/base/base.js +2 -0
  8. package/dist/boundary/input/files/base/base.js.map +1 -0
  9. package/dist/boundary/input/files/base/list/list.d.ts +3 -0
  10. package/dist/boundary/input/files/base/list/list.d.ts.map +1 -0
  11. package/dist/boundary/input/files/base/list/list.js +2 -0
  12. package/dist/boundary/input/files/base/list/list.js.map +1 -0
  13. package/dist/boundary/input/files/files.d.ts +3 -6
  14. package/dist/boundary/input/files/files.d.ts.map +1 -1
  15. package/dist/boundary/input/files/includes/includes.d.ts +4 -0
  16. package/dist/boundary/input/files/includes/includes.d.ts.map +1 -0
  17. package/dist/boundary/input/files/includes/includes.js +2 -0
  18. package/dist/boundary/input/files/includes/includes.js.map +1 -0
  19. package/dist/boundary/input/files/list/list.d.ts +3 -0
  20. package/dist/boundary/input/files/list/list.d.ts.map +1 -0
  21. package/dist/boundary/input/files/list/list.js +2 -0
  22. package/dist/boundary/input/files/list/list.js.map +1 -0
  23. package/dist/boundary/input/input.d.ts +5 -20
  24. package/dist/boundary/input/input.d.ts.map +1 -1
  25. package/dist/boundary/input/overrides/overrides.d.ts +4 -4
  26. package/dist/boundary/input/overrides/overrides.d.ts.map +1 -1
  27. package/dist/boundary/input/parsers/parsers.d.ts +3 -6
  28. package/dist/boundary/input/parsers/parsers.d.ts.map +1 -1
  29. package/dist/boundary/input/plugins/plugins.d.ts +5 -6
  30. package/dist/boundary/input/plugins/plugins.d.ts.map +1 -1
  31. package/dist/boundary/input/rules/entry/entry.d.ts +3 -3
  32. package/dist/boundary/input/rules/entry/entry.d.ts.map +1 -1
  33. package/dist/boundary/input/rules/entry/object/object.d.ts +3 -3
  34. package/dist/boundary/input/rules/entry/object/object.d.ts.map +1 -1
  35. package/dist/boundary/input/rules/entry/object/state/level.d.ts +3 -0
  36. package/dist/boundary/input/rules/entry/object/state/level.d.ts.map +1 -0
  37. package/dist/boundary/input/rules/entry/object/state/level.js +2 -0
  38. package/dist/boundary/input/rules/entry/object/state/level.js.map +1 -0
  39. package/dist/boundary/input/rules/overrides/overrides.d.ts +5 -0
  40. package/dist/boundary/input/rules/overrides/overrides.d.ts.map +1 -0
  41. package/dist/boundary/input/rules/overrides/overrides.js +2 -0
  42. package/dist/boundary/input/rules/overrides/overrides.js.map +1 -0
  43. package/dist/boundary/input/rules/preset/entry/entry.d.ts +4 -0
  44. package/dist/boundary/input/rules/preset/entry/entry.d.ts.map +1 -0
  45. package/dist/boundary/input/rules/preset/entry/entry.js +2 -0
  46. package/dist/boundary/input/rules/preset/entry/entry.js.map +1 -0
  47. package/dist/boundary/input/rules/preset/entry/object/object.d.ts +4 -0
  48. package/dist/boundary/input/rules/preset/entry/object/object.d.ts.map +1 -0
  49. package/dist/boundary/input/rules/preset/entry/object/object.js +2 -0
  50. package/dist/boundary/input/rules/preset/entry/object/object.js.map +1 -0
  51. package/dist/boundary/input/rules/preset/entry/object/state/level.d.ts +3 -0
  52. package/dist/boundary/input/rules/preset/entry/object/state/level.d.ts.map +1 -0
  53. package/dist/boundary/input/rules/preset/entry/object/state/level.js +2 -0
  54. package/dist/boundary/input/rules/preset/entry/object/state/level.js.map +1 -0
  55. package/dist/boundary/input/rules/preset/preset.d.ts +5 -0
  56. package/dist/boundary/input/rules/preset/preset.d.ts.map +1 -0
  57. package/dist/boundary/input/rules/preset/preset.js +2 -0
  58. package/dist/boundary/input/rules/preset/preset.js.map +1 -0
  59. package/dist/boundary/input/rules/rules.d.ts +3 -5
  60. package/dist/boundary/input/rules/rules.d.ts.map +1 -1
  61. package/dist/boundary/output/config/config.d.ts +2 -2
  62. package/dist/boundary/output/config/config.d.ts.map +1 -1
  63. package/dist/boundary/output/output.d.ts +2 -2
  64. package/dist/dependency/dependency.d.ts +4 -0
  65. package/dist/dependency/dependency.d.ts.map +1 -0
  66. package/dist/dependency/dependency.js +2 -0
  67. package/dist/dependency/dependency.js.map +1 -0
  68. package/dist/dependency/parsers/index.d.ts +3 -0
  69. package/dist/dependency/parsers/index.d.ts.map +1 -0
  70. package/dist/dependency/parsers/index.js +2 -0
  71. package/dist/dependency/parsers/index.js.map +1 -0
  72. package/dist/dependency/plugins/index.d.ts +3 -0
  73. package/dist/dependency/plugins/index.d.ts.map +1 -0
  74. package/dist/dependency/plugins/index.js +2 -0
  75. package/dist/dependency/plugins/index.js.map +1 -0
  76. package/dist/factory/factory.d.ts +1 -1
  77. package/dist/factory/factory.js +1 -1
  78. package/dist/factory/files/Files.d.ts +3 -3
  79. package/dist/factory/files/Files.d.ts.map +1 -1
  80. package/dist/factory/files/Files.js.map +1 -1
  81. package/dist/factory/options/{options.d.ts → Options.d.ts} +1 -1
  82. package/dist/factory/options/{options.d.ts.map → Options.d.ts.map} +1 -1
  83. package/dist/factory/options/{options.js → Options.js} +1 -1
  84. package/dist/factory/options/{options.js.map → Options.js.map} +1 -1
  85. package/dist/factory/options/option/Option.d.ts +4 -3
  86. package/dist/factory/options/option/Option.d.ts.map +1 -1
  87. package/dist/factory/options/option/Option.js.map +1 -1
  88. package/dist/factory/ruleset/Ruleset.d.ts +3 -4
  89. package/dist/factory/ruleset/Ruleset.d.ts.map +1 -1
  90. package/dist/factory/ruleset/Ruleset.js.map +1 -1
  91. package/dist/factory/ruleset/rule/Rule.d.ts +3 -3
  92. package/dist/factory/ruleset/rule/Rule.d.ts.map +1 -1
  93. package/dist/factory/ruleset/rule/Rule.js.map +1 -1
  94. package/dist/index.d.ts +9 -5
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/index.js +35 -29
  97. package/dist/index.js.map +1 -1
  98. package/dist/scopes/{scopes.d.ts → Scopes.d.ts} +1 -1
  99. package/dist/scopes/Scopes.d.ts.map +1 -0
  100. package/dist/scopes/{scopes.js → Scopes.js} +1 -1
  101. package/dist/scopes/Scopes.js.map +1 -0
  102. package/package.json +7 -5
  103. package/src/boundary/boundary.ts +4 -0
  104. package/src/boundary/input/files/base/base.ts +9 -0
  105. package/src/boundary/input/files/base/list/list.ts +6 -0
  106. package/src/boundary/input/files/files.ts +6 -5
  107. package/src/boundary/input/files/includes/includes.ts +8 -0
  108. package/src/boundary/input/input.ts +8 -21
  109. package/src/boundary/input/parsers/parsers.ts +7 -8
  110. package/src/boundary/input/plugins/plugins.ts +7 -4
  111. package/src/boundary/input/rules/overrides/overrides.ts +9 -0
  112. package/src/boundary/input/rules/preset/entry/entry.ts +8 -0
  113. package/src/boundary/input/rules/preset/entry/object/object.ts +12 -0
  114. package/src/boundary/input/rules/preset/entry/object/state/level.ts +9 -0
  115. package/src/boundary/input/rules/preset/preset.ts +9 -0
  116. package/src/boundary/input/rules/rules.ts +4 -8
  117. package/src/boundary/output/config/config.ts +2 -2
  118. package/src/boundary/output/output.ts +2 -2
  119. package/src/dependency/dependency.ts +4 -0
  120. package/src/dependency/parsers/index.ts +9 -0
  121. package/src/dependency/plugins/index.ts +10 -0
  122. package/src/factory/factory.ts +1 -1
  123. package/src/factory/files/Files.ts +4 -4
  124. package/src/factory/options/option/Option.ts +4 -3
  125. package/src/factory/ruleset/Ruleset.ts +2 -3
  126. package/src/factory/ruleset/rule/Rule.ts +2 -2
  127. package/src/index.ts +64 -52
  128. package/dist/boundary/input/files/array/filearray.d.ts +0 -3
  129. package/dist/boundary/input/files/array/filearray.d.ts.map +0 -1
  130. package/dist/boundary/input/files/array/filearray.js +0 -2
  131. package/dist/boundary/input/files/array/filearray.js.map +0 -1
  132. package/dist/boundary/input/rules/entry/object/state/severity.d.ts +0 -3
  133. package/dist/boundary/input/rules/entry/object/state/severity.d.ts.map +0 -1
  134. package/dist/boundary/input/rules/entry/object/state/severity.js +0 -2
  135. package/dist/boundary/input/rules/entry/object/state/severity.js.map +0 -1
  136. package/dist/scopes/scopes.d.ts.map +0 -1
  137. package/dist/scopes/scopes.js.map +0 -1
  138. package/src/boundary/input/files/array/filearray.ts +0 -3
  139. package/src/boundary/input/overrides/overrides.ts +0 -6
  140. package/src/boundary/input/rules/entry/entry.ts +0 -5
  141. package/src/boundary/input/rules/entry/object/object.ts +0 -5
  142. package/src/boundary/input/rules/entry/object/state/severity.ts +0 -6
  143. /package/{types/project → src}/OmitFilesRuleset.d.ts +0 -0
  144. /package/src/factory/options/{options.ts → Options.ts} +0 -0
  145. /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":"AAEA,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,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QACJ,CAAC;IACH,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
- import type Input from "../../../boundary/input/input.js";
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,kCAAkC,CAAC;AAE1D,MAAM,CAAC,OAAO;aAEM,EAAE,EAAE,MAAM;aACV,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM;gBAD/B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM;CAElD"}
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,KAA+B;QAD/B,OAAE,GAAF,EAAE,CAAQ;QACV,UAAK,GAAL,KAAK,CAA0B;IAC9C,CAAC;CACL"}
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 { type Scope } from "./scopes/scopes.js";
2
- import type Output from "./boundary/output/output.js";
3
- import type Input from "./boundary/input/input.js";
4
- export type { Scope, Input, Output, };
5
- export default function (plugins: Input.Plugins, parsers: Input.Parsers, base: Input.Files, includes: Partial<Input.Files>, rules: Input.Rules, overrides: Input.Overrides): Output[];
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAe,EAAE,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAC;AAQnD,YAAY,EACV,KAAK,EACL,KAAK,EACL,MAAM,GACP,CAAC;AACF,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,IAAI,EAAE,KAAK,CAAC,KAAK,EACjB,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,SAAS,EAAE,KAAK,CAAC,SAAS,GACzB,MAAM,EAAE,CAwHV"}
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/scopes.js";
1
+ import scopes, {} from "./scopes/Scopes.js";
2
2
  import { Options, Files, Ruleset, Rule, } from "./factory/factory.js";
3
- export default function (plugins, parsers, base, includes, rules, overrides) {
3
+ export default function (plugins, parsers, files, rules) {
4
4
  try {
5
- const files = new Files(base, includes), rulesets = {
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
- }, imports = {
14
- js: [plugins.js, []],
15
- ts: [plugins.ts, [parsers.ts]],
16
- svelte: [
17
- plugins.svelte,
18
- [parsers.svelte, parsers.ts],
19
- ],
20
- html: [plugins.html, [parsers.html]],
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(files.files("js"), rulesets.js, ...imports.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(files.files("ts"), rulesets.ts, ...imports.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(files.files("svelte"), rulesets.svelte, ...imports.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(files.files("html"), rulesets.html, ...imports.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(files.files("json"), rulesets.json, ...imports.json)
47
+ .json(f.files("json"), rulesets.json, { jsonc: plugins.jsonc }, scopedParsers.json)
42
48
  .configs,
43
49
  jsonc: new Options
44
- .jsonc(files.files("jsonc"), rulesets.jsonc, ...imports.jsonc)
50
+ .jsonc(f.files("jsonc"), rulesets.jsonc, { jsonc: plugins.jsonc }, scopedParsers.jsonc)
45
51
  .configs,
46
52
  yml: new Options
47
- .yml(files.files("yml"), rulesets.yml, ...imports.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":"AAAA,OAAO,MAAM,EAAE,EAAc,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,GACL,MAAM,sBAAsB,CAAC;AAO9B,MAAM,CAAC,OAAO,WACZ,OAAsB,EACtB,OAAsB,EACtB,IAAiB,EACjB,QAA8B,EAC9B,KAAkB,EAClB,SAA0B;IAE1B,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,KAAK,CACrB,IAAI,EACJ,QAAQ,CACT,EACD,QAAQ,GAAG;YACT,EAAE,EAA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AK,CAAC,MAAM,CAAC,EACf,QAAQ,CAAC,IAAI,EACb,EAAE,cAAc,EAAE,OAAO,CAAC,cAAc,CAAC,EAAE,EAC3C,aAAa,CAAC,IAAI,CACnB;iBACA,OAAO;YACV,IAAI,EAAE,IAAI,OAAO;iBACd,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,EACf,QAAQ,CAAC,IAAI,EACb,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EACxB,aAAa,CAAC,IAAI,CACnB;iBACA,OAAO;YACV,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;iBACA,OAAO;YACV,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;iBACA,OAAO;SACX,CAAC;QAEF,OAAO,MAAM;aACV,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;aAC5B,IAAI,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,aAAa,EACb,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,4 +1,4 @@
1
1
  declare const scopes: readonly ["js", "ts", "svelte", "html", "json", "jsonc", "yml"];
2
2
  export default scopes;
3
3
  export type Scope = (typeof scopes)[number];
4
- //# sourceMappingURL=scopes.d.ts.map
4
+ //# sourceMappingURL=Scopes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scopes.d.ts","sourceRoot":"","sources":["../../src/scopes/Scopes.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM,iEAQF,CAAC;AAEX,eAAe,MAAM,CAAC;AACtB,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -8,4 +8,4 @@ const scopes = [
8
8
  "yml",
9
9
  ];
10
10
  export default scopes;
11
- //# sourceMappingURL=scopes.js.map
11
+ //# sourceMappingURL=Scopes.js.map
@@ -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": "1.0.1",
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.11",
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
  }
@@ -0,0 +1,4 @@
1
+ import type Output from "./output/output.js";
2
+
3
+ export type * as Input from "./input/input.js";
4
+ export type { Output };
@@ -0,0 +1,9 @@
1
+ import type { Scope } from "../../../../scopes/Scopes.js";
2
+ import type * as Base from "./list/list.js";
3
+
4
+ type Base = Readonly<Record<Scope, Base.List>>;
5
+
6
+ export type {
7
+ Base as default,
8
+ Base,
9
+ };
@@ -0,0 +1,6 @@
1
+ type List = readonly string[];
2
+
3
+ export type {
4
+ List as default,
5
+ List,
6
+ };
@@ -1,6 +1,7 @@
1
- import type { Scope } from "../../../scopes/scopes.js";
2
- import type FileArray from "./array/filearray.js";
1
+ import type Base from "./base/base.js";
2
+ import type Includes from "./includes/includes.js";
3
3
 
4
- type Files = { readonly [S in Scope]: FileArray };
5
-
6
- export type { Files as default };
4
+ export type {
5
+ Base,
6
+ Includes,
7
+ };
@@ -0,0 +1,8 @@
1
+ import type * as Includes from "../base/base.ts";
2
+
3
+ type Includes = Partial<Includes.Base>;
4
+
5
+ export type {
6
+ Includes as default,
7
+ Includes,
8
+ };
@@ -1,22 +1,9 @@
1
- import type plugins from "./plugins/plugins.js";
2
- import type parsers from "./parsers/parsers.js";
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
- namespace Input {
9
- export type Plugins = plugins;
10
- export type Parsers = parsers;
11
- export type Files = files;
12
- export type Rules = rules;
13
- export namespace Rules {
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 { Scope } from "../../../scopes/scopes.js";
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 { Parsers as default };
5
+ export type {
6
+ Parsers as default,
7
+ Parsers,
8
+ Dependencies,
9
+ };
@@ -1,6 +1,9 @@
1
- import type { Scope } from "../../../scopes/scopes.js";
2
- import type { Options } from "../../../factory/factory.js";
1
+ import type { Plugins as Dependencies } from "../../../dependency/dependency.js";
3
2
 
4
- type Plugins = { readonly [S in Scope]: InstanceType<typeof Options[S]>["plugins"] };
3
+ type Plugins = Readonly<Record<Dependencies, { configs: unknown }>>;
5
4
 
6
- export type { Plugins as default };
5
+ export type {
6
+ Plugins as default,
7
+ Plugins,
8
+ Dependencies,
9
+ };
@@ -0,0 +1,9 @@
1
+ import type { Scope } from "../../../../scopes/Scopes.js";
2
+ import type * as Overrides from "../preset/preset.js";
3
+
4
+ type Overrides = Readonly<Particord<Scope, Overrides.Preset.Entry.Object>>;
5
+
6
+ export type {
7
+ Overrides as default,
8
+ Overrides,
9
+ };
@@ -0,0 +1,8 @@
1
+ import type * as Entry from "./object/object.js";
2
+
3
+ type Entry = readonly [string, Entry.Object];
4
+
5
+ export type {
6
+ Entry as default,
7
+ Entry,
8
+ };
@@ -0,0 +1,12 @@
1
+ import type * as Object from "./state/level.js";
2
+
3
+ type Object = Readonly<Record<
4
+ string,
5
+ | Object.Level
6
+ | readonly [Object.Level, ...unknown[]]
7
+ >>;
8
+
9
+ export type {
10
+ Object as default,
11
+ Object,
12
+ };
@@ -0,0 +1,9 @@
1
+ type Level =
2
+ | "error"
3
+ | "warn"
4
+ | "off";
5
+
6
+ export type {
7
+ Level as default,
8
+ Level,
9
+ };
@@ -0,0 +1,9 @@
1
+ import type { Scope } from "../../../../scopes/Scopes.js";
2
+ import type * as Preset from "./entry/entry.js";
3
+
4
+ type Preset = Readonly<Record<Scope, readonly Preset.Entry[]>>;
5
+
6
+ export type {
7
+ Preset as default,
8
+ Preset,
9
+ };
@@ -1,11 +1,7 @@
1
- import type { Scope } from "../../../scopes/scopes.js";
2
- import type RuleEntry from "./entry/entry.js";
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
- Rules as default,
9
- RuleEntry,
10
- RuleObject,
5
+ Preset,
6
+ Overrides,
11
7
  };
@@ -1,8 +1,8 @@
1
- import type Input from "../../input/input.js";
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: Input.Rules.Entry.Object;
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 Output from "./config/config.js";
1
+ import type Config from "./config/config.js";
2
2
 
3
- export type { Output as default };
3
+ export type { Config as default };
@@ -0,0 +1,4 @@
1
+ import type Plugins from "./plugins/index.js";
2
+ import type Parsers from "./parsers/index.js";
3
+
4
+ export type { Plugins, Parsers };
@@ -0,0 +1,9 @@
1
+ type Parsers =
2
+ | "ts"
3
+ | "svelte"
4
+ | "html"
5
+ | "jsonc"
6
+ | "yml"
7
+ ;
8
+
9
+ export type { Parsers as default };
@@ -0,0 +1,10 @@
1
+ type Plugins =
2
+ | "@stylistic"
3
+ | "@typescript-eslint"
4
+ | "svelte"
5
+ | "@html-eslint"
6
+ | "jsonc"
7
+ | "yml"
8
+ ;
9
+
10
+ export type { Plugins as default };
@@ -1,6 +1,6 @@
1
1
  import Ruleset, { Rule } from "./ruleset/Ruleset.js";
2
2
  import Files from "./files/Files.js";
3
- import Options from "./options/options.js";
3
+ import Options from "./options/Options.js";
4
4
 
5
5
  export {
6
6
  Options,
@@ -1,10 +1,10 @@
1
- import type { Scope } from "../../scopes/scopes.js";
2
- import type Input from "../../boundary/input/input.js";
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: Partial<Input.Files>,
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/scopes.js";
1
+ import type { Scope } from "../../../scopes/Scopes.js";
2
2
  import type { Ruleset } from "../../factory.js";
3
- import type Output from "../../../boundary/output/output.js";
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 string,
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/scopes.js";
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 | Input.Rules.Entry.Object) {
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/input/input.js";
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
  }