@eslinted/core 13.2.0 → 13.3.0-rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. package/dist/factory/factory.d.ts +61 -107
  2. package/dist/factory/factory.d.ts.map +1 -1
  3. package/dist/factory/factory.js +29 -30
  4. package/dist/factory/factory.js.map +1 -1
  5. package/dist/index.js +2 -2
  6. package/dist/index.js.map +1 -1
  7. package/dist/interface/index.d.ts +2 -2
  8. package/dist/interface/input/imports.d.ts.map +1 -0
  9. package/dist/interface/input/imports.js.map +1 -0
  10. package/dist/interface/input/index.d.ts +9 -0
  11. package/dist/interface/input/index.d.ts.map +1 -0
  12. package/dist/interface/{inputs → input}/index.js.map +1 -1
  13. package/dist/interface/{inputs/options → input/scopes}/defaults.d.ts +2 -2
  14. package/dist/interface/input/scopes/defaults.d.ts.map +1 -0
  15. package/dist/interface/input/scopes/defaults.js.map +1 -0
  16. package/dist/interface/{inputs/options/index.d.ts → input/scopes/extensions.d.ts} +1 -2
  17. package/dist/interface/input/scopes/extensions.d.ts.map +1 -0
  18. package/dist/interface/input/scopes/extensions.js +2 -0
  19. package/dist/interface/input/scopes/extensions.js.map +1 -0
  20. package/dist/interface/input/scopes/index.d.ts +3 -0
  21. package/dist/interface/input/scopes/index.d.ts.map +1 -0
  22. package/dist/interface/input/scopes/index.js.map +1 -0
  23. package/dist/interface/{outputs → output}/common/ignores.d.ts +1 -1
  24. package/dist/interface/output/common/ignores.d.ts.map +1 -0
  25. package/dist/interface/output/common/ignores.js.map +1 -0
  26. package/dist/interface/output/common/index.d.ts.map +1 -0
  27. package/dist/interface/output/common/index.js.map +1 -0
  28. package/dist/interface/{outputs → output}/common/plugins.d.ts +1 -1
  29. package/dist/interface/output/common/plugins.d.ts.map +1 -0
  30. package/dist/interface/output/common/plugins.js.map +1 -0
  31. package/dist/interface/{outputs → output}/common/settings.d.ts +1 -1
  32. package/dist/interface/output/common/settings.d.ts.map +1 -0
  33. package/dist/interface/output/common/settings.js.map +1 -0
  34. package/dist/interface/output/index.d.ts +10 -0
  35. package/dist/interface/output/index.d.ts.map +1 -0
  36. package/dist/interface/{outputs → output}/index.js.map +1 -1
  37. package/dist/interface/{outputs/scoped.d.ts → output/scope.d.ts} +3 -3
  38. package/dist/interface/output/scope.d.ts.map +1 -0
  39. package/dist/interface/output/scope.js +2 -0
  40. package/dist/interface/output/scope.js.map +1 -0
  41. package/dist/scopes/index.d.ts +1 -0
  42. package/dist/scopes/index.d.ts.map +1 -1
  43. package/dist/scopes/index.js +2 -1
  44. package/dist/scopes/index.js.map +1 -1
  45. package/dist/scopes/tree.d.ts +11 -0
  46. package/dist/scopes/tree.d.ts.map +1 -0
  47. package/dist/scopes/tree.js +11 -0
  48. package/dist/scopes/tree.js.map +1 -0
  49. package/package.json +1 -1
  50. package/src/factory/factory.ts +55 -70
  51. package/src/index.ts +2 -2
  52. package/src/interface/input/index.ts +12 -0
  53. package/src/interface/{inputs/options → input/scopes}/defaults.ts +2 -2
  54. package/src/interface/{inputs/options/index.ts → input/scopes/extensions.ts} +0 -1
  55. package/src/interface/input/scopes/index.ts +2 -0
  56. package/src/interface/{outputs → output}/common/ignores.ts +1 -1
  57. package/src/interface/{outputs → output}/common/plugins.ts +1 -1
  58. package/src/interface/{outputs → output}/common/settings.ts +1 -1
  59. package/src/interface/output/index.ts +14 -0
  60. package/src/interface/{outputs/scoped.ts → output/scope.ts} +2 -2
  61. package/src/scopes/index.ts +1 -0
  62. package/src/scopes/tree.ts +10 -0
  63. package/dist/interface/input.d.ts +0 -8
  64. package/dist/interface/input.d.ts.map +0 -1
  65. package/dist/interface/input.js +0 -2
  66. package/dist/interface/input.js.map +0 -1
  67. package/dist/interface/inputs/imports.d.ts.map +0 -1
  68. package/dist/interface/inputs/imports.js.map +0 -1
  69. package/dist/interface/inputs/index.d.ts +0 -3
  70. package/dist/interface/inputs/index.d.ts.map +0 -1
  71. package/dist/interface/inputs/options/defaults.d.ts.map +0 -1
  72. package/dist/interface/inputs/options/defaults.js.map +0 -1
  73. package/dist/interface/inputs/options/index.d.ts.map +0 -1
  74. package/dist/interface/inputs/options/index.js.map +0 -1
  75. package/dist/interface/output.d.ts +0 -10
  76. package/dist/interface/output.d.ts.map +0 -1
  77. package/dist/interface/output.js +0 -2
  78. package/dist/interface/output.js.map +0 -1
  79. package/dist/interface/outputs/common/ignores.d.ts.map +0 -1
  80. package/dist/interface/outputs/common/ignores.js.map +0 -1
  81. package/dist/interface/outputs/common/index.d.ts.map +0 -1
  82. package/dist/interface/outputs/common/index.js.map +0 -1
  83. package/dist/interface/outputs/common/plugins.d.ts.map +0 -1
  84. package/dist/interface/outputs/common/plugins.js.map +0 -1
  85. package/dist/interface/outputs/common/settings.d.ts.map +0 -1
  86. package/dist/interface/outputs/common/settings.js.map +0 -1
  87. package/dist/interface/outputs/index.d.ts +0 -3
  88. package/dist/interface/outputs/index.d.ts.map +0 -1
  89. package/dist/interface/outputs/scoped.d.ts.map +0 -1
  90. package/dist/interface/outputs/scoped.js +0 -2
  91. package/dist/interface/outputs/scoped.js.map +0 -1
  92. package/src/interface/input.ts +0 -11
  93. package/src/interface/inputs/index.ts +0 -2
  94. package/src/interface/output.ts +0 -10
  95. package/src/interface/outputs/index.ts +0 -2
  96. /package/dist/interface/{inputs → input}/imports.d.ts +0 -0
  97. /package/dist/interface/{inputs → input}/imports.js +0 -0
  98. /package/dist/interface/{inputs → input}/index.js +0 -0
  99. /package/dist/interface/{inputs/options → input/scopes}/defaults.js +0 -0
  100. /package/dist/interface/{inputs/options → input/scopes}/index.js +0 -0
  101. /package/dist/interface/{outputs → output}/common/ignores.js +0 -0
  102. /package/dist/interface/{outputs → output}/common/index.d.ts +0 -0
  103. /package/dist/interface/{outputs → output}/common/index.js +0 -0
  104. /package/dist/interface/{outputs → output}/common/plugins.js +0 -0
  105. /package/dist/interface/{outputs → output}/common/settings.js +0 -0
  106. /package/dist/interface/{outputs → output}/index.js +0 -0
  107. /package/src/interface/{inputs → input}/imports.ts +0 -0
  108. /package/src/interface/{outputs → output}/common/index.ts +0 -0
@@ -1,28 +1,30 @@
1
- import type { Scopes, Rule, Input } from "../index.js";
2
1
  import type Options from "./settings/index.js";
2
+ import type { Input } from "../interface/input/index.js";
3
3
  export declare class Factory {
4
- readonly defaults: Input["defaults"];
5
- readonly extensions: {
6
- readonly global: NonNullable<Input["extensions"]["*"]>;
7
- readonly scopes: Omit<Input["extensions"], "*">;
8
- };
9
- constructor(defaults: Input["defaults"], { "*": global, ...scopes }?: Input["extensions"]);
10
- get settings(): {
11
- readonly name: "linted/*/settings";
12
- readonly linterOptions: {
13
- readonly noInlineConfig: boolean;
14
- readonly reportUnusedDisableDirectives: "error" | "warn" | "off";
4
+ readonly common: {
5
+ readonly settings: {
6
+ readonly name: "linted/*/settings";
7
+ readonly linterOptions: {
8
+ readonly noInlineConfig: boolean;
9
+ readonly reportUnusedDisableDirectives: "error" | "warn" | "off";
10
+ };
11
+ readonly languageOptions: {
12
+ readonly sourceType: "module" | "script";
13
+ readonly ecmaVersion: "latest" | 3 | 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024;
14
+ };
15
15
  };
16
- readonly languageOptions: {
17
- readonly sourceType: "module" | "script";
18
- readonly ecmaVersion: "latest" | 3 | 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024;
16
+ readonly ignores: {
17
+ readonly name: "linted/*/ignores";
18
+ readonly ignores: readonly string[];
19
19
  };
20
20
  };
21
- get ignores(): {
22
- readonly name: "linted/*/ignores";
23
- readonly ignores: readonly string[];
21
+ readonly scopes: {
22
+ readonly files: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>;
23
+ readonly ignores: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>;
24
+ readonly rules: Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", import("../interface/shared/config/rule/index.js").NamedBag[]>>;
24
25
  };
25
- scope<S extends Scopes>(scope: S, settings: InstanceType<typeof Options[S]>): readonly [
26
+ constructor({ settings: defaultSettings, files: defaultFiles, ignores: defaultIgnores, rules: defaultRules, }: Input["defaults"], { "*": commonExtension, ...scopeExtensions }?: Input["extensions"]);
27
+ scope<S extends keyof typeof Options>(scope: S, settings: InstanceType<typeof Options[S]>): readonly [
26
28
  ] | ({
27
29
  readonly languageOptions: {
28
30
  readonly parser: unknown;
@@ -32,32 +34,20 @@ export declare class Factory {
32
34
  readonly ecmaVersion: 2023;
33
35
  };
34
36
  };
35
- readonly name: `linted/svelte:${string}` | `linted/mocha:${string}` | `linted/jsonc:${string}` | `linted/yml:${string}` | `linted/ts:${string}` | `linted/html:${string}` | `linted/js:${string}` | `linted/json:${string}`;
36
- readonly files: readonly [
37
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
38
- ...string[]
39
- ];
40
- readonly ignores: readonly [
41
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
42
- ...string[]
43
- ];
44
- readonly rules: Readonly<Record<string, Rule.State | readonly [
45
- Rule.State,
37
+ readonly name: `linted/${S}:${string}`;
38
+ readonly files: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
39
+ readonly ignores: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
40
+ readonly rules: Readonly<Record<string, import("../interface/shared/config/rule/index.js").State | readonly [
41
+ import("../interface/shared/config/rule/index.js").State,
46
42
  ...unknown[]
47
43
  ]>>;
48
44
  } | {
49
45
  readonly languageOptions: object;
50
- readonly name: `linted/svelte:${string}` | `linted/mocha:${string}` | `linted/jsonc:${string}` | `linted/yml:${string}` | `linted/ts:${string}` | `linted/html:${string}` | `linted/js:${string}` | `linted/json:${string}`;
51
- readonly files: readonly [
52
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
53
- ...string[]
54
- ];
55
- readonly ignores: readonly [
56
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
57
- ...string[]
58
- ];
59
- readonly rules: Readonly<Record<string, Rule.State | readonly [
60
- Rule.State,
46
+ readonly name: `linted/${S}:${string}`;
47
+ readonly files: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
48
+ readonly ignores: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
49
+ readonly rules: Readonly<Record<string, import("../interface/shared/config/rule/index.js").State | readonly [
50
+ import("../interface/shared/config/rule/index.js").State,
61
51
  ...unknown[]
62
52
  ]>>;
63
53
  } | {
@@ -75,17 +65,11 @@ export declare class Factory {
75
65
  };
76
66
  };
77
67
  readonly processor: "svelte/svelte";
78
- readonly name: `linted/svelte:${string}` | `linted/mocha:${string}` | `linted/jsonc:${string}` | `linted/yml:${string}` | `linted/ts:${string}` | `linted/html:${string}` | `linted/js:${string}` | `linted/json:${string}`;
79
- readonly files: readonly [
80
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
81
- ...string[]
82
- ];
83
- readonly ignores: readonly [
84
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
85
- ...string[]
86
- ];
87
- readonly rules: Readonly<Record<string, Rule.State | readonly [
88
- Rule.State,
68
+ readonly name: `linted/${S}:${string}`;
69
+ readonly files: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
70
+ readonly ignores: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
71
+ readonly rules: Readonly<Record<string, import("../interface/shared/config/rule/index.js").State | readonly [
72
+ import("../interface/shared/config/rule/index.js").State,
89
73
  ...unknown[]
90
74
  ]>>;
91
75
  } | {
@@ -97,77 +81,47 @@ export declare class Factory {
97
81
  readonly ecmaVersion: 2023;
98
82
  };
99
83
  };
100
- readonly name: `linted/svelte:${string}` | `linted/mocha:${string}` | `linted/jsonc:${string}` | `linted/yml:${string}` | `linted/ts:${string}` | `linted/html:${string}` | `linted/js:${string}` | `linted/json:${string}`;
101
- readonly files: readonly [
102
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
103
- ...string[]
104
- ];
105
- readonly ignores: readonly [
106
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
107
- ...string[]
108
- ];
109
- readonly rules: Readonly<Record<string, Rule.State | readonly [
110
- Rule.State,
84
+ readonly name: `linted/${S}:${string}`;
85
+ readonly files: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
86
+ readonly ignores: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
87
+ readonly rules: Readonly<Record<string, import("../interface/shared/config/rule/index.js").State | readonly [
88
+ import("../interface/shared/config/rule/index.js").State,
111
89
  ...unknown[]
112
90
  ]>>;
113
91
  } | {
114
92
  readonly languageOptions: object;
115
- readonly name: `linted/svelte:${string}` | `linted/mocha:${string}` | `linted/jsonc:${string}` | `linted/yml:${string}` | `linted/ts:${string}` | `linted/html:${string}` | `linted/js:${string}` | `linted/json:${string}`;
116
- readonly files: readonly [
117
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
118
- ...string[]
119
- ];
120
- readonly ignores: readonly [
121
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
122
- ...string[]
123
- ];
124
- readonly rules: Readonly<Record<string, Rule.State | readonly [
125
- Rule.State,
93
+ readonly name: `linted/${S}:${string}`;
94
+ readonly files: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
95
+ readonly ignores: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
96
+ readonly rules: Readonly<Record<string, import("../interface/shared/config/rule/index.js").State | readonly [
97
+ import("../interface/shared/config/rule/index.js").State,
126
98
  ...unknown[]
127
99
  ]>>;
128
100
  } | {
129
101
  readonly languageOptions: object;
130
- readonly name: `linted/svelte:${string}` | `linted/mocha:${string}` | `linted/jsonc:${string}` | `linted/yml:${string}` | `linted/ts:${string}` | `linted/html:${string}` | `linted/js:${string}` | `linted/json:${string}`;
131
- readonly files: readonly [
132
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
133
- ...string[]
134
- ];
135
- readonly ignores: readonly [
136
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
137
- ...string[]
138
- ];
139
- readonly rules: Readonly<Record<string, Rule.State | readonly [
140
- Rule.State,
102
+ readonly name: `linted/${S}:${string}`;
103
+ readonly files: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
104
+ readonly ignores: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
105
+ readonly rules: Readonly<Record<string, import("../interface/shared/config/rule/index.js").State | readonly [
106
+ import("../interface/shared/config/rule/index.js").State,
141
107
  ...unknown[]
142
108
  ]>>;
143
109
  } | {
144
110
  readonly languageOptions: object;
145
- readonly name: `linted/svelte:${string}` | `linted/mocha:${string}` | `linted/jsonc:${string}` | `linted/yml:${string}` | `linted/ts:${string}` | `linted/html:${string}` | `linted/js:${string}` | `linted/json:${string}`;
146
- readonly files: readonly [
147
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
148
- ...string[]
149
- ];
150
- readonly ignores: readonly [
151
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
152
- ...string[]
153
- ];
154
- readonly rules: Readonly<Record<string, Rule.State | readonly [
155
- Rule.State,
111
+ readonly name: `linted/${S}:${string}`;
112
+ readonly files: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
113
+ readonly ignores: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
114
+ readonly rules: Readonly<Record<string, import("../interface/shared/config/rule/index.js").State | readonly [
115
+ import("../interface/shared/config/rule/index.js").State,
156
116
  ...unknown[]
157
117
  ]>>;
158
118
  } | {
159
119
  readonly languageOptions: object;
160
- readonly name: `linted/svelte:${string}` | `linted/mocha:${string}` | `linted/jsonc:${string}` | `linted/yml:${string}` | `linted/ts:${string}` | `linted/html:${string}` | `linted/js:${string}` | `linted/json:${string}`;
161
- readonly files: readonly [
162
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
163
- ...string[]
164
- ];
165
- readonly ignores: readonly [
166
- ...Readonly<Record<"svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json" | "*", readonly string[]>>[S],
167
- ...string[]
168
- ];
169
- readonly rules: Readonly<Record<string, Rule.State | readonly [
170
- Rule.State,
120
+ readonly name: `linted/${S}:${string}`;
121
+ readonly files: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
122
+ readonly ignores: Readonly<Record<"*" | "svelte" | "mocha" | "jsonc" | "yml" | "ts" | "html" | "js" | "json", string[]>>[S];
123
+ readonly rules: Readonly<Record<string, import("../interface/shared/config/rule/index.js").State | readonly [
124
+ import("../interface/shared/config/rule/index.js").State,
171
125
  ...unknown[]
172
126
  ]>>;
173
127
  })[];
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/factory/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AAEtC,qBAAa,OAAO;aAOA,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC;IAN7C,SAAgB,UAAU,EAAE;QAC1B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACvD,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC,CAAC;KACjD,CAAC;gBAGgB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,EAC3C,EAAE,GAAG,EAAE,MAAW,EAAE,GAAG,MAAM,EAAE,GAAE,KAAK,CAAC,YAAY,CAAe;IAKpE,IAAW,QAAQ;;;;;;;;;;MAkBlB;IAED,IAAW,OAAO;;;MAkBjB;IAEM,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCnF"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/factory/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,qBAAa,OAAO;IAClB,SAAgB,MAAM;;;;;;;;;;;;;;;;MAAC;IACvB,SAAgB,MAAM;;;;MAAC;gBAGrB,EACE,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,YAAY,GACpB,EAAE,KAAK,CAAC,UAAU,CAAC,EACpB,EAAE,GAAG,EAAE,eAAoB,EAAE,GAAG,eAAe,EAAE,GAAE,KAAK,CAAC,YAAY,CAAe;IAgD/E,KAAK,CAAC,CAAC,SAAS,MAAM,OAAO,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBjG"}
@@ -1,38 +1,37 @@
1
1
  export class Factory {
2
- defaults;
3
- extensions;
4
- constructor(defaults, { "*": global = {}, ...scopes } = {}) {
5
- this.defaults = defaults;
6
- this.extensions = { global, scopes };
7
- }
8
- get settings() {
9
- const { defaults: { settings }, extensions: { global: { noInlineConfig = settings.noInlineConfig, reportUnusedDisableDirectives = settings.reportUnusedDisableDirectives, sourceType = settings.sourceType, ecmaVersion = settings.ecmaVersion, }, }, } = this;
10
- return {
11
- name: "linted/*/settings",
12
- linterOptions: { noInlineConfig, reportUnusedDisableDirectives },
13
- languageOptions: { sourceType, ecmaVersion },
2
+ common;
3
+ scopes;
4
+ constructor({ settings: defaultSettings, files: defaultFiles, ignores: defaultIgnores, rules: defaultRules, }, { "*": commonExtension = {}, ...scopeExtensions } = {}) {
5
+ const { noInlineConfig = defaultSettings.noInlineConfig, reportUnusedDisableDirectives = defaultSettings.reportUnusedDisableDirectives, sourceType = defaultSettings.sourceType, ecmaVersion = defaultSettings.ecmaVersion, ignores = [], override = false, } = commonExtension;
6
+ this.common = {
7
+ settings: {
8
+ name: "linted/*/settings",
9
+ linterOptions: { noInlineConfig, reportUnusedDisableDirectives },
10
+ languageOptions: { sourceType, ecmaVersion },
11
+ },
12
+ ignores: {
13
+ name: "linted/*/ignores",
14
+ ignores: [
15
+ ...override ? [] : defaultIgnores["*"],
16
+ ...ignores,
17
+ ],
18
+ },
14
19
  };
15
- }
16
- get ignores() {
17
- const { defaults: { ignores: { "*": defaults } }, extensions: { global: { ignores = [], override = false, }, }, } = this;
18
- return {
19
- name: "linted/*/ignores",
20
- ignores: [
21
- ...override ? [] : defaults,
22
- ...ignores,
23
- ],
20
+ this.scopes = {
21
+ files: defaultFiles,
22
+ ignores: defaultIgnores,
23
+ rules: defaultRules,
24
24
  };
25
+ for (const s in scopeExtensions) {
26
+ const { [s]: { files: moreFiles = [], ignores: moreIgnores = [], rules: moreRules = null, } = {}, } = scopeExtensions;
27
+ this.scopes.files[s].push(...moreFiles);
28
+ this.scopes.ignores[s].push(...moreIgnores);
29
+ if (moreRules !== null)
30
+ this.scopes.rules[s].push([`${s}:override`, moreRules]);
31
+ }
25
32
  }
26
33
  scope(scope, settings) {
27
- function Ruleset(scope, defaults, override) {
28
- return [
29
- ...defaults.map(([id, rules]) => ({ id: `${scope}:${id}`, rules })),
30
- ...typeof override === "undefined"
31
- ? []
32
- : [{ id: `${scope}:override`, rules: override }],
33
- ];
34
- }
35
- const { defaults: { files: { [scope]: defaultFiles }, ignores: { [scope]: defaultIgnores }, rules: { [scope]: defaultRules }, }, extensions: { scopes: { [scope]: scopeExtension = {} } }, } = this, { files: extendFiles = [], ignores: extendIgnores = [], rules: extendRules, } = scopeExtension, files = [...defaultFiles, ...extendFiles], ignores = [...defaultIgnores, ...extendIgnores], ruleset = Ruleset(scope, defaultRules, extendRules);
34
+ const { files: { [scope]: files, }, ignores: { [scope]: ignores }, rules: { [scope]: rules }, } = this.scopes, ruleset = rules.map(([id, rules]) => ({ id: `${scope}:${id}`, rules }));
36
35
  return files.length < 1
37
36
  ? []
38
37
  : ruleset.map(({ id, rules }) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src/factory/factory.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,OAAO;IAOA;IANF,UAAU,CAGxB;IAEF,YACkB,QAA2B,EAC3C,EAAE,GAAG,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,MAAM,KAA0B,EAAW;QADlD,aAAQ,GAAR,QAAQ,CAAmB;QAG3C,IAAI,CAAC,UAAU,GAAG,EAAE,MAAM,EAAE,MAAM,EAAW,CAAC;IAChD,CAAC;IAED,IAAW,QAAQ;QACjB,MAAM,EACJ,QAAQ,EAAE,EAAE,QAAQ,EAAE,EACtB,UAAU,EAAE,EACV,MAAM,EAAE,EACN,cAAc,GAAG,QAAQ,CAAC,cAAc,EACxC,6BAA6B,GAAG,QAAQ,CAAC,6BAA6B,EACtE,UAAU,GAAG,QAAQ,CAAC,UAAU,EAChC,WAAW,GAAG,QAAQ,CAAC,WAAW,GACnC,GACF,GACF,GAAG,IAAI,CAAC;QAET,OAAO;YACL,IAAI,EAAE,mBAAmB;YACzB,aAAa,EAAE,EAAE,cAAc,EAAE,6BAA6B,EAAW;YACzE,eAAe,EAAE,EAAE,UAAU,EAAE,WAAW,EAAW;SAC7C,CAAC;IACb,CAAC;IAED,IAAW,OAAO;QAChB,MAAM,EACJ,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EACxC,UAAU,EAAE,EACV,MAAM,EAAE,EACN,OAAO,GAAG,EAAW,EACrB,QAAQ,GAAG,KAAK,GACjB,GACF,GACF,GAAG,IAAI,CAAC;QAET,OAAO;YACL,IAAI,E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K,CAAC,MAAM,GAAG,CAAC;YACrB,CAAC,CAAC,EAAW;YACb,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBAChC,IAAI,EAAE,UAAU,EAAE,EAAE;gBACpB,KAAK;gBACL,OAAO;gBACP,KAAK;gBACL,GAAG,QAAQ,CAAC,MAAM;aACT,CAAA,CAAC,CAAC;IACjB,CAAC;CACF"}
package/dist/index.js CHANGED
@@ -14,8 +14,8 @@ export default function ({ imports: { plugins, parsers }, defaults, extensions,
14
14
  };
15
15
  return [
16
16
  { name: `linted/*/plugins`, plugins },
17
- factory.settings,
18
- factory.ignores,
17
+ factory.common.settings,
18
+ factory.common.ignores,
19
19
  ...scopes.flatMap(scope => factory.scope(scope, options[scope])),
20
20
  ];
21
21
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAI7C,MAAM,CAAC,OAAO,WAAW,EACvB,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAC7B,QAAQ,EACR,UAAU,GACJ;IACN,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,EACjD,OAAO,GAA+E;YACpF,EAAE,EAAE,IAAI,OAAO,CAAC,EAAE,CAAC,EAAW,CAAC;YAC/B,EAAE,EAAE,IAAI,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAU,CAAC;YACzC,MAAM,EAAE,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAU,CAAC;YACjE,KAAK,EAAE,IAAI,OAAO,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,CAAC,EAAW,CAAC;YAC/B,EAAE,EAAE,IAAI,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAU,CAAC;YACzC,MAAM,EAAE,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAU,CAAC;YACjE,KAAK,EAAE,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAU,CAAC;YAC/C,IAAI,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAU,CAAC;YAC/C,IAAI,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,CAAU,CAAC;YAChD,KAAK,EAAE,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,CAAU,CAAC;YAClD,GAAG,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAU,CAAC;SACpC,CAAC;QAEX,OAAO;YACL,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAW;YAC9C,OAAO,CAAC,MAAM,CAAC,QAAQ;YACvB,OAAO,CAAC,MAAM,CAAC,OAAO;YACtB,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;SACxD,CAAC;IACb,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
@@ -1,4 +1,4 @@
1
- export type * from "./input.js";
2
- export type * from "./output.js";
1
+ export type * from "./input/index.js";
2
+ export type * from "./output/index.js";
3
3
  export type * from "./shared/index.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../../../src/interface/input/imports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,WAAW,OAAO,CACtB,OAAO,SAAS,MAAM,EACtB,OAAO,SAAS,MAAM;IAEtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAC/B,OAAO,EACP,OAAO,CACR,CAAC,CAAC;CACJ"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imports.js","sourceRoot":"","sources":["../../../src/interface/input/imports.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import type { Imports } from "./imports.js";
2
+ import type { Defaults, Extensions } from "./scopes/index.js";
3
+ import type { Plugins, Parsers, Scopes } from "../../scopes/index.js";
4
+ export interface Input {
5
+ readonly imports: Imports<Plugins, Parsers>;
6
+ readonly defaults: Defaults<Scopes>;
7
+ readonly extensions: Extensions<Scopes>;
8
+ }
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/input/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE7D,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,OAAO,EAAE,OAAO,CACvB,OAAO,EACP,OAAO,CACR,CAAC;IACF,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;CACzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interface/inputs/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interface/input/index.ts"],"names":[],"mappings":""}
@@ -1,8 +1,8 @@
1
1
  import type { Config, Rule } from "../../shared/index.js";
2
2
  export interface Defaults<Scopes extends string> {
3
3
  readonly settings: Config["linterOptions"] & Config["languageOptions"];
4
- readonly files: Readonly<Record<"*" | Scopes, readonly string[]>>;
4
+ readonly files: Readonly<Record<"*" | Scopes, string[]>>;
5
5
  readonly ignores: Defaults<Scopes>["files"];
6
- readonly rules: Readonly<Record<Scopes, readonly Rule.NamedBag[]>>;
6
+ readonly rules: Readonly<Record<Scopes, Rule.NamedBag[]>>;
7
7
  }
8
8
  //# sourceMappingURL=defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/scopes/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,WAAW,QAAQ,CAAC,MAAM,SAAS,MAAM;IAC7C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACvE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IACzD,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;CAC3D"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../../src/interface/input/scopes/defaults.ts"],"names":[],"mappings":""}
@@ -1,5 +1,4 @@
1
1
  import type { Defaults } from "./defaults.js";
2
- export type * from "./defaults.js";
3
2
  export type Extensions<Scopes extends string> = ({
4
3
  readonly "*"?: Partial<Defaults<Scopes>["settings"]> & {
5
4
  readonly override?: boolean;
@@ -10,4 +9,4 @@ export type Extensions<Scopes extends string> = ({
10
9
  readonly ignores?: Defaults<Scopes>["ignores"][Scopes];
11
10
  readonly rules?: Defaults<Scopes>["rules"][Scopes][number][1];
12
11
  }>>);
13
- //# sourceMappingURL=index.d.ts.map
12
+ //# sourceMappingURL=extensions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/scopes/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,UAAU,CAAC,MAAM,SAAS,MAAM,IAAI,CAC5C;IACA,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC,GAAG;QACrD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC;KACrD,CAAC;CACH,GACC,OAAO,CAAC,MAAM,CACd,MAAM,EACN;IACE,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;IACnD,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IACvD,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/D,CACF,CAAC,CACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=extensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extensions.js","sourceRoot":"","sources":["../../../../src/interface/input/scopes/extensions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export type * from "./defaults.js";
2
+ export type * from "./extensions.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/scopes/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interface/input/scopes/index.ts"],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import type { PartialConfig } from "../../shared/index.js";
2
- export type Ignores = PartialConfig<{
2
+ export type CommonIgnores = PartialConfig<{
3
3
  readonly name: "linted/*/ignores";
4
4
  }, "ignores">;
5
5
  //# sourceMappingURL=ignores.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignores.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/common/ignores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,aAAa,CACvC;IAAE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,EACrC,SAAS,CACV,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignores.js","sourceRoot":"","sources":["../../../../src/interface/output/common/ignores.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/common/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interface/output/common/index.ts"],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import type { PartialConfig } from "../../shared/index.js";
2
- export type Plugins<Plugins extends string> = PartialConfig<{
2
+ export type CommonPlugins<Plugins extends string> = PartialConfig<{
3
3
  readonly name: `linted/*/plugins`;
4
4
  }, "plugins", Plugins>;
5
5
  //# sourceMappingURL=plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/common/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,aAAa,CAAC,OAAO,SAAS,MAAM,IAAI,aAAa,CAC/D;IAAE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,EACrC,SAAS,EACT,OAAO,CACR,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../../src/interface/output/common/plugins.ts"],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import type { PartialConfig } from "../../shared/index.js";
2
- export type Settings = PartialConfig<{
2
+ export type CommonSettings = PartialConfig<{
3
3
  readonly name: `linted/*/settings`;
4
4
  }, "linterOptions" | "languageOptions">;
5
5
  //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/common/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,aAAa,CACxC;IAAE,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAA;CAAE,EACpC,eAAe,GACf,iBAAiB,CACpB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../src/interface/output/common/settings.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import type { CommonPlugins, CommonSettings, CommonIgnores } from "./common/index.js";
2
+ import type { Scope } from "./scope.js";
3
+ import type { Plugins, Scopes } from "../../scopes/index.js";
4
+ export type Output = readonly [
5
+ CommonPlugins<Plugins>,
6
+ CommonSettings,
7
+ CommonIgnores,
8
+ ...readonly Scope<Scopes>[]
9
+ ];
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/output/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,MAAM,GAAG,SAAS;IAC5B,aAAa,CAAC,OAAO,CAAC;IACtB,cAAc;IACd,aAAa;IACb,GAAG,SAAS,KAAK,CAAC,MAAM,CAAC,EAAE;CAC5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interface/outputs/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interface/output/index.ts"],"names":[],"mappings":""}
@@ -1,6 +1,6 @@
1
- import type { Config } from "../index.js";
2
- export type Scoped<Scopes extends string> = {
1
+ import type { Config } from "../shared/index.js";
2
+ export type Scope<Scopes extends string> = {
3
3
  readonly name: `linted/${Scopes}:${string}`;
4
4
  readonly languageOptions: Omit<Config["languageOptions"], "sourceType" | "ecmaVersion">;
5
5
  } & Pick<Config, "files" | "ignores" | "rules" | "processor" | "language" | "settings">;
6
- //# sourceMappingURL=scoped.d.ts.map
6
+ //# sourceMappingURL=scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../../src/interface/output/scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,MAAM,KAAK,CAAC,MAAM,SAAS,MAAM,IAAI;IACzC,QAAQ,CAAC,IAAI,EAAE,UAAU,MAAM,IAAI,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,YAAY,GAAG,aAAa,CAAC,CAAC;CACzF,GAAG,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.js","sourceRoot":"","sources":["../../../src/interface/output/scope.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  export type * from "./imports/index.js";
2
+ export * from "./tree.js";
2
3
  export type Scopes = typeof scopes[number];
3
4
  export declare const scopes: readonly [
4
5
  "js",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAC;AAC/B,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AAC3C,eAAO,MAAM,MAAM,0EAST,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AAC3C,eAAO,MAAM,MAAM,0EAST,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from "./tree.js";
1
2
  export const scopes = [
2
3
  "js",
3
4
  "ts",
@@ -8,4 +9,4 @@ export const scopes = [
8
9
  "jsonc",
9
10
  "yml",
10
11
  ];
11
- //# sourceMappingURL=index.js.map
12
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;CACG,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AAEvB,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;CACG,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const tree: {
2
+ readonly js: readonly [];
3
+ readonly ts: readonly ["js"];
4
+ readonly svelte: readonly ["ts"];
5
+ readonly mocha: readonly ["ts"];
6
+ readonly html: readonly [];
7
+ readonly json: readonly [];
8
+ readonly jsonc: readonly ["json"];
9
+ readonly yml: readonly [];
10
+ };
11
+ //# sourceMappingURL=tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/scopes/tree.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;CASP,CAAC"}
@@ -0,0 +1,11 @@
1
+ export const tree = {
2
+ js: [],
3
+ ts: ["js"],
4
+ svelte: ["ts"],
5
+ mocha: ["ts"],
6
+ html: [],
7
+ json: [],
8
+ jsonc: ["json"],
9
+ yml: [],
10
+ };
11
+ //# sourceMappingURL=tree.js.map