@eslinted/core 0.6.0 → 0.7.0-rc.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. package/dist/boundary/boundary.d.ts +6 -0
  2. package/dist/boundary/boundary.d.ts.map +1 -0
  3. package/dist/boundary/boundary.js +3 -0
  4. package/dist/boundary/boundary.js.map +1 -0
  5. package/dist/boundary/input/input.d.ts +5 -0
  6. package/dist/boundary/input/input.d.ts.map +1 -0
  7. package/dist/boundary/input/input.js +2 -0
  8. package/dist/boundary/input/input.js.map +1 -0
  9. package/dist/boundary/input/parsers/index.d.ts +5 -0
  10. package/dist/boundary/input/parsers/index.d.ts.map +1 -0
  11. package/dist/boundary/input/parsers/index.js +2 -0
  12. package/dist/boundary/input/parsers/index.js.map +1 -0
  13. package/dist/boundary/input/parsers/parsers.d.ts +7 -0
  14. package/dist/boundary/input/parsers/parsers.d.ts.map +1 -0
  15. package/dist/boundary/input/parsers/parsers.js +2 -0
  16. package/dist/boundary/input/parsers/parsers.js.map +1 -0
  17. package/dist/boundary/input/plugins/index.d.ts +32 -0
  18. package/dist/boundary/input/plugins/index.d.ts.map +1 -0
  19. package/dist/boundary/input/plugins/index.js +2 -0
  20. package/dist/boundary/input/plugins/index.js.map +1 -0
  21. package/dist/boundary/input/plugins/plugins.d.ts +6 -0
  22. package/dist/boundary/input/plugins/plugins.d.ts.map +1 -0
  23. package/dist/boundary/input/plugins/plugins.js +2 -0
  24. package/dist/boundary/input/plugins/plugins.js.map +1 -0
  25. package/dist/boundary/output/config/IConfig.d.ts +19 -0
  26. package/dist/boundary/output/config/IConfig.d.ts.map +1 -0
  27. package/dist/boundary/output/config/IConfig.js +2 -0
  28. package/dist/boundary/output/config/IConfig.js.map +1 -0
  29. package/dist/boundary/output/config/index.d.ts +19 -0
  30. package/dist/boundary/output/config/index.d.ts.map +1 -0
  31. package/dist/boundary/output/config/index.js +2 -0
  32. package/dist/boundary/output/config/index.js.map +1 -0
  33. package/dist/boundary/output/output.d.ts +3 -0
  34. package/dist/boundary/output/output.d.ts.map +1 -0
  35. package/dist/boundary/output/output.js +2 -0
  36. package/dist/boundary/output/output.js.map +1 -0
  37. package/dist/boundary/scopes/scopes.d.ts +4 -0
  38. package/dist/boundary/scopes/scopes.d.ts.map +1 -0
  39. package/dist/boundary/scopes/scopes.js +11 -0
  40. package/dist/boundary/scopes/scopes.js.map +1 -0
  41. package/dist/factory/Factory.d.ts +7 -0
  42. package/dist/factory/Factory.d.ts.map +1 -0
  43. package/dist/factory/Factory.js +5 -0
  44. package/dist/factory/Factory.js.map +1 -0
  45. package/dist/factory/files/Files.d.ts +8 -0
  46. package/dist/factory/files/Files.d.ts.map +1 -0
  47. package/dist/factory/files/Files.js +15 -0
  48. package/dist/factory/files/Files.js.map +1 -0
  49. package/dist/factory/options/Options.d.ts +20 -0
  50. package/dist/factory/options/Options.d.ts.map +1 -0
  51. package/dist/factory/options/Options.js +17 -0
  52. package/dist/factory/options/Options.js.map +1 -0
  53. package/dist/factory/options/option/Option.d.ts +29 -0
  54. package/dist/factory/options/option/Option.d.ts.map +1 -0
  55. package/dist/factory/options/option/Option.js +26 -0
  56. package/dist/factory/options/option/Option.js.map +1 -0
  57. package/dist/factory/options/option/html/index.d.ts +7 -3
  58. package/dist/factory/options/option/html/index.d.ts.map +1 -1
  59. package/dist/factory/options/option/html/index.js +6 -12
  60. package/dist/factory/options/option/html/index.js.map +1 -1
  61. package/dist/factory/options/option/js/index.d.ts +7 -2
  62. package/dist/factory/options/option/js/index.d.ts.map +1 -1
  63. package/dist/factory/options/option/js/index.js +8 -15
  64. package/dist/factory/options/option/js/index.js.map +1 -1
  65. package/dist/factory/options/option/json/index.d.ts +7 -3
  66. package/dist/factory/options/option/json/index.d.ts.map +1 -1
  67. package/dist/factory/options/option/json/index.js +6 -12
  68. package/dist/factory/options/option/json/index.js.map +1 -1
  69. package/dist/factory/options/option/jsonc/index.d.ts +7 -3
  70. package/dist/factory/options/option/jsonc/index.d.ts.map +1 -1
  71. package/dist/factory/options/option/jsonc/index.js +6 -12
  72. package/dist/factory/options/option/jsonc/index.js.map +1 -1
  73. package/dist/factory/options/option/svelte/index.d.ts +22 -5
  74. package/dist/factory/options/option/svelte/index.d.ts.map +1 -1
  75. package/dist/factory/options/option/svelte/index.js +14 -21
  76. package/dist/factory/options/option/svelte/index.js.map +1 -1
  77. package/dist/factory/options/option/ts/index.d.ts +15 -4
  78. package/dist/factory/options/option/ts/index.d.ts.map +1 -1
  79. package/dist/factory/options/option/ts/index.js +12 -18
  80. package/dist/factory/options/option/ts/index.js.map +1 -1
  81. package/dist/factory/options/option/yml/index.d.ts +7 -3
  82. package/dist/factory/options/option/yml/index.d.ts.map +1 -1
  83. package/dist/factory/options/option/yml/index.js +6 -12
  84. package/dist/factory/options/option/yml/index.js.map +1 -1
  85. package/dist/factory/ruleset/Ruleset.d.ts +12 -0
  86. package/dist/factory/ruleset/Ruleset.d.ts.map +1 -0
  87. package/dist/factory/ruleset/Ruleset.js +27 -0
  88. package/dist/factory/ruleset/Ruleset.js.map +1 -0
  89. package/dist/factory/ruleset/rule/Rule.d.ts +6 -0
  90. package/dist/factory/ruleset/rule/Rule.d.ts.map +1 -0
  91. package/dist/factory/ruleset/rule/Rule.js +9 -0
  92. package/dist/factory/ruleset/rule/Rule.js.map +1 -0
  93. package/dist/index.d.ts +3 -4
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.js +38 -26
  96. package/dist/index.js.map +1 -1
  97. package/package.json +2 -2
  98. package/src/boundary/boundary.ts +11 -0
  99. package/src/boundary/input/input.ts +5 -0
  100. package/src/boundary/input/parsers/parsers.ts +6 -0
  101. package/src/boundary/input/plugins/plugins.ts +7 -0
  102. package/src/{config/index.ts → boundary/output/config/IConfig.ts} +3 -4
  103. package/src/boundary/output/config/interface/option/IOption.d.ts +20 -0
  104. package/src/boundary/output/config/interface/option/language/IOLanguage.d.ts +18 -0
  105. package/src/boundary/output/config/interface/option/language/ecma/IOLanguageEcma.d.ts +1 -0
  106. package/src/boundary/output/config/interface/option/language/globals/IOLanguageGlobals.d.ts +1 -0
  107. package/src/boundary/output/config/interface/option/language/source/IOLanguageSource.d.ts +3 -0
  108. package/src/boundary/output/config/interface/option/linter/IOLinter.d.ts +4 -0
  109. package/src/boundary/output/config/interface/option/name/IOName.d.ts +1 -0
  110. package/src/boundary/output/config/interface/option/plugins/IOPlugins.d.ts +1 -0
  111. package/src/boundary/output/config/interface/option/processor/IOProcessor.d.ts +1 -0
  112. package/src/boundary/output/output.ts +3 -0
  113. package/src/factory/Factory.ts +13 -0
  114. package/src/factory/files/Files.ts +15 -0
  115. package/src/factory/options/{index.ts → Options.ts} +2 -2
  116. package/src/factory/options/option/Option.ts +58 -0
  117. package/src/factory/options/option/html/index.ts +10 -23
  118. package/src/factory/options/option/js/index.ts +9 -20
  119. package/src/factory/options/option/json/index.ts +10 -23
  120. package/src/factory/options/option/jsonc/index.ts +10 -23
  121. package/src/factory/options/option/svelte/index.ts +23 -34
  122. package/src/factory/options/option/ts/index.ts +20 -29
  123. package/src/factory/options/option/yml/index.ts +10 -23
  124. package/src/factory/ruleset/{index.ts → Ruleset.ts} +1 -1
  125. package/src/index.ts +62 -72
  126. package/types/project/OmitLast.d.ts +1 -0
  127. package/src/config/files/IFiles.d.ts +0 -1
  128. package/src/config/option/IOption.d.ts +0 -25
  129. package/src/config/option/language/IOLanguage.d.ts +0 -15
  130. package/src/config/option/language/ecma/IOLanguageEcma.d.ts +0 -19
  131. package/src/config/option/language/globals/IOLanguageGlobals.d.ts +0 -3
  132. package/src/config/option/language/parser/IOLanguageParser.d.ts +0 -3
  133. package/src/config/option/language/parserOptions/IOLanguageParserOptions.d.ts +0 -5
  134. package/src/config/option/language/source/IOLanguageSource.d.ts +0 -12
  135. package/src/config/option/linter/IOLinter.d.ts +0 -30
  136. package/src/config/option/name/IOName.d.ts +0 -3
  137. package/src/config/option/plugins/IOPlugins.d.ts +0 -3
  138. package/src/config/option/processor/IOProcessor.d.ts +0 -3
  139. package/src/config/rules/IRules.d.ts +0 -1
  140. package/src/factory/files/index.ts +0 -20
  141. package/src/factory/index.ts +0 -12
  142. package/src/factory/options/option/index.ts +0 -27
  143. package/src/module/boundary/index.ts +0 -3
  144. package/src/module/boundary/parsers/index.ts +0 -12
  145. package/src/module/boundary/plugins/index.ts +0 -20
  146. package/src/module/index.ts +0 -9
  147. /package/src/{config/rules/rule → boundary/output/config/interface/rules}/IRule.d.ts +0 -0
  148. /package/src/{config/rules/rule → boundary/output/config/interface/rules}/state/RuleSeverity.d.ts +0 -0
  149. /package/src/{module/scopes/index.ts → boundary/scopes/scopes.ts} +0 -0
  150. /package/src/factory/ruleset/rule/{index.ts → Rule.ts} +0 -0
  151. /package/types/{literal → typioca/literal}/number/base32.d.ts +0 -0
  152. /package/types/{literal → typioca/literal}/number/base64.d.ts +0 -0
  153. /package/types/{literal → typioca/literal}/number/binary.d.ts +0 -0
  154. /package/types/{literal → typioca/literal}/number/decimal.d.ts +0 -0
  155. /package/types/{literal → typioca/literal}/number/hex.d.ts +0 -0
  156. /package/types/{literal → typioca/literal}/number/octal.d.ts +0 -0
  157. /package/types/{literal → typioca/literal}/number/quatral.d.ts +0 -0
  158. /package/types/{literal → typioca/literal}/number/ternary.d.ts +0 -0
  159. /package/types/{literal → typioca/literal}/string/base64char.d.ts +0 -0
  160. /package/types/{literal → typioca/literal}/string/digit.d.ts +0 -0
  161. /package/types/{literal → typioca/literal}/string/hexchar.d.ts +0 -0
  162. /package/types/{literal → typioca/literal}/string/letter.d.ts +0 -0
  163. /package/types/{safe → typioca/safe}/Safe.d.ts +0 -0
  164. /package/types/{safe → typioca/safe}/numbers/finite/Finite.d.ts +0 -0
  165. /package/types/{safe → typioca/safe}/numbers/finite.d.ts +0 -0
  166. /package/types/{safe → typioca/safe}/numbers/fint.d.ts +0 -0
  167. /package/types/{safe → typioca/safe}/numbers/int/Int.d.ts +0 -0
  168. /package/types/{safe → typioca/safe}/numbers/int.d.ts +0 -0
  169. /package/types/{safe → typioca/safe}/numbers/numberful.d.ts +0 -0
  170. /package/types/{safe → typioca/safe}/numbers/polarity/Negative.d.ts +0 -0
  171. /package/types/{safe → typioca/safe}/numbers/polarity/Positive.d.ts +0 -0
  172. /package/types/{safe → typioca/safe}/numbers/polarity/pole/Pole.d.ts +0 -0
  173. /package/types/{safe → typioca/safe}/primitive.d.ts +0 -0
  174. /package/types/{safe → typioca/safe}/strings/char.d.ts +0 -0
  175. /package/types/{safe → typioca/safe}/strings/length/PropLength.d.ts +0 -0
  176. /package/types/{safe → typioca/safe}/strings/stringful.d.ts +0 -0
  177. /package/types/{utility → typioca/utility}/interface/construct/Particord.d.ts +0 -0
  178. /package/types/{utility → typioca/utility}/interface/construct/Property.d.ts +0 -0
  179. /package/types/{utility → typioca/utility}/interface/construct/Recordful.d.ts +0 -0
  180. /package/types/{utility → typioca/utility}/interface/construct/Table.d.ts +0 -0
  181. /package/types/{utility → typioca/utility}/interface/construct/properties/Field.d.ts +0 -0
  182. /package/types/{utility → typioca/utility}/interface/construct/properties/Flag.d.ts +0 -0
  183. /package/types/{utility → typioca/utility}/interface/construct/properties/Limit.d.ts +0 -0
  184. /package/types/{utility → typioca/utility}/interface/construct/properties/List.d.ts +0 -0
  185. /package/types/{utility → typioca/utility}/interface/construct/properties/Listish.d.ts +0 -0
  186. /package/types/{utility → typioca/utility}/interface/construct/properties/Scalar.d.ts +0 -0
  187. /package/types/{utility → typioca/utility}/interface/construct/tables/FieldTable.d.ts +0 -0
  188. /package/types/{utility → typioca/utility}/interface/construct/tables/FlagTable.d.ts +0 -0
  189. /package/types/{utility → typioca/utility}/interface/construct/tables/ListTable.d.ts +0 -0
  190. /package/types/{utility → typioca/utility}/interface/construct/tables/ListishTable.d.ts +0 -0
  191. /package/types/{utility → typioca/utility}/interface/construct/tables/ScalarTable.d.ts +0 -0
  192. /package/types/{utility → typioca/utility}/interface/identity/Interface.d.ts +0 -0
  193. /package/types/{utility → typioca/utility}/interface/identity/Keys.d.ts +0 -0
  194. /package/types/{utility → typioca/utility}/interface/transform/Unrequire.d.ts +0 -0
  195. /package/types/{utility → typioca/utility}/iterable/construct/ArrayN.d.ts +0 -0
  196. /package/types/{utility → typioca/utility}/iterable/construct/Tuple.d.ts +0 -0
  197. /package/types/{utility → typioca/utility}/iterable/construct/arrays/Arrays.d.ts +0 -0
  198. /package/types/{utility → typioca/utility}/iterable/construct/tuples/Tuples.d.ts +0 -0
  199. /package/types/{utility → typioca/utility}/iterable/identity/DyadType.d.ts +0 -0
  200. /package/types/{utility → typioca/utility}/iterable/identity/MonadType.d.ts +0 -0
  201. /package/types/{utility → typioca/utility}/iterable/identity/TriadType.d.ts +0 -0
  202. /package/types/{utility → typioca/utility}/iterable/identity/array/ArrayType.d.ts +0 -0
  203. /package/types/{utility → typioca/utility}/iterable/identity/array/length/ArrayLength.d.ts +0 -0
  204. /package/types/{utility → typioca/utility}/iterable/transform/Join.d.ts +0 -0
  205. /package/types/{utility → typioca/utility}/iterable/transform/Unflat.d.ts +0 -0
  206. /package/types/{utility → typioca/utility}/iterable/transform/stringarray/Chain.d.ts +0 -0
  207. /package/types/{utility → typioca/utility}/iterable/transform/stringarray/PathN.d.ts +0 -0
  208. /package/types/{utility → typioca/utility}/iterable/transform/stringarray/stringify/Stringify.d.ts +0 -0
  209. /package/types/{utility → typioca/utility}/length/Length.d.ts +0 -0
  210. /package/types/{utility → typioca/utility}/null/null.d.ts +0 -0
  211. /package/types/{utility → typioca/utility}/null/nullable.d.ts +0 -0
  212. /package/types/{utility → typioca/utility}/primitive/Primeval.d.ts +0 -0
  213. /package/types/{utility → typioca/utility}/primitive/boolean/True.d.ts +0 -0
  214. /package/types/{utility → typioca/utility}/primitive/number/Numbered.d.ts +0 -0
  215. /package/types/{utility → typioca/utility}/primitive/string/literal.d.ts +0 -0
  216. /package/types/{utility → typioca/utility}/primitive/string/literalful.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/jsonc/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,MAAM,CAC7C,OAAO,EACP,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,CACN;gBAEG,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EACvC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,EACxD,KAAK,EAAE,SAAS,MAAM,EAAE;CAe3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/jsonc/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,MAAM,CAC7C,OAAO,EACP,OAAO,EACP,KAAK,EACL,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,IAAI,iBAAiB;IACrC,SAAgB,SAAS,KAAe;IAExC,IAAW,eAAe;;MAIzB;CACF"}
@@ -1,16 +1,10 @@
1
- import Option from "../index.js";
1
+ import Option from "../Option.js";
2
2
  export default class JsoncOption extends Option {
3
- constructor(plugins, parser, files) {
4
- super({
5
- name: "linted/scope:jsonc",
6
- files,
7
- plugins,
8
- linterOptions: {
9
- noInlineConfig: true,
10
- reportUnusedDisableDirectives: "error",
11
- },
12
- languageOptions: { parser },
13
- });
3
+ name = "scope:jsonc";
4
+ processor = {};
5
+ get languageOptions() {
6
+ const [parser] = this.parser;
7
+ return { parser };
14
8
  }
15
9
  }
16
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/jsonc/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,MASxC;IACC,YACE,OAAuC,EACvC,MAAwD,EACxD,KAAwB;QAExB,KAAK,CACH;YACE,IAAI,EAAE,oBAAoB;YAC1B,KAAK;YACL,OAAO;YACP,aAAa,EAAE;gBACb,cAAc,EAAE,IAAI;gBACpB,6BAA6B,EAAE,OAAO;aACvC;YACD,eAAe,EAAE,EAAE,MAAM,EAAE;SAC5B,CACF,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/jsonc/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,MAMxC;IACiB,IAAI,GAAG,aAAa,CAAC;IACrB,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"}
@@ -1,10 +1,27 @@
1
- import Option from "../index.js";
1
+ import Option from "../Option.js";
2
2
  import type TsOption from "../ts/index.js";
3
- export default class SvelteOption extends Option<"svelte", "svelte" | keyof TsOption["body"]["plugins"], true, TsOption["body"]["languageOptions"]["parserOptions"] & {
3
+ export default class SvelteOption extends Option<"svelte", "svelte" | keyof TsOption["option"]["plugins"], true, TsOption["option"]["languageOptions"]["parserOptions"] & {
4
4
  parser: unknown;
5
5
  } & {
6
- extraFileExtensions: [".svelte"];
7
- }, never, "svelte/svelte"> {
8
- constructor(plugins: SvelteOption["body"]["plugins"], svelteParser: SvelteOption["body"]["languageOptions"]["parser"], tsParser: SvelteOption["body"]["languageOptions"]["parserOptions"]["parser"], files: readonly string[]);
6
+ extraFileExtensions: readonly [".svelte"];
7
+ }, 2, never, {
8
+ processor: "svelte/svelte";
9
+ }> {
10
+ readonly name = "scope:svelte";
11
+ readonly processor: {
12
+ readonly processor: "svelte/svelte";
13
+ };
14
+ get languageOptions(): {
15
+ readonly ecmaVersion: "latest";
16
+ readonly sourceType: "module";
17
+ readonly parser: unknown;
18
+ readonly parserOptions: {
19
+ readonly ecmaVersion: "latest";
20
+ readonly sourceType: "module";
21
+ readonly project: "tsconfig.json";
22
+ readonly extraFileExtensions: readonly [".svelte"];
23
+ readonly parser: unknown;
24
+ };
25
+ };
9
26
  }
10
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/svelte/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,MAAM,CAC9C,QAAQ,EACR,QAAQ,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EAC5C,IAAI,EACF,QAAQ,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,GACpD;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACnB;IAAE,mBAAmB,EAAE,CAAC,SAAS,CAAC,CAAA;CAAE,EACtC,KAAK,EACL,eAAe,CAChB;gBAEG,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EACxC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,EAC/D,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,EAC5E,KAAK,EAAE,SAAS,MAAM,EAAE;CA2B3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/svelte/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,MAAM,CAC9C,QAAQ,EACR,QAAQ,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAC9C,IAAI,EACF,QAAQ,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,GACtD;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACnB;IAAE,mBAAmB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAAE,EAC/C,CAAC,EACD,KAAK,EACL;IAAE,SAAS,EAAE,eAAe,CAAA;CAAE,CAC/B;IACC,SAAgB,IAAI,kBAAkB;IACtC,SAAgB,SAAS;;MAA2C;IAEpE,IAAW,eAAe;;;;;;;;;;;MAezB;CACF"}
@@ -1,28 +1,21 @@
1
- import Option from "../index.js";
1
+ import Option from "../Option.js";
2
2
  export default class SvelteOption extends Option {
3
- constructor(plugins, svelteParser, tsParser, files) {
4
- super({
5
- name: "linted/scope:svelte",
6
- processor: "svelte/svelte",
7
- files,
8
- plugins,
9
- linterOptions: {
10
- noInlineConfig: true,
11
- reportUnusedDisableDirectives: "error",
12
- },
13
- languageOptions: {
3
+ name = "scope:svelte";
4
+ processor = { processor: "svelte/svelte" };
5
+ get languageOptions() {
6
+ const [parser, tsParser] = this.parser;
7
+ return {
8
+ ecmaVersion: "latest",
9
+ sourceType: "module",
10
+ parser,
11
+ parserOptions: {
14
12
  ecmaVersion: "latest",
15
13
  sourceType: "module",
16
- parser: svelteParser,
17
- parserOptions: {
18
- ecmaVersion: "latest",
19
- sourceType: "module",
20
- project: "tsconfig.json",
21
- extraFileExtensions: [".svelte"],
22
- parser: tsParser,
23
- },
14
+ project: "tsconfig.json",
15
+ extraFileExtensions: [".svelte"],
16
+ parser: tsParser,
24
17
  },
25
- });
18
+ };
26
19
  }
27
20
  }
28
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/svelte/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAGjC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,MASzC;IACC,YACE,OAAwC,EACxC,YAA+D,EAC/D,QAA4E,EAC5E,KAAwB;QAExB,KAAK,CACH;YACE,IAAI,EAAE,qBAAqB;YAC3B,SAAS,EAAE,eAAe;YAC1B,KAAK;YACL,OAAO;YACP,aAAa,EAAE;gBACb,cAAc,EAAE,IAAI;gBACpB,6BAA6B,EAAE,OAAO;aACvC;YACD,eAAe,EAAE;gBACf,WAAW,EAAE,QAAQ;gBACrB,UAAU,EAAE,QAAQ;gBACpB,MAAM,EAAE,YAAY;gBACpB,aAAa,EAAE;oBACb,WAAW,EAAE,QAAQ;oBACrB,UAAU,EAAE,QAAQ;oBACpB,OAAO,EAAE,eAAe;oBACxB,mBAAmB,EAAE,CAAC,SAAS,CAAC;oBAChC,MAAM,EAAE,QAAQ;iBACjB;aACF;SACF,CACF,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/svelte/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAGlC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,MAUzC;IACiB,IAAI,GAAG,cAAc,CAAC;IACtB,SAAS,GAAG,EAAE,SAAS,EAAE,eAAe,EAAW,CAAC;IAEpE,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAEvC,OAAO;YACL,WAAW,EAAE,QAAQ;YACrB,UAAU,EAAE,QAAQ;YACpB,MAAM;YACN,aAAa,EAAE;gBACb,WAAW,EAAE,QAAQ;gBACrB,UAAU,EAAE,QAAQ;gBACpB,OAAO,EAAE,eAAe;gBACxB,mBAAmB,EAAE,CAAC,SAAS,CAAU;gBACzC,MAAM,EAAE,QAAQ;aACjB;SACO,CAAC;IACb,CAAC;CACF"}
@@ -1,8 +1,19 @@
1
- import Option from "../index.js";
1
+ import Option from "../Option.js";
2
2
  import type JsOption from "../js/index.js";
3
- export default class TsOption extends Option<"ts", "@typescript-eslint" | keyof JsOption["body"]["plugins"], true, JsOption["body"]["languageOptions"] & {
3
+ export default class TsOption extends Option<"ts", "@typescript-eslint" | keyof JsOption["option"]["plugins"], true, JsOption["option"]["languageOptions"] & {
4
4
  project: "tsconfig.json";
5
- }> {
6
- constructor(plugins: TsOption["body"]["plugins"], parser: unknown, files: readonly string[]);
5
+ }, 1> {
6
+ readonly name = "scope:ts";
7
+ readonly processor: {};
8
+ get languageOptions(): {
9
+ readonly ecmaVersion: "latest";
10
+ readonly sourceType: "module";
11
+ readonly parser: unknown;
12
+ readonly parserOptions: {
13
+ readonly ecmaVersion: "latest";
14
+ readonly sourceType: "module";
15
+ readonly project: "tsconfig.json";
16
+ };
17
+ };
7
18
  }
8
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,MAAM,CAC1C,IAAI,EACJ,oBAAoB,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EACxD,IAAI,EACF,QAAQ,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,GACnC;IAAE,OAAO,EAAE,eAAe,CAAA;CAAE,CAC/B;gBAEG,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EACpC,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,SAAS,MAAM,EAAE;CAwB3B"}
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,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,MAAM,CAC1C,IAAI,EACJ,oBAAoB,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAC1D,IAAI,EACF,QAAQ,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,GACrC;IAAE,OAAO,EAAE,eAAe,CAAA;CAAE,EAC9B,CAAC,CACF;IACC,SAAgB,IAAI,cAAc;IAClC,SAAgB,SAAS,KAAe;IAExC,IAAW,eAAe;;;;;;;;;MAazB;CACF"}
@@ -1,25 +1,19 @@
1
- import Option from "../index.js";
1
+ import Option from "../Option.js";
2
2
  export default class TsOption extends Option {
3
- constructor(plugins, parser, files) {
4
- super({
5
- name: "linted/scope:ts",
6
- files,
7
- plugins,
8
- linterOptions: {
9
- noInlineConfig: true,
10
- reportUnusedDisableDirectives: "error",
11
- },
12
- languageOptions: {
3
+ name = "scope:ts";
4
+ processor = {};
5
+ get languageOptions() {
6
+ const [parser] = this.parser;
7
+ return {
8
+ ecmaVersion: "latest",
9
+ sourceType: "module",
10
+ parser,
11
+ parserOptions: {
13
12
  ecmaVersion: "latest",
14
13
  sourceType: "module",
15
- parser,
16
- parserOptions: {
17
- ecmaVersion: "latest",
18
- sourceType: "module",
19
- project: "tsconfig.json",
20
- },
14
+ project: "tsconfig.json",
21
15
  },
22
- });
16
+ };
23
17
  }
24
18
  }
25
19
  //# 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,aAAa,CAAC;AAGjC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,MAMrC;IACC,YACE,OAAoC,EACpC,MAAe,EACf,KAAwB;QAExB,KAAK,CACH;YACE,IAAI,EAAE,iBAAiB;YACvB,KAAK;YACL,OAAO;YACP,aAAa,EAAE;gBACb,cAAc,EAAE,IAAI;gBACpB,6BAA6B,EAAE,OAAO;aACvC;YACD,eAAe,EAAE;gBACf,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;aACF;SACF,CACF,CAAC;IACJ,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,QAAS,SAAQ,MAOrC;IACiB,IAAI,GAAG,UAAU,CAAC;IAClB,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;gBACb,WAAW,EAAE,QAAQ;gBACrB,UAAU,EAAE,QAAQ;gBACpB,OAAO,EAAE,eAAe;aACzB;SACO,CAAC;IACb,CAAC;CACF"}
@@ -1,5 +1,9 @@
1
- import Option from "../index.js";
2
- export default class YmlOption extends Option<"yml", "yml", true, never, never, never, never, never> {
3
- constructor(plugins: YmlOption["body"]["plugins"], parser: YmlOption["body"]["languageOptions"]["parser"], files: readonly string[]);
1
+ import Option from "../Option.js";
2
+ export default class YmlOption extends Option<"yml", "yml", false, true, 1> {
3
+ readonly name = "scope:yml";
4
+ readonly processor: {};
5
+ get languageOptions(): {
6
+ readonly parser: unknown;
7
+ };
4
8
  }
5
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/yml/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,MAAM,CAC3C,KAAK,EACL,KAAK,EACL,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,CACN;gBAEG,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EACrC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,EACtD,KAAK,EAAE,SAAS,MAAM,EAAE;CAe3B"}
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,SAAU,SAAQ,MAAM,CAC3C,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,IAAI,eAAe;IACnC,SAAgB,SAAS,KAAe;IAExC,IAAW,eAAe;;MAIzB;CACF"}
@@ -1,16 +1,10 @@
1
- import Option from "../index.js";
1
+ import Option from "../Option.js";
2
2
  export default class YmlOption extends Option {
3
- constructor(plugins, parser, files) {
4
- super({
5
- name: "linted/scope:yml",
6
- files,
7
- plugins,
8
- linterOptions: {
9
- noInlineConfig: true,
10
- reportUnusedDisableDirectives: "error",
11
- },
12
- languageOptions: { parser },
13
- });
3
+ name = "scope:yml";
4
+ processor = {};
5
+ get languageOptions() {
6
+ const [parser] = this.parser;
7
+ return { parser };
14
8
  }
15
9
  }
16
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,aAAa,CAAC;AAEjC,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,MAStC;IACC,YACE,OAAqC,EACrC,MAAsD,EACtD,KAAwB;QAExB,KAAK,CACH;YACE,IAAI,EAAE,kBAAkB;YACxB,KAAK;YACL,OAAO;YACP,aAAa,EAAE;gBACb,cAAc,EAAE,IAAI;gBACpB,6BAA6B,EAAE,OAAO;aACvC;YACD,eAAe,EAAE,EAAE,MAAM,EAAE;SAC5B,CACF,CAAC;IACJ,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,SAAU,SAAQ,MAMtC;IACiB,IAAI,GAAG,WAAW,CAAC;IACnB,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"}
@@ -0,0 +1,12 @@
1
+ import Rule from "./rule/Rule.js";
2
+ export { Rule };
3
+ export default class Ruleset<Language extends string> {
4
+ readonly language: literalful<Language>;
5
+ readonly ruleset: readonly Rule[];
6
+ readonly overrides: Rule[];
7
+ constructor(language: literalful<Language>, ...ruleset: readonly Rule[]);
8
+ get id(): `ruleset:${literalful<Language>}`;
9
+ get flat(): IRule[];
10
+ override(...overrides: (undefined | IRule)[]): this;
11
+ }
12
+ //# sourceMappingURL=Ruleset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Ruleset.d.ts","sourceRoot":"","sources":["../../../src/factory/ruleset/Ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,MAAM,CAAC,OAAO,OAAO,OAAO,CAAC,QAAQ,SAAS,MAAM;aAKhC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IAJhD,SAAgB,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC;IACzC,SAAgB,SAAS,EAAE,IAAI,EAAE,CAAM;gBAGrB,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,EAC9C,GAAG,OAAO,EAAE,SAAS,IAAI,EAAE;IAK7B,IAAW,EAAE,sCAEZ;IAED,IAAW,IAAI,YAKd;IAEM,QAAQ,CAAC,GAAG,SAAS,EAAE,CAAC,SAAS,GAAG,KAAK,CAAC,EAAE;CAcpD"}
@@ -0,0 +1,27 @@
1
+ import Rule from "./rule/Rule.js";
2
+ export { Rule };
3
+ export default class Ruleset {
4
+ language;
5
+ ruleset;
6
+ overrides = [];
7
+ constructor(language, ...ruleset) {
8
+ this.language = language;
9
+ this.ruleset = [...ruleset];
10
+ }
11
+ get id() {
12
+ return `ruleset:${this.language}`;
13
+ }
14
+ get flat() {
15
+ return [
16
+ ...this.ruleset.map(rules => rules.rules),
17
+ ...this.overrides.map(rules => rules.rules),
18
+ ];
19
+ }
20
+ override(...overrides) {
21
+ this.overrides.push(...overrides
22
+ .filter(override => typeof override !== "undefined")
23
+ .map(override => new Rule("override", override)));
24
+ return this;
25
+ }
26
+ }
27
+ //# sourceMappingURL=Ruleset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Ruleset.js","sourceRoot":"","sources":["../../../src/factory/ruleset/Ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,MAAM,CAAC,OAAO,OAAO,OAAO;IAKR;IAJF,OAAO,CAAkB;IACzB,SAAS,GAAW,EAAE,CAAC;IAEvC,YACkB,QAA8B,EAC9C,GAAG,OAAwB;QADX,aAAQ,GAAR,QAAQ,CAAsB;QAG9C,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,IAAW,EAAE;QACX,OAAO,WAAW,IAAI,CAAC,QAAQ,EAAW,CAAC;IAC7C,CAAC;IAED,IAAW,IAAI;QACb,OAAO;YACL,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;YACzC,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;SAC5C,CAAC;IACJ,CAAC;IAEM,QAAQ,CAAC,GAAG,SAAgC;QACjD,IAAI,CAAC,SAAS,CAAC,IAAI,CACjB,GAAG,SAAS;aACT,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,QAAQ,KAAK,WAAW,CAAC;aACnD,GAAG,CACF,QAAQ,CAAC,EAAE,CAAC,IAAI,IAAI,CAClB,UAAU,EACV,QAAQ,CACT,CACF,CACJ,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -0,0 +1,6 @@
1
+ export default class {
2
+ readonly id: string;
3
+ readonly rules: IRule;
4
+ constructor(id: string, rules: IRule);
5
+ }
6
+ //# sourceMappingURL=Rule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../../src/factory/ruleset/rule/Rule.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO;aAEM,EAAE,EAAE,MAAM;aACV,KAAK,EAAE,KAAK;gBADZ,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,KAAK;CAE/B"}
@@ -0,0 +1,9 @@
1
+ export default class {
2
+ id;
3
+ rules;
4
+ constructor(id, rules) {
5
+ this.id = id;
6
+ this.rules = rules;
7
+ }
8
+ }
9
+ //# sourceMappingURL=Rule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../../src/factory/ruleset/rule/Rule.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO;IAEM;IACA;IAFlB,YACkB,EAAU,EACV,KAAY;QADZ,OAAE,GAAF,EAAE,CAAQ;QACV,UAAK,GAAL,KAAK,CAAO;IAC3B,CAAC;CACL"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { Ruleset, Rule } from "./factory/index.js";
2
- import type { Scope, Plugins, Parsers } from "./module/index.js";
3
- import type Config from "./config/index.js";
4
- export { Ruleset, Rule };
1
+ import type { Scope, Plugins, Parsers, Config } from "./boundary/boundary.js";
2
+ import { Ruleset, Rule } from "./factory/Factory.js";
5
3
  export type { Scope };
4
+ export { Ruleset, Rule };
6
5
  export default function (plugins: Plugins, parsers: Parsers, base: Record<Scope, string[]>, includes: Particord<Scope, string[]>, rulesets: {
7
6
  [S in Scope]: Ruleset<S>;
8
7
  }, overrides: Particord<Scope, IRule>): Config[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,OAAO,EACP,IAAI,EACL,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,KAAK,EACL,OAAO,EACP,OAAO,EACR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACzB,YAAY,EAAE,KAAK,EAAE,CAAC;AACtB,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAC7B,QAAQ,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EACpC,QAAQ,EAAE;KAAG,CAAC,IAAI,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC;CAAE,EACtC,SAAS,EAAE,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,GACjC,MAAM,EAAE,CA0GV"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACP,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,OAAO,EACP,IAAI,EACL,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,KAAK,EAAE,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACzB,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAC7B,QAAQ,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EACpC,QAAQ,EAAE;KAAG,CAAC,IAAI,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC;CAAE,EACtC,SAAS,EAAE,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,GACjC,MAAM,EAAE,CAgGV"}
package/dist/index.js CHANGED
@@ -1,41 +1,53 @@
1
- import scopes from "./module/index.js";
2
- import { options, Files, Ruleset, Rule, } from "./factory/index.js";
1
+ import scopes from "./boundary/boundary.js";
2
+ import { Options, Files, Ruleset, Rule, } from "./factory/Factory.js";
3
3
  export { Ruleset, Rule };
4
4
  export default function (plugins, parsers, base, includes, rulesets, overrides) {
5
5
  try {
6
+ const files = new Files(base, includes), imports = {
7
+ js: [plugins.js, []],
8
+ ts: [plugins.ts, [parsers.ts]],
9
+ svelte: [
10
+ plugins.svelte,
11
+ [parsers.svelte, parsers.ts],
12
+ ],
13
+ html: [plugins.html, [parsers.html]],
14
+ json: [plugins.json, [parsers.json]],
15
+ jsonc: [plugins.jsonc, [parsers.jsonc]],
16
+ yml: [plugins.yml, [parsers.yml]],
17
+ };
6
18
  for (const scope of scopes)
7
19
  rulesets[scope].override(overrides[scope]);
8
- const instantiatedOptions = {
9
- js: new options
10
- .js(plugins.js, new Files("js", { base, includes }).files)
11
- .body,
12
- ts: new options
13
- .ts(plugins.ts, parsers.ts, new Files("ts", { base, includes }).files)
14
- .body,
15
- svelte: new options
16
- .svelte(plugins.svelte, parsers.svelte, parsers.ts, new Files("svelte", { base, includes }).files)
17
- .body,
18
- html: new options
19
- .html(plugins.html, parsers.html, new Files("html", { base, includes }).files)
20
- .body,
21
- json: new options
22
- .json(plugins.json, parsers.json, new Files("json", { base, includes }).files)
23
- .body,
24
- jsonc: new options
25
- .jsonc(plugins.jsonc, parsers.jsonc, new Files("jsonc", { base, includes }).files)
26
- .body,
27
- yml: new options
28
- .yml(plugins.yml, parsers.yml, new Files("yml", { base, includes }).files)
29
- .body,
20
+ const options = {
21
+ js: new Options
22
+ .js(files.files("js"), ...imports.js)
23
+ .option,
24
+ ts: new Options
25
+ .ts(files.files("ts"), ...imports.ts)
26
+ .option,
27
+ svelte: new Options
28
+ .svelte(files.files("svelte"), ...imports.svelte)
29
+ .option,
30
+ html: new Options
31
+ .html(files.files("html"), ...imports.html)
32
+ .option,
33
+ json: new Options
34
+ .json(files.files("json"), ...imports.json)
35
+ .option,
36
+ jsonc: new Options
37
+ .jsonc(files.files("jsonc"), ...imports.jsonc)
38
+ .option,
39
+ yml: new Options
40
+ .yml(files.files("yml"), ...imports.yml)
41
+ .option,
30
42
  };
31
43
  return scopes
32
- .map(scope => instantiatedOptions[scope].files.length > 0
44
+ .map(scope => options[scope].files.length > 0
33
45
  ? rulesets[scope]
34
46
  .flat
35
47
  .map(rules => {
36
48
  return {
37
49
  rules,
38
- ...instantiatedOptions[scope],
50
+ ...options[scope],
39
51
  };
40
52
  })
41
53
  : [])
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,GACL,MAAM,oBAAoB,CAAC;AAQ5B,OAA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MAAM,CAClB;iBACA,MAAM;YACT,IAAI,EAAE,IAAI,OAAO;iBACd,IAAI,CACH,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EACnB,GAAG,OAAO,CAAC,IAAI,CAChB;iBACA,MAAM;YACT,IAAI,EAAE,IAAI,OAAO;iBACd,IAAI,CACH,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EACnB,GAAG,OAAO,CAAC,IAAI,CAChB;iBACA,MAAM;YACT,KAAK,EAAE,IAAI,OAAO;iBACf,KAAK,CACJ,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,EACpB,GAAG,OAAO,CAAC,KAAK,CACjB;iBACA,MAAM;YACT,GAAG,EAAE,IAAI,OAAO;iBACb,GAAG,CACF,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAClB,GAAG,OAAO,CAAC,GAAG,CACf;iBACA,MAAM;SACV,CAAC;QAEF,OAAO,MAAM;aACV,GAAG,CACF,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;YACtC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;iBACd,IAAI;iBACJ,GAAG,CACF,KAAK,CAAC,EAAE;gBACN,OAAO;oBACL,KAAK;oBACL,GAAG,OAAO,CAAC,KAAK,CAAC;iBAClB,CAAC;YACJ,CAAC,CACF;YACH,CAAC,CAAC,EAAE,CACP;aACA,IAAI,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,6BAA6B,EAC7B,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslinted/core",
3
- "version": "0.6.0",
3
+ "version": "0.7.0-rc.4",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {},
34
34
  "devDependencies": {
35
35
  "eslint": "~8.57.0",
36
- "linted": "~15.3.1",
36
+ "linted": "~15.3.2",
37
37
  "npm-run-all": "^4.1.5",
38
38
  "typescript": "^5.5.3"
39
39
  },
@@ -0,0 +1,11 @@
1
+ import scopes, { type Scope } from "./scopes/scopes.js";
2
+ import type { Plugins, Parsers } from "./input/input.js";
3
+ import type Config from "./output/output.js";
4
+
5
+ export default scopes;
6
+ export type {
7
+ Scope,
8
+ Plugins,
9
+ Parsers,
10
+ Config,
11
+ };
@@ -0,0 +1,5 @@
1
+ import type Plugins from "./plugins/plugins.js";
2
+ import type Parsers from "./parsers/parsers.js";
3
+
4
+ export type { Plugins, Parsers };
5
+ export type { Scope } from "../boundary.js";
@@ -0,0 +1,6 @@
1
+ import type { Scope } from "../input.js";
2
+ import type { Options } from "../../../factory/Factory.js";
3
+
4
+ type Parsers = { [S in Scope]: ConstructorParameters < typeof Options[S] > [2] };
5
+
6
+ export type { Parsers as default };
@@ -0,0 +1,7 @@
1
+ import type { Scope, Options } from "../../../factory/Factory.js";
2
+
3
+ type Plugins = {
4
+ [S in Scope]: InstanceType<typeof Options[S]>["plugins"];
5
+ };
6
+
7
+ export type { Plugins as default };
@@ -1,7 +1,7 @@
1
- export default interface Config {
1
+ export default interface IConfig {
2
+ name: `scope:${string}`;
2
3
  rules: IRule;
3
4
  files: readonly string[];
4
- name: `linted/scope:${string}`;
5
5
  linterOptions: {
6
6
  noInlineConfig: true;
7
7
  reportUnusedDisableDirectives: "error";
@@ -9,8 +9,7 @@ export default interface Config {
9
9
  languageOptions: {
10
10
  sourceType?:
11
11
  | "module"
12
- | "script"
13
- ;
12
+ | "script";
14
13
  ecmaVersion?: "latest";
15
14
  globals?: Record<string, true>;
16
15
  parser?: unknown;
@@ -0,0 +1,20 @@
1
+ declare type IOption<
2
+ Name extends string,
3
+ PluginId extends string,
4
+ IsEcma extends boolean,
5
+ ParserOptions extends object | boolean,
6
+ GlobalTypes extends string,
7
+ Processor extends object,
8
+ > =
9
+ {
10
+ name: IOName<Name>;
11
+ files: readonly string[];
12
+ linterOptions: IOLinter;
13
+ languageOptions: IOLanguage<
14
+ IsEcma,
15
+ ParserOptions,
16
+ GlobalTypes
17
+ >;
18
+ }
19
+ & (IOPlugins<PluginId> extends never ? object : { plugins: IOPlugins<PluginId> })
20
+ & (Interface<Processor> extends never ? object : Interface<Processor> extends { "interface": string } ? Interface<Processor> : object);
@@ -0,0 +1,18 @@
1
+ declare type IOLanguage<
2
+ IsEcma extends boolean,
3
+ ParserOptions extends object | boolean,
4
+ GlobalTypes extends string,
5
+ > =
6
+ & (True<IsEcma> extends never ? object : { ecmaVersion: IOLanguageEcma; sourceType: IOLanguageSource })
7
+ & (literalful<GlobalTypes> extends never ? object : { globals: IOLanguageGlobals<GlobalTypes> })
8
+ & (
9
+ ParserOptions extends boolean
10
+ ? True<ParserOptions> extends never
11
+ ? object
12
+ : { parser: unknown }
13
+ : ParserOptions extends object
14
+ ? Interface<ParserOptions> extends never
15
+ ? object
16
+ : { parser: unknown; parserOptions: ParserOptions }
17
+ : object
18
+ );
@@ -0,0 +1 @@
1
+ declare type IOLanguageEcma = "latest";
@@ -0,0 +1 @@
1
+ declare type IOLanguageGlobals<GlobalTypes extends string> = Record<GlobalTypes, true>;
@@ -0,0 +1,3 @@
1
+ declare type IOLanguageSource =
2
+ | "module"
3
+ | "script";
@@ -0,0 +1,4 @@
1
+ declare interface IOLinter {
2
+ noInlineConfig: true;
3
+ reportUnusedDisableDirectives: "error";
4
+ }
@@ -0,0 +1 @@
1
+ declare type IOName<Name extends string> = literalful<Name>;
@@ -0,0 +1 @@
1
+ declare type IOPlugins<PluginId extends string> = Record<literalful<PluginId>, { configs: unknown }>;
@@ -0,0 +1 @@
1
+ declare type IOProcessor<ProcessorId extends string> = literalful<ProcessorId>;
@@ -0,0 +1,3 @@
1
+ import type IConfig from "./config/IConfig.js";
2
+
3
+ export type { IConfig as default };