@eslinted/core 3.0.3-rc.2 → 3.0.3-rc.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. package/dist/boundary/input/files/base/base.d.ts +1 -1
  2. package/dist/boundary/input/files/base/base.d.ts.map +1 -1
  3. package/dist/boundary/input/files/base/list/list.d.ts +1 -1
  4. package/dist/boundary/input/files/base/list/list.d.ts.map +1 -1
  5. package/dist/boundary/input/files/files.d.ts +1 -1
  6. package/dist/boundary/input/files/files.d.ts.map +1 -1
  7. package/dist/boundary/input/files/includes/includes.d.ts +1 -1
  8. package/dist/boundary/input/files/includes/includes.d.ts.map +1 -1
  9. package/dist/boundary/input/input.d.ts +1 -1
  10. package/dist/boundary/input/input.d.ts.map +1 -1
  11. package/dist/boundary/input/parsers/parsers.d.ts +1 -1
  12. package/dist/boundary/input/parsers/parsers.d.ts.map +1 -1
  13. package/dist/boundary/input/plugins/plugins.d.ts +1 -1
  14. package/dist/boundary/input/plugins/plugins.d.ts.map +1 -1
  15. package/dist/boundary/input/rules/overrides/overrides.d.ts +1 -1
  16. package/dist/boundary/input/rules/overrides/overrides.d.ts.map +1 -1
  17. package/dist/boundary/input/rules/preset/entry/entry.d.ts +1 -1
  18. package/dist/boundary/input/rules/preset/entry/entry.d.ts.map +1 -1
  19. package/dist/boundary/input/rules/preset/entry/object/object.d.ts +1 -1
  20. package/dist/boundary/input/rules/preset/entry/object/object.d.ts.map +1 -1
  21. package/dist/boundary/input/rules/preset/entry/object/state/level.d.ts +1 -1
  22. package/dist/boundary/input/rules/preset/entry/object/state/level.d.ts.map +1 -1
  23. package/dist/boundary/input/rules/preset/preset.d.ts +1 -1
  24. package/dist/boundary/input/rules/preset/preset.d.ts.map +1 -1
  25. package/dist/boundary/input/rules/rules.d.ts +1 -1
  26. package/dist/boundary/input/rules/rules.d.ts.map +1 -1
  27. package/dist/dependency/dependency.d.ts +1 -1
  28. package/dist/dependency/dependency.d.ts.map +1 -1
  29. package/dist/factory/files/Files.d.ts.map +1 -1
  30. package/dist/factory/files/Files.js +1 -4
  31. package/dist/factory/files/Files.js.map +1 -1
  32. package/dist/factory/options/option/Option.d.ts.map +1 -1
  33. package/dist/factory/options/option/Option.js +2 -10
  34. package/dist/factory/options/option/Option.js.map +1 -1
  35. package/dist/factory/options/option/html/index.d.ts.map +1 -1
  36. package/dist/factory/options/option/html/index.js +2 -7
  37. package/dist/factory/options/option/html/index.js.map +1 -1
  38. package/dist/factory/options/option/js/index.d.ts.map +1 -1
  39. package/dist/factory/options/option/js/index.js +4 -9
  40. package/dist/factory/options/option/js/index.js.map +1 -1
  41. package/dist/factory/options/option/json/index.d.ts.map +1 -1
  42. package/dist/factory/options/option/json/index.js +2 -7
  43. package/dist/factory/options/option/json/index.js.map +1 -1
  44. package/dist/factory/options/option/jsonc/index.d.ts.map +1 -1
  45. package/dist/factory/options/option/jsonc/index.js +2 -7
  46. package/dist/factory/options/option/jsonc/index.js.map +1 -1
  47. package/dist/factory/options/option/md/index.d.ts.map +1 -1
  48. package/dist/factory/options/option/md/index.js +2 -7
  49. package/dist/factory/options/option/md/index.js.map +1 -1
  50. package/dist/factory/options/option/mocha/index.d.ts +1 -1
  51. package/dist/factory/options/option/mocha/index.d.ts.map +1 -1
  52. package/dist/factory/options/option/mocha/index.js +8 -17
  53. package/dist/factory/options/option/mocha/index.js.map +1 -1
  54. package/dist/factory/options/option/svelte/index.d.ts +5 -5
  55. package/dist/factory/options/option/svelte/index.d.ts.map +1 -1
  56. package/dist/factory/options/option/svelte/index.js +11 -16
  57. package/dist/factory/options/option/svelte/index.js.map +1 -1
  58. package/dist/factory/options/option/ts/index.d.ts +3 -3
  59. package/dist/factory/options/option/ts/index.d.ts.map +1 -1
  60. package/dist/factory/options/option/ts/index.js +7 -16
  61. package/dist/factory/options/option/ts/index.js.map +1 -1
  62. package/dist/factory/options/option/yml/index.d.ts.map +1 -1
  63. package/dist/factory/options/option/yml/index.js +2 -7
  64. package/dist/factory/options/option/yml/index.js.map +1 -1
  65. package/dist/factory/ruleset/Ruleset.d.ts +1 -1
  66. package/dist/factory/ruleset/Ruleset.d.ts.map +1 -1
  67. package/dist/factory/ruleset/Ruleset.js +5 -15
  68. package/dist/factory/ruleset/Ruleset.js.map +1 -1
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.js +11 -37
  71. package/dist/index.js.map +1 -1
  72. package/package.json +1 -1
  73. package/src/boundary/input/files/base/base.ts +1 -4
  74. package/src/boundary/input/files/base/list/list.ts +1 -4
  75. package/src/boundary/input/files/files.ts +1 -4
  76. package/src/boundary/input/files/includes/includes.ts +1 -4
  77. package/src/boundary/input/input.ts +1 -4
  78. package/src/boundary/input/parsers/parsers.ts +1 -5
  79. package/src/boundary/input/plugins/plugins.ts +1 -5
  80. package/src/boundary/input/rules/overrides/overrides.ts +1 -4
  81. package/src/boundary/input/rules/preset/entry/entry.ts +1 -4
  82. package/src/boundary/input/rules/preset/entry/object/object.ts +1 -4
  83. package/src/boundary/input/rules/preset/entry/object/state/level.ts +1 -4
  84. package/src/boundary/input/rules/preset/preset.ts +1 -4
  85. package/src/boundary/input/rules/rules.ts +1 -4
  86. package/src/dependency/dependency.ts +1 -5
  87. package/src/factory/files/Files.ts +2 -10
  88. package/src/factory/options/option/Option.ts +15 -45
  89. package/src/factory/options/option/html/index.ts +2 -10
  90. package/src/factory/options/option/js/index.ts +4 -12
  91. package/src/factory/options/option/json/index.ts +2 -10
  92. package/src/factory/options/option/jsonc/index.ts +2 -10
  93. package/src/factory/options/option/md/index.ts +2 -10
  94. package/src/factory/options/option/mocha/index.ts +10 -22
  95. package/src/factory/options/option/svelte/index.ts +12 -22
  96. package/src/factory/options/option/ts/index.ts +8 -21
  97. package/src/factory/options/option/yml/index.ts +2 -10
  98. package/src/factory/ruleset/Ruleset.ts +8 -40
  99. package/src/index.ts +16 -47
  100. 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,EACF,EAAE,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,GAC/B;IAAE,OAAO,EAAE,eAAe,CAAA;CAAE,EAC9B,CAAC,CACF;IACC,SAAgB,KAAK,QAAQ;IAC7B,SAAgB,SAAS,KAAe;IAExC,IAAW,eAAe;;;;;;;;;MAqBzB;CACF"}
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
- try {
7
- const [parser] = this.parser;
8
- return {
9
- ecmaVersion: "latest",
10
- sourceType: "module",
11
- parser,
12
- parserOptions: {
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,MAO/B;IACiB,KAAK,GAAG,IAAI,CAAC;IACb,SAAS,GAAG,EAAW,CAAC;IAExC,IAAW,eAAe;QACxB,IAAI,CAAC;YACH,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;YAE7B,OAAO;gBACL,WAAW,EAAE,QAAQ;gBACrB,UAAU,EAAE,QAAQ;gBACpB,MAAM;gBACN,aAAa,EAAE;oBACb,WAAW,EAAE,QAAQ;oBACrB,UAAU,EAAE,QAAQ;oBACpB,OAAO,EAAE,eAAe;iBACzB;aACO,CAAC;QACb,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,4CAA4C,EAC5C,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
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;;MAYzB;CACF"}
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
- try {
7
- const [parser] = this.parser;
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,IAAI,CAAC;YACH,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;YAE7B,OAAO,EAAE,MAAM,EAAW,CAAC;QAC7B,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,6CAA6C,EAC7C,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
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").default | readonly [import("../../boundary/input/rules/preset/entry/object/state/level.js").default, ...unknown[]]>>])[];
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":[],"m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
16
  get id() {
17
- try {
18
- const { scope } = this;
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
- try {
39
- if (typeof overrides !== "undefined")
40
- this.overrides = new Rule("override", overrides);
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;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,EAA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,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,CAqKnB"}
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.main`, { cause: e });
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,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAClD;YACD,EAAE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,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.2",
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",
@@ -3,7 +3,4 @@ import type * as Base from "./list/list.js";
3
3
 
4
4
  type Base = Readonly<Record<Scope, Base.List>>;
5
5
 
6
- export type {
7
- Base as default,
8
- Base,
9
- };
6
+ export type { Base, Base as default };
@@ -1,6 +1,3 @@
1
1
  type List = readonly string[];
2
2
 
3
- export type {
4
- List as default,
5
- List,
6
- };
3
+ export type { List, List as default };
@@ -1,7 +1,4 @@
1
1
  import type Base from "./base/base.js";
2
2
  import type Includes from "./includes/includes.js";
3
3
 
4
- export type {
5
- Base,
6
- Includes,
7
- };
4
+ export type { Base, Includes };
@@ -2,7 +2,4 @@ import type * as Includes from "../base/base.ts";
2
2
 
3
3
  type Includes = Partial<Includes.Base>;
4
4
 
5
- export type {
6
- Includes as default,
7
- Includes,
8
- };
5
+ export type { Includes, Includes as default };
@@ -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 };
@@ -3,7 +3,4 @@ import type * as Overrides from "../preset/preset.js";
3
3
 
4
4
  type Overrides = Readonly<Partial<Record<Scope, Overrides.Preset.Entry.Object>>>;
5
5
 
6
- export type {
7
- Overrides as default,
8
- Overrides,
9
- };
6
+ export type { Overrides, Overrides as default };
@@ -2,7 +2,4 @@ import type * as Entry from "./object/object.js";
2
2
 
3
3
  type Entry = readonly [string, Entry.Object];
4
4
 
5
- export type {
6
- Entry as default,
7
- Entry,
8
- };
5
+ export type { Entry, Entry as default };
@@ -6,7 +6,4 @@ type Object = Readonly<Record<
6
6
  | readonly [Object.Level, ...unknown[]]
7
7
  >>;
8
8
 
9
- export type {
10
- Object as default,
11
- Object,
12
- };
9
+ export type { Object, Object as default };
@@ -3,7 +3,4 @@ type Level =
3
3
  | "warn"
4
4
  | "off";
5
5
 
6
- export type {
7
- Level as default,
8
- Level,
9
- };
6
+ export type { Level, Level as default };
@@ -3,7 +3,4 @@ import type * as Preset from "./entry/entry.js";
3
3
 
4
4
  type Preset = Readonly<Record<Scope, readonly Preset.Entry[]>>;
5
5
 
6
- export type {
7
- Preset as default,
8
- Preset,
9
- };
6
+ export type { Preset, Preset as default };
@@ -1,7 +1,4 @@
1
1
  import type Preset from "./preset/preset.js";
2
2
  import type Overrides from "./overrides/overrides.js";
3
3
 
4
- export type {
5
- Preset,
6
- Overrides,
7
- };
4
+ export type { Preset, Overrides };
@@ -2,8 +2,4 @@ import type Plugins from "./plugins/index.js";
2
2
  import type Parsers from "./parsers/index.js";
3
3
  import type Globals from "./globals/index.js";
4
4
 
5
- export type {
6
- Plugins,
7
- Parsers,
8
- Globals,
9
- };
5
+ export type { Plugins, Parsers, Globals };
@@ -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
- ([ruleId, rules]) => {
56
- const name = `${baseName}+${ruleId}` as const;
48
+ return ruleset.records.map(([ruleId, rules]) => {
49
+ const name = `${baseName}+${ruleId}` as const;
57
50
 
58
- return {
59
- name,
60
- files,
61
- rules,
62
- ...option,
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
- try {
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
- try {
15
- const [parser] = this.parser;
14
+ const [parser] = this.parser;
16
15
 
17
- return { parser } as const;
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
- try {
9
- return {
10
- ecmaVersion: "latest",
11
- sourceType: "module",
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
- try {
15
- const [parser] = this.parser;
14
+ const [parser] = this.parser;
16
15
 
17
- return { parser } as const;
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
- try {
15
- const [parser] = this.parser;
14
+ const [parser] = this.parser;
16
15
 
17
- return { parser } as const;
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
- try {
15
- const [parser] = this.parser;
14
+ const [parser] = this.parser;
16
15
 
17
- return { parser } as const;
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
  }