@eslinted/core 4.0.5-rc.6 → 4.0.5-rc.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. package/dist/factory/files.d.ts +8 -0
  2. package/dist/factory/files.d.ts.map +1 -0
  3. package/dist/factory/files.js +19 -0
  4. package/dist/factory/files.js.map +1 -0
  5. package/dist/factory/index.d.ts +6 -0
  6. package/dist/factory/index.d.ts.map +1 -0
  7. package/dist/factory/index.js +5 -0
  8. package/dist/factory/index.js.map +1 -0
  9. package/dist/factory/options/html.d.ts +9 -0
  10. package/dist/factory/options/html.d.ts.map +1 -0
  11. package/dist/factory/options/html.js +10 -0
  12. package/dist/factory/options/html.js.map +1 -0
  13. package/dist/factory/options/index.d.ts +23 -0
  14. package/dist/factory/options/index.d.ts.map +1 -0
  15. package/dist/factory/options/index.js +21 -0
  16. package/dist/factory/options/index.js.map +1 -0
  17. package/dist/factory/options/js.d.ts +10 -0
  18. package/dist/factory/options/js.d.ts.map +1 -0
  19. package/dist/factory/options/js.js +12 -0
  20. package/dist/factory/options/js.js.map +1 -0
  21. package/dist/factory/options/json.d.ts +9 -0
  22. package/dist/factory/options/json.d.ts.map +1 -0
  23. package/dist/factory/options/json.js +10 -0
  24. package/dist/factory/options/json.js.map +1 -0
  25. package/dist/factory/options/jsonc.d.ts +9 -0
  26. package/dist/factory/options/jsonc.d.ts.map +1 -0
  27. package/dist/factory/options/jsonc.js +10 -0
  28. package/dist/factory/options/jsonc.js.map +1 -0
  29. package/dist/factory/options/md.d.ts +9 -0
  30. package/dist/factory/options/md.d.ts.map +1 -0
  31. package/dist/factory/options/md.js +10 -0
  32. package/dist/factory/options/md.js.map +1 -0
  33. package/dist/factory/options/mocha.d.ts +40 -0
  34. package/dist/factory/options/mocha.d.ts.map +1 -0
  35. package/dist/factory/options/mocha.js +17 -0
  36. package/dist/factory/options/mocha.js.map +1 -0
  37. package/dist/factory/options/option/index.d.ts +2986 -0
  38. package/dist/factory/options/option/index.d.ts.map +1 -0
  39. package/dist/factory/options/option/index.js +47 -0
  40. package/dist/factory/options/option/index.js.map +1 -0
  41. package/dist/factory/options/option/template/globals.d.ts +3 -0
  42. package/dist/factory/options/option/template/globals.d.ts.map +1 -0
  43. package/dist/factory/options/option/template/globals.js +1 -0
  44. package/dist/factory/options/option/template/globals.js.map +1 -0
  45. package/dist/factory/options/option/template/index.d.ts +15 -0
  46. package/dist/factory/options/option/template/index.d.ts.map +1 -0
  47. package/dist/factory/options/option/template/index.js +1 -0
  48. package/dist/factory/options/option/template/index.js.map +1 -0
  49. package/dist/factory/options/option/template/language/ecma.d.ts +2 -0
  50. package/dist/factory/options/option/template/language/ecma.d.ts.map +1 -0
  51. package/dist/factory/options/option/template/language/ecma.js +1 -0
  52. package/dist/factory/options/option/template/language/ecma.js.map +1 -0
  53. package/dist/factory/options/option/template/language/index.d.ts +14 -0
  54. package/dist/factory/options/option/template/language/index.d.ts.map +1 -0
  55. package/dist/factory/options/option/template/language/index.js +1 -0
  56. package/dist/factory/options/option/template/language/index.js.map +1 -0
  57. package/dist/factory/options/option/template/language/source.d.ts +2 -0
  58. package/dist/factory/options/option/template/language/source.d.ts.map +1 -0
  59. package/dist/factory/options/option/template/language/source.js +1 -0
  60. package/dist/factory/options/option/template/language/source.js.map +1 -0
  61. package/dist/factory/options/option/template/linter.d.ts +5 -0
  62. package/dist/factory/options/option/template/linter.d.ts.map +1 -0
  63. package/dist/factory/options/option/template/linter.js +1 -0
  64. package/dist/factory/options/option/template/linter.js.map +1 -0
  65. package/dist/factory/options/option/template/plugins.d.ts +6 -0
  66. package/dist/factory/options/option/template/plugins.d.ts.map +1 -0
  67. package/dist/factory/options/option/template/plugins.js +1 -0
  68. package/dist/factory/options/option/template/plugins.js.map +1 -0
  69. package/dist/factory/options/svelte.d.ts +27 -0
  70. package/dist/factory/options/svelte.d.ts.map +1 -0
  71. package/dist/factory/options/svelte.js +21 -0
  72. package/dist/factory/options/svelte.js.map +1 -0
  73. package/dist/factory/options/ts.d.ts +19 -0
  74. package/dist/factory/options/ts.d.ts.map +1 -0
  75. package/dist/factory/options/ts.js +15 -0
  76. package/dist/factory/options/ts.js.map +1 -0
  77. package/dist/factory/options/yml.d.ts +9 -0
  78. package/dist/factory/options/yml.d.ts.map +1 -0
  79. package/dist/factory/options/yml.js +10 -0
  80. package/dist/factory/options/yml.js.map +1 -0
  81. package/dist/factory/rulesets/index.d.ts +10 -0
  82. package/dist/factory/rulesets/index.d.ts.map +1 -0
  83. package/dist/factory/rulesets/index.js +17 -0
  84. package/dist/factory/rulesets/index.js.map +1 -0
  85. package/dist/factory/rulesets/ruleset.d.ts +10 -0
  86. package/dist/factory/rulesets/ruleset.d.ts.map +1 -0
  87. package/dist/factory/rulesets/ruleset.js +20 -0
  88. package/dist/factory/rulesets/ruleset.js.map +1 -0
  89. package/dist/index.d.ts +26 -0
  90. package/dist/index.d.ts.map +1 -0
  91. package/dist/index.js +31 -0
  92. package/dist/index.js.map +1 -0
  93. package/dist/input/files.d.ts +6 -0
  94. package/dist/input/files.d.ts.map +1 -0
  95. package/dist/input/files.js +1 -0
  96. package/dist/input/files.js.map +1 -0
  97. package/dist/input/imports/parsers.d.ts +3 -0
  98. package/dist/input/imports/parsers.d.ts.map +1 -0
  99. package/dist/input/imports/parsers.js +1 -0
  100. package/dist/input/imports/parsers.js.map +1 -0
  101. package/dist/input/imports/plugins.d.ts +2 -0
  102. package/dist/input/imports/plugins.d.ts.map +1 -0
  103. package/dist/input/imports/plugins.js +1 -0
  104. package/dist/input/imports/plugins.js.map +1 -0
  105. package/dist/input/index.d.ts +22 -0
  106. package/dist/input/index.d.ts.map +1 -0
  107. package/dist/input/index.js +1 -0
  108. package/dist/input/index.js.map +1 -0
  109. package/dist/input/parsers.d.ts +3 -0
  110. package/dist/input/parsers.d.ts.map +1 -0
  111. package/dist/input/parsers.js +1 -0
  112. package/dist/input/parsers.js.map +1 -0
  113. package/dist/input/plugins.d.ts +5 -0
  114. package/dist/input/plugins.d.ts.map +1 -0
  115. package/dist/input/plugins.js +1 -0
  116. package/dist/input/plugins.js.map +1 -0
  117. package/dist/input/rules/entry/index.d.ts +7 -0
  118. package/dist/input/rules/entry/index.d.ts.map +1 -0
  119. package/dist/input/rules/entry/index.js +1 -0
  120. package/dist/input/rules/entry/index.js.map +1 -0
  121. package/dist/input/rules/entry/record/index.d.ts +3 -0
  122. package/dist/input/rules/entry/record/index.d.ts.map +1 -0
  123. package/dist/input/rules/entry/record/index.js +1 -0
  124. package/dist/input/rules/entry/record/index.js.map +1 -0
  125. package/dist/input/rules/entry/record/state.d.ts +2 -0
  126. package/dist/input/rules/entry/record/state.d.ts.map +1 -0
  127. package/dist/input/rules/entry/record/state.js +1 -0
  128. package/dist/input/rules/entry/record/state.js.map +1 -0
  129. package/dist/input/rules/index.d.ts +14 -0
  130. package/dist/input/rules/index.d.ts.map +1 -0
  131. package/dist/input/rules/index.js +1 -0
  132. package/dist/input/rules/index.js.map +1 -0
  133. package/dist/output.d.ts +20 -0
  134. package/dist/output.d.ts.map +1 -0
  135. package/dist/output.js +1 -0
  136. package/dist/output.js.map +1 -0
  137. package/dist/scopes.d.ts +3 -0
  138. package/dist/scopes.d.ts.map +1 -0
  139. package/dist/scopes.js +12 -0
  140. package/dist/scopes.js.map +1 -0
  141. package/package.json +4 -4
  142. package/tsconfig.json +5 -6
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factory/options/option/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EACV,KAAK,EACL,KAAK,EACL,MAAM,EAEN,eAAe,EACf,OAAO,EACP,OAAO,EACR,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,MAAM,CAClC,CAAC,SAAS,KAAK,EACf,MAAM,SAAS,MAAM,KAAK,CAAC,SAAS,CAAC,EACrC,MAAM,SAAS,OAAO,GAAG,IAAI,EAC7B,aAAa,SAAS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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAG/B"}
@@ -0,0 +1,47 @@
1
+ import globals from "globals";
2
+ export default class Option {
3
+ plugins;
4
+ parser;
5
+ files;
6
+ ruleset;
7
+ linterOptions = { noInlineConfig: true, reportUnusedDisableDirectives: "error" };
8
+ constructor(plugins, parser, files, ruleset) {
9
+ this.plugins = plugins;
10
+ this.parser = parser;
11
+ this.files = files;
12
+ this.ruleset = ruleset;
13
+ }
14
+ get configs() {
15
+ const { scope, ruleset, files, option, } = this;
16
+ if (ruleset.scope !== scope)
17
+ throw new TypeError(`Scope mismatch between option and ruleset`, { cause: { option: scope, ruleset: ruleset.scope } });
18
+ return files.length < 1
19
+ ? []
20
+ : ruleset.ruleset.map(({ id, rule }) => {
21
+ return {
22
+ name: `linted/${id}`,
23
+ files,
24
+ rules: rule,
25
+ ...option,
26
+ };
27
+ });
28
+ }
29
+ get option() {
30
+ try {
31
+ const { plugins, linterOptions, languageOptions, processor, } = this;
32
+ return {
33
+ plugins,
34
+ linterOptions,
35
+ languageOptions,
36
+ ...processor,
37
+ };
38
+ }
39
+ catch (e) {
40
+ throw new Error(`linted.factory.Option/scope:${this.scope}: option`, { cause: e });
41
+ }
42
+ }
43
+ globals(type) {
44
+ return globals[type];
45
+ }
46
+ }
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factory/options/option/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAY9B,MAAM,CAAC,OAAO,OAAgB,MAAM;IAmBhB;IACA;IACA;IACA;IAbD,aAAa,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,6BAA6B,EAAE,OAAO,EAAW,CAAC;IAS3G,YACkB,OAAwB,EACxB,MAAmC,EACnC,KAAe,EACf,OAAgB;QAHhB,YAAO,GAAP,OAAO,CAAiB;QACxB,WAAM,GAAN,MAAM,CAA6B;QACnC,UAAK,GAAL,KAAK,CAAU;QACf,YAAO,GAAP,OAAO,CAAS;IAC/B,CAAC;IAEJ,IAAW,OAAO;QAChB,MAAM,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EACL,MAAM,GACP,GAAG,IAAI,CAAC;QAET,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK;YACzB,MAAM,IAAI,SAAS,CAAC,2CAA2C,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEzH,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC;YACrB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;gBACrC,OAAO;oBACL,IAAI,EAAE,UAAU,EAAE,EAAE;oBACpB,KAAK;oBACL,KAAK,EAAE,IAAI;oBACX,GAAG,MAAM;iBACV,CAAC;YACJ,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAY,MAAM;QAChB,IAAI,CAAC;YACH,MAAM,EACJ,OAAO,EACP,aAAa,EACb,eAAe,EACf,SAAS,GACV,GAAG,IAAI,CAAC;YAET,OAAO;gBACL,OAAO;gBACP,aAAa;gBACb,eAAe;gBACf,GAAG,SAAS;aAOb,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,KAAK,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAAC,CAAC;IACnG,CAAC;IAIS,OAAO,CAAC,IAAY;QAC5B,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ import type globals from "globals";
2
+ export type Globals = keyof typeof globals & ("mocha");
3
+ //# sourceMappingURL=globals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/globals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,OAAO,GAAG,CACzC,OAAO,CACV,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=globals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globals.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/globals.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ export type { Scope, Input, Output } from "../../index.js";
2
+ import type { LanguageOptions } from "./language/index.js";
3
+ import type { Linter } from "./linter.js";
4
+ import type { Plugins } from "./plugins.js";
5
+ import type { Globals } from "./globals.js";
6
+ export type { LanguageOptions, Linter, Plugins, Globals, };
7
+ export type OptionTemplate<PluginId extends string, IsEcma extends boolean, ParserOptions extends boolean | object, GlobalTypes extends Globals, Processor extends object> = {
8
+ linterOptions: Linter;
9
+ languageOptions: LanguageOptions<IsEcma, ParserOptions, GlobalTypes>;
10
+ } & (Plugins<PluginId> extends never ? object : {
11
+ plugins: Plugins<PluginId>;
12
+ }) & (Interface<Processor> extends never ? object : Interface<Processor> extends {
13
+ processor: string;
14
+ } ? Interface<Processor> : object);
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,YAAY,EACV,eAAe,EACf,MAAM,EACN,OAAO,EACP,OAAO,GACR,CAAC;AACF,MAAM,MAAM,cAAc,CACxB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,OAAO,EACtB,aAAa,SAAS,OAAO,GAAG,MAAM,EACtC,WAAW,SAAS,OAAO,EAC3B,SAAS,SAAS,MAAM,IAEtB;IACA,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;CACtE,GACC,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;CAAE,CAAC,GAC3E,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,SAAS;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type EcmaVersion = ("latest");
2
+ //# sourceMappingURL=ecma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ecma.d.ts","sourceRoot":"","sources":["../../../../../../src/factory/options/option/template/language/ecma.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,CACtB,QAAQ,CACX,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=ecma.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ecma.js","sourceRoot":"","sources":["../../../../../../src/factory/options/option/template/language/ecma.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import type { EcmaVersion } from "./ecma.js";
2
+ import type { SourceType } from "./source.js";
3
+ export type LanguageOptions<IsEcma extends boolean, ParserOptions extends object | boolean, GlobalTypes extends string> = (True<IsEcma> extends never ? object : {
4
+ ecmaVersion: EcmaVersion;
5
+ sourceType: SourceType;
6
+ }) & (literalful<GlobalTypes> extends never ? object : {
7
+ globals: Record<string, unknown>;
8
+ }) & (ParserOptions extends boolean ? True<ParserOptions> extends never ? object : {
9
+ parser: unknown;
10
+ } : ParserOptions extends object ? Interface<ParserOptions> extends never ? object : {
11
+ parser: unknown;
12
+ parserOptions: ParserOptions;
13
+ } : object);
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/factory/options/option/template/language/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,eAAe,CACzB,MAAM,SAAS,OAAO,EACtB,aAAa,SAAS,MAAM,GAAG,OAAO,EACtC,WAAW,SAAS,MAAM,IAEzB,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAE,CAAC,GAC5F,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,GACvF,CACC,aAAa,SAAS,OAAO,GACzB,IAAI,CAAC,aAAa,CAAC,SAAS,KAAK,GAC/B,MAAM,GACN;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACrB,aAAa,SAAS,MAAM,GAC1B,SAAS,CAAC,aAAa,CAAC,SAAS,KAAK,GACpC,MAAM,GACN;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,aAAa,CAAA;CAAE,GACnD,MAAM,CACb,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/factory/options/option/template/language/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type SourceType = ("module" | "script");
2
+ //# sourceMappingURL=source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../../../../src/factory/options/option/template/language/source.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,CACrB,QAAQ,GACR,QAAQ,CACX,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../../../../../../src/factory/options/option/template/language/source.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface Linter {
2
+ noInlineConfig: boolean;
3
+ reportUnusedDisableDirectives: "error" | "warn" | "off";
4
+ }
5
+ //# sourceMappingURL=linter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/linter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,6BAA6B,EACzB,OAAO,GACP,MAAM,GACN,KAAK,CACR;CACF"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=linter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linter.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/linter.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export type Plugins<PluginId extends string> = {
2
+ [P in literalful<PluginId>]: {
3
+ configs: unknown;
4
+ };
5
+ };
6
+ //# sourceMappingURL=plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/plugins.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,CAAC,QAAQ,SAAS,MAAM,IAAI;KAAG,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE;CAAE,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=plugins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/plugins.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ import Option from "./option/index.js";
2
+ import type Ts from "./ts.js";
3
+ export default class Svelte extends Option<"svelte", "svelte" | keyof Ts["option"]["plugins"], true, {
4
+ parser: unknown;
5
+ } & {
6
+ extraFileExtensions: readonly [".svelte"];
7
+ } & Ts["option"]["languageOptions"]["parserOptions"], 2, never, {
8
+ processor: "svelte/svelte";
9
+ }> {
10
+ readonly 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 parser: unknown;
20
+ readonly extraFileExtensions: readonly [".svelte"];
21
+ readonly project: "tsconfig.json";
22
+ readonly ecmaVersion: "latest";
23
+ readonly sourceType: "module";
24
+ };
25
+ };
26
+ }
27
+ //# sourceMappingURL=svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../../../src/factory/options/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC;AAE3B,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,MAAM,CACxC,QAAQ,EACR,QAAQ,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EACxC,IAAI,EACJ;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,mBAAmB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,EACtH,CAAC,EACD,KAAK,EACL;IAAE,SAAS,EAAE,eAAe,CAAA;CAAE,CAC/B;IACC,SAAgB,KAAK,YAAY;IACjC,SAAgB,SAAS;;MAA2C;IAEpE,IAAW,eAAe;;;;;;;;;;;MAezB;CACF"}
@@ -0,0 +1,21 @@
1
+ import Option from "./option/index.js";
2
+ export default class Svelte extends Option {
3
+ 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: {
12
+ parser: tsParser,
13
+ extraFileExtensions: [".svelte"],
14
+ project: "tsconfig.json",
15
+ ecmaVersion: "latest",
16
+ sourceType: "module",
17
+ },
18
+ };
19
+ }
20
+ }
21
+ //# sourceMappingURL=svelte.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svelte.js","sourceRoot":"","sources":["../../../src/factory/options/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,MAQnC;IACiB,KAAK,GAAG,QAAQ,CAAC;IACjB,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,MAAM,EAAE,QAAQ;gBAChB,mBAAmB,EAAE,CAAC,SAAS,CAAU;gBACzC,OAAO,EAAE,eAAe;gBACxB,WAAW,EAAE,QAAQ;gBACrB,UAAU,EAAE,QAAQ;aACrB;SACO,CAAC;IACb,CAAC;CACF"}
@@ -0,0 +1,19 @@
1
+ import Option from "./option/index.js";
2
+ import type Js from "./js.js";
3
+ export default class Ts extends Option<"ts", "@typescript-eslint" | keyof Js["option"]["plugins"], true, {
4
+ project: "tsconfig.json";
5
+ } & Js["option"]["languageOptions"], 1> {
6
+ readonly 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 project: "tsconfig.json";
14
+ readonly ecmaVersion: "latest";
15
+ readonly sourceType: "module";
16
+ };
17
+ };
18
+ }
19
+ //# sourceMappingURL=ts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts.d.ts","sourceRoot":"","sources":["../../../src/factory/options/ts.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC;AAE3B,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"}
@@ -0,0 +1,15 @@
1
+ import Option from "./option/index.js";
2
+ export default class Ts extends Option {
3
+ scope = "ts";
4
+ processor = {};
5
+ get languageOptions() {
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
+ };
13
+ }
14
+ }
15
+ //# sourceMappingURL=ts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts.js","sourceRoot":"","sources":["../../../src/factory/options/ts.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,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"}
@@ -0,0 +1,9 @@
1
+ import Option from "./option/index.js";
2
+ export default class Yml extends Option<"yml", "yml", false, true, 1> {
3
+ readonly scope = "yml";
4
+ readonly processor: {};
5
+ get languageOptions(): {
6
+ readonly parser: unknown;
7
+ };
8
+ }
9
+ //# sourceMappingURL=yml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yml.d.ts","sourceRoot":"","sources":["../../../src/factory/options/yml.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,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"}
@@ -0,0 +1,10 @@
1
+ import Option from "./option/index.js";
2
+ export default class Yml extends Option {
3
+ scope = "yml";
4
+ processor = {};
5
+ get languageOptions() {
6
+ const [parser] = this.parser;
7
+ return { parser };
8
+ }
9
+ }
10
+ //# sourceMappingURL=yml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yml.js","sourceRoot":"","sources":["../../../src/factory/options/yml.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,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"}
@@ -0,0 +1,10 @@
1
+ import type { Input } from "../index.js";
2
+ export type { Input };
3
+ import { Ruleset } from "./ruleset.js";
4
+ export declare class Rulesets {
5
+ private readonly input;
6
+ private readonly rulesets;
7
+ constructor(input: Input["rules"]);
8
+ ruleset(scope: string): Ruleset;
9
+ }
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/factory/rulesets/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAEhC,YAAY,EAAE,KAAK,EAAE,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,qBAAa,QAAQ;IAGP,OAAO,CAAC,QAAQ,CAAC,KAAK;IAFlC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8B;gBAE1B,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC;IAQ3C,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAMvC"}
@@ -0,0 +1,17 @@
1
+ import { Ruleset } from "./ruleset.js";
2
+ export class Rulesets {
3
+ input;
4
+ rulesets = new Map();
5
+ constructor(input) {
6
+ this.input = input;
7
+ const { rules, overrides } = this.input, scopes = Object.keys(rules);
8
+ for (const scope of scopes)
9
+ this.rulesets.set(scope, new Ruleset(scope, rules[scope], overrides[scope]));
10
+ }
11
+ ruleset(scope) {
12
+ if (!this.rulesets.has(scope))
13
+ throw new ReferenceError(`Ruleset not found for scope: ${scope}`);
14
+ return this.rulesets.get(scope);
15
+ }
16
+ }
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/factory/rulesets/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,OAAO,QAAQ;IAGU;IAFZ,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IAEvD,YAA6B,KAAqB;QAArB,UAAK,GAAL,KAAK,CAAgB;QAChD,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,EACvC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAA2B,CAAC;QAEtD,KAAK,MAAM,KAAK,IAAI,MAAM;YACxB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjF,CAAC;IAEM,OAAO,CAAC,KAAa;QAC1B,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;YAC3B,MAAM,IAAI,cAAc,CAAC,gCAAgC,KAAK,EAAE,CAAC,CAAC;QAEpE,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAY,CAAC;IAC7C,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ import type { Input } from "./index.js";
2
+ export declare class Ruleset {
3
+ readonly scope: string;
4
+ readonly ruleset: {
5
+ id: string;
6
+ rule: Input.Rule.Entry.Record;
7
+ }[];
8
+ constructor(scope: string, rules: (readonly [string, Input.Rule.Entry.Record])[], override?: Input.Rule.Entry.Record);
9
+ }
10
+ //# sourceMappingURL=ruleset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ruleset.d.ts","sourceRoot":"","sources":["../../../src/factory/rulesets/ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE/B,qBAAa,OAAO;aAIA,KAAK,EAAE,MAAM;IAH/B,SAAgB,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAA;KAAE,EAAE,CAAC;gBAGvD,KAAK,EAAE,MAAM,EAC7B,KAAK,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,EACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;CAgBrC"}
@@ -0,0 +1,20 @@
1
+ export class Ruleset {
2
+ scope;
3
+ ruleset;
4
+ constructor(scope, rules, override) {
5
+ this.scope = scope;
6
+ const map = ([id, rule]) => {
7
+ return {
8
+ id: `${scope}:${id}`,
9
+ rule,
10
+ };
11
+ };
12
+ this.ruleset = [
13
+ ...rules.map(rule => map(rule)),
14
+ ...typeof override === "undefined"
15
+ ? []
16
+ : [map([`${scope}:override`, override])],
17
+ ];
18
+ }
19
+ }
20
+ //# sourceMappingURL=ruleset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ruleset.js","sourceRoot":"","sources":["../../../src/factory/rulesets/ruleset.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,OAAO;IAIA;IAHF,OAAO,CAAkD;IAEzE,YACkB,KAAa,EAC7B,KAAqD,EACrD,QAAkC;QAFlB,UAAK,GAAL,KAAK,CAAQ;QAI7B,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,EAAE,IAAI,CAAuB,EAAE,EAAE;YAC/C,OAAO;gBACL,EAAE,EAAE,GAAG,KAAK,IAAI,EAAE,EAAE;gBACpB,IAAI;aACL,CAAC;QACJ,CAAC,CAAC;QAEF,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC/B,GAAG,OAAO,QAAQ,KAAK,WAAW;gBAChC,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;SAC3C,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,26 @@
1
+ export type { Scope } from "./scopes.js";
2
+ import type { Input } from "./input/index.js";
3
+ import type { Output } from "./output.js";
4
+ export type { Input, Output };
5
+ import { scopes } from "./scopes.js";
6
+ export default function (plugins: Input["plugins"], parsers: Input["parsers"], files: Input["files"], rules: Input["rules"]): Output;
7
+ declare namespace Core {
8
+ type Scopes = typeof scopes[number];
9
+ namespace Input {
10
+ type Parsers = Input["parsers"];
11
+ type Plugins = Input["plugins"];
12
+ type Files = Input["files"];
13
+ namespace Files {
14
+ type Base = Files["files"];
15
+ type Includes = Files["includes"];
16
+ }
17
+ type Rules = Input["rules"];
18
+ namespace Rules {
19
+ type Base = Rules["rules"];
20
+ type Overrides = Rules["overrides"];
21
+ }
22
+ }
23
+ type Output = Output[];
24
+ }
25
+ export type { Core };
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAOlC,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,EACzB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,EACzB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EACrB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,GACpB,MAAM,CAyER;AAGD,kBAAU,IAAI,CAAC;IACb,KAAY,MAAM,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3C,UAAiB,KAAK,CAAC;QACrB,KAAY,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;QACvC,KAAY,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;QACvC,KAAY,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACnC,UAAiB,KAAK,CAAC;YACrB,KAAY,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;YAClC,KAAY,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;SAC1C;QACD,KAAY,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACnC,UAAiB,KAAK,CAAC;YACrB,KAAY,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;YAClC,KAAY,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;SAC5C;KACF;IACD,KAAY,MAAM,GAAG,MAAM,EAAE,CAAC;CAC/B;AAED,YAAY,EAAE,IAAI,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,31 @@
1
+ import { scopes } from "./scopes.js";
2
+ import { Files, Rulesets, Options, } from "./factory/index.js";
3
+ export default function (plugins, parsers, files, rules) {
4
+ try {
5
+ const F = new Files(files), R = new Rulesets(rules), options = {
6
+ js: new Options
7
+ .js({ "@stylistic": plugins["@stylistic"] }, [], F.files("js"), R.ruleset("js")).configs,
8
+ ts: new Options
9
+ .ts({ "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"] }, [parsers.ts], F.files("ts"), R.ruleset("ts")).configs,
10
+ svelte: new Options
11
+ .svelte({ "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], svelte: plugins.svelte }, [parsers.svelte, parsers.ts], F.files("svelte"), R.ruleset("svelte")).configs,
12
+ mocha: new Options
13
+ .mocha({ "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], mocha: plugins.mocha }, [parsers.ts], F.files("mocha"), R.ruleset("mocha")).configs,
14
+ html: new Options
15
+ .html({ "@html-eslint": plugins["@html-eslint"] }, [parsers.html], F.files("html"), R.ruleset("html")).configs,
16
+ json: new Options
17
+ .json({ jsonc: plugins.jsonc }, [parsers.jsonc], F.files("json"), R.ruleset("json")).configs,
18
+ jsonc: new Options
19
+ .jsonc({ jsonc: plugins.jsonc }, [parsers.jsonc], F.files("jsonc"), R.ruleset("jsonc")).configs,
20
+ yml: new Options
21
+ .yml({ yml: plugins.yml }, [parsers.yml], F.files("yml"), R.ruleset("yml")).configs,
22
+ md: new Options
23
+ .md({ markdownlint: plugins.markdownlint }, [parsers.md], F.files("md"), R.ruleset("md")).configs,
24
+ };
25
+ return scopes.flatMap(scope => options[scope]);
26
+ }
27
+ catch (e) {
28
+ throw new Error(`linted-core`, { cause: e });
29
+ }
30
+ }
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EACL,KAAK,EACL,QAAQ,EACR,OAAO,GACR,MAAM,WAAW,CAAC;AAEnB,MAAM,CAAC,OAAO,WACZ,OAAyB,EACzB,OAAyB,EACzB,KAAqB,EACrB,KAAqB;IAErB,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,EAC1B,CAAC,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,EACvB,OAAO,GAAiF;YACtF,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,EACvC,EAAE,EACF,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EACb,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAChB,CAAC,OAAO;YACX,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,EAAE,YAAY,EA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C,EACf,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,EACf,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAClB,CAAC,OAAO;YACX,KAAK,EAAE,IAAI,OAAO;iBACf,KAAK,CACJ,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EACxB,CAAC,OAAO,CAAC,KAAK,CAAC,EACf,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,EAChB,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CACnB,CAAC,OAAO;YACX,GAAG,EAAE,IAAI,OAAO;iBACb,GAAG,CACF,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EACpB,CAAC,OAAO,CAAC,GAAG,CAAC,EACb,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EACd,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CACjB,CAAC,OAAO;YACX,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,EACtC,CAAC,OAAO,CAAC,EAAE,CAAC,EACZ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EACb,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAChB,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"}
@@ -0,0 +1,6 @@
1
+ import type { Scope } from "./index.js";
2
+ export interface FilesInput {
3
+ files: Record<Scope, string[]>;
4
+ includes: Partial<FilesInput["files"]>;
5
+ }
6
+ //# sourceMappingURL=files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/input/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE/B,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;CACxC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/input/files.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { Scope } from "../index.js";
2
+ export type Parsers = Scope & ("ts" | "svelte" | "html" | "jsonc" | "yml" | "md");
3
+ //# sourceMappingURL=parsers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../../../src/input/imports/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAEhC,MAAM,MAAM,OAAO,GAAG,KAAK,GACvB,CACE,IAAI,GACJ,QAAQ,GACR,MAAM,GACN,OAAO,GACP,KAAK,GACL,IAAI,CACT,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=parsers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../../src/input/imports/parsers.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type Plugins = ("@stylistic" | "@typescript-eslint" | "svelte" | "mocha" | "@html-eslint" | "jsonc" | "yml" | "markdownlint");
2
+ //# sourceMappingURL=plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../src/input/imports/plugins.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,CAClB,YAAY,GACZ,oBAAoB,GACpB,QAAQ,GACR,OAAO,GACP,cAAc,GACd,OAAO,GACP,KAAK,GACL,cAAc,CACjB,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=plugins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/input/imports/plugins.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ export type { Scope } from "../scopes.js";
2
+ import type { PluginsInput } from "./plugins.js";
3
+ import type { ParsersInput } from "./parsers.js";
4
+ import type { FilesInput } from "./files.js";
5
+ import type { RulesInput } from "./rules/index.js";
6
+ export interface Input {
7
+ plugins: PluginsInput;
8
+ parsers: ParsersInput;
9
+ files: FilesInput;
10
+ rules: RulesInput;
11
+ }
12
+ export declare namespace Input {
13
+ type Rule = RulesInput;
14
+ namespace Rule {
15
+ type Entry = RulesInput.Entry;
16
+ namespace Entry {
17
+ type Id = RulesInput.Entry.Id;
18
+ type Record = RulesInput.Entry.Record;
19
+ }
20
+ }
21
+ }
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/input/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,YAAY,CAAC;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,UAAU,CAAC;CACnB;AACD,yBAAiB,KAAK,CAAC;IACrB,KAAY,IAAI,GAAG,UAAU,CAAC;IAC9B,UAAiB,IAAI,CAAC;QACpB,KAAY,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QACrC,UAAiB,KAAK,CAAC;YACrB,KAAY,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACrC,KAAY,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC;SAC9C;KACF;CACF"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/input/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { Parsers } from "./imports/parsers.js";
2
+ export type ParsersInput = Record<Parsers, unknown>;
3
+ //# sourceMappingURL=parsers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../../src/input/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=parsers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../src/input/parsers.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { Plugins } from "./imports/plugins.js";
2
+ export type PluginsInput = Record<Plugins, {
3
+ configs: unknown;
4
+ }>;
5
+ //# sourceMappingURL=plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/input/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC"}