@eslinted/core 13.2.0 → 13.3.0-rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. package/dist/factory/factory.d.ts +62 -108
  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/factory/index.d.ts +1 -2
  6. package/dist/factory/index.d.ts.map +1 -1
  7. package/dist/factory/index.js +1 -2
  8. package/dist/factory/index.js.map +1 -1
  9. package/dist/factory/settings/index.d.ts +1 -2
  10. package/dist/factory/settings/index.d.ts.map +1 -1
  11. package/dist/factory/settings/index.js +1 -1
  12. package/dist/factory/settings/index.js.map +1 -1
  13. package/dist/index.js +11 -11
  14. package/dist/index.js.map +1 -1
  15. package/dist/interface/index.d.ts +2 -2
  16. package/dist/interface/input/imports.d.ts.map +1 -0
  17. package/dist/interface/input/imports.js.map +1 -0
  18. package/dist/interface/input/index.d.ts +9 -0
  19. package/dist/interface/input/index.d.ts.map +1 -0
  20. package/dist/interface/{inputs → input}/index.js.map +1 -1
  21. package/dist/interface/{inputs/options → input/scopes}/defaults.d.ts +2 -2
  22. package/dist/interface/input/scopes/defaults.d.ts.map +1 -0
  23. package/dist/interface/input/scopes/defaults.js.map +1 -0
  24. package/dist/interface/{inputs/options/index.d.ts → input/scopes/extensions.d.ts} +1 -2
  25. package/dist/interface/input/scopes/extensions.d.ts.map +1 -0
  26. package/dist/interface/input/scopes/extensions.js +2 -0
  27. package/dist/interface/input/scopes/extensions.js.map +1 -0
  28. package/dist/interface/input/scopes/index.d.ts +3 -0
  29. package/dist/interface/input/scopes/index.d.ts.map +1 -0
  30. package/dist/interface/input/scopes/index.js.map +1 -0
  31. package/dist/interface/{outputs → output}/common/ignores.d.ts +1 -1
  32. package/dist/interface/output/common/ignores.d.ts.map +1 -0
  33. package/dist/interface/output/common/ignores.js.map +1 -0
  34. package/dist/interface/output/common/index.d.ts.map +1 -0
  35. package/dist/interface/output/common/index.js.map +1 -0
  36. package/dist/interface/{outputs → output}/common/plugins.d.ts +1 -1
  37. package/dist/interface/output/common/plugins.d.ts.map +1 -0
  38. package/dist/interface/output/common/plugins.js.map +1 -0
  39. package/dist/interface/{outputs → output}/common/settings.d.ts +1 -1
  40. package/dist/interface/output/common/settings.d.ts.map +1 -0
  41. package/dist/interface/output/common/settings.js.map +1 -0
  42. package/dist/interface/output/index.d.ts +10 -0
  43. package/dist/interface/output/index.d.ts.map +1 -0
  44. package/dist/interface/{outputs → output}/index.js.map +1 -1
  45. package/dist/interface/{outputs/scoped.d.ts → output/scope.d.ts} +3 -3
  46. package/dist/interface/output/scope.d.ts.map +1 -0
  47. package/dist/interface/output/scope.js +2 -0
  48. package/dist/interface/output/scope.js.map +1 -0
  49. package/dist/scopes/index.d.ts +1 -0
  50. package/dist/scopes/index.d.ts.map +1 -1
  51. package/dist/scopes/index.js +2 -1
  52. package/dist/scopes/index.js.map +1 -1
  53. package/dist/scopes/tree.d.ts +11 -0
  54. package/dist/scopes/tree.d.ts.map +1 -0
  55. package/dist/scopes/tree.js +11 -0
  56. package/dist/scopes/tree.js.map +1 -0
  57. package/package.json +1 -1
  58. package/src/factory/factory.ts +56 -71
  59. package/src/factory/index.ts +1 -3
  60. package/src/factory/settings/index.ts +1 -1
  61. package/src/index.ts +12 -12
  62. package/src/interface/input/index.ts +12 -0
  63. package/src/interface/{inputs/options → input/scopes}/defaults.ts +2 -2
  64. package/src/interface/{inputs/options/index.ts → input/scopes/extensions.ts} +0 -1
  65. package/src/interface/input/scopes/index.ts +2 -0
  66. package/src/interface/{outputs → output}/common/ignores.ts +1 -1
  67. package/src/interface/{outputs → output}/common/plugins.ts +1 -1
  68. package/src/interface/{outputs → output}/common/settings.ts +1 -1
  69. package/src/interface/output/index.ts +14 -0
  70. package/src/interface/{outputs/scoped.ts → output/scope.ts} +2 -2
  71. package/src/scopes/index.ts +1 -0
  72. package/src/scopes/tree.ts +10 -0
  73. package/dist/interface/input.d.ts +0 -8
  74. package/dist/interface/input.d.ts.map +0 -1
  75. package/dist/interface/input.js +0 -2
  76. package/dist/interface/input.js.map +0 -1
  77. package/dist/interface/inputs/imports.d.ts.map +0 -1
  78. package/dist/interface/inputs/imports.js.map +0 -1
  79. package/dist/interface/inputs/index.d.ts +0 -3
  80. package/dist/interface/inputs/index.d.ts.map +0 -1
  81. package/dist/interface/inputs/options/defaults.d.ts.map +0 -1
  82. package/dist/interface/inputs/options/defaults.js.map +0 -1
  83. package/dist/interface/inputs/options/index.d.ts.map +0 -1
  84. package/dist/interface/inputs/options/index.js.map +0 -1
  85. package/dist/interface/output.d.ts +0 -10
  86. package/dist/interface/output.d.ts.map +0 -1
  87. package/dist/interface/output.js +0 -2
  88. package/dist/interface/output.js.map +0 -1
  89. package/dist/interface/outputs/common/ignores.d.ts.map +0 -1
  90. package/dist/interface/outputs/common/ignores.js.map +0 -1
  91. package/dist/interface/outputs/common/index.d.ts.map +0 -1
  92. package/dist/interface/outputs/common/index.js.map +0 -1
  93. package/dist/interface/outputs/common/plugins.d.ts.map +0 -1
  94. package/dist/interface/outputs/common/plugins.js.map +0 -1
  95. package/dist/interface/outputs/common/settings.d.ts.map +0 -1
  96. package/dist/interface/outputs/common/settings.js.map +0 -1
  97. package/dist/interface/outputs/index.d.ts +0 -3
  98. package/dist/interface/outputs/index.d.ts.map +0 -1
  99. package/dist/interface/outputs/scoped.d.ts.map +0 -1
  100. package/dist/interface/outputs/scoped.js +0 -2
  101. package/dist/interface/outputs/scoped.js.map +0 -1
  102. package/src/interface/input.ts +0 -11
  103. package/src/interface/inputs/index.ts +0 -2
  104. package/src/interface/output.ts +0 -10
  105. package/src/interface/outputs/index.ts +0 -2
  106. /package/dist/interface/{inputs → input}/imports.d.ts +0 -0
  107. /package/dist/interface/{inputs → input}/imports.js +0 -0
  108. /package/dist/interface/{inputs → input}/index.js +0 -0
  109. /package/dist/interface/{inputs/options → input/scopes}/defaults.js +0 -0
  110. /package/dist/interface/{inputs/options → input/scopes}/index.js +0 -0
  111. /package/dist/interface/{outputs → output}/common/ignores.js +0 -0
  112. /package/dist/interface/{outputs → output}/common/index.d.ts +0 -0
  113. /package/dist/interface/{outputs → output}/common/index.js +0 -0
  114. /package/dist/interface/{outputs → output}/common/plugins.js +0 -0
  115. /package/dist/interface/{outputs → output}/common/settings.js +0 -0
  116. /package/dist/interface/{outputs → output}/index.js +0 -0
  117. /package/src/interface/{inputs → input}/imports.ts +0 -0
  118. /package/src/interface/{outputs → output}/common/index.ts +0 -0
@@ -1,28 +1,30 @@
1
- import type { Scopes, Rule, Input } from "../index.js";
2
- import type Options from "./settings/index.js";
1
+ import type { ScopeSettings } 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 ScopeSettings>(scope: S, settings: InstanceType<typeof ScopeSettings[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,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,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,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB7G"}
@@ -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,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AAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,EAC7B,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,GAC1B,GAAG,IAAI,CAAC,MAAM,EACf,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,IAAI,EAAE,EAAE,EAAE,KAAK,EAAY,CAAA,CAAC,CAAC;QAEjF,OAAO,KAAK,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"}
@@ -1,4 +1,3 @@
1
1
  export * from "./factory.js";
2
- import Options from "./settings/index.js";
3
- export { Options };
2
+ export * from "./settings/index.js";
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -1,4 +1,3 @@
1
1
  export * from "./factory.js";
2
- import Options from "./settings/index.js";
3
- export { Options };
2
+ export * from "./settings/index.js";
4
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -7,7 +7,7 @@ import json from "./scopes/json.js";
7
7
  import jsonc from "./scopes/jsonc.js";
8
8
  import yml from "./scopes/yml.js";
9
9
  export type * from "./setting.js";
10
- declare const _default: {
10
+ export declare const ScopeSettings: {
11
11
  readonly js: typeof js;
12
12
  readonly ts: typeof ts;
13
13
  readonly svelte: typeof svelte;
@@ -17,5 +17,4 @@ declare const _default: {
17
17
  readonly jsonc: typeof jsonc;
18
18
  readonly yml: typeof yml;
19
19
  };
20
- export default _default;
21
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/factory/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,GAAG,MAAM,cAAc,CAAC;AAE/B,mBAAmB,WAAW,CAAC;;;;;;;;;;;AAC/B,wBASW"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/factory/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,GAAG,MAAM,cAAc,CAAC;AAE/B,mBAAmB,WAAW,CAAC;AAC/B,eAAO,MAAM,aAAa;;;;;;;;;CAShB,CAAC"}
@@ -6,7 +6,7 @@ import html from "./scopes/html.js";
6
6
  import json from "./scopes/json.js";
7
7
  import jsonc from "./scopes/jsonc.js";
8
8
  import yml from "./scopes/yml.js";
9
- export default {
9
+ export const ScopeSettings = {
10
10
  js,
11
11
  ts,
12
12
  svelte,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/factory/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,GAAG,MAAM,cAAc,CAAC;AAG/B,eAAe;IACb,EAAE;IACF,EAAE;IACF,MAAM;IACN,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,GAAG;CACK,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/factory/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,GAAG,MAAM,cAAc,CAAC;AAG/B,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,EAAE;IACF,EAAE;IACF,MAAM;IACN,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,GAAG;CACK,CAAC"}
package/dist/index.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import { scopes } from "./scopes/index.js";
2
- import { Factory, Options } from "./factory/index.js";
2
+ import { Factory, ScopeSettings } from "./factory/index.js";
3
3
  export default function ({ imports: { plugins, parsers }, defaults, extensions, }) {
4
4
  try {
5
5
  const factory = new Factory(defaults, extensions), options = {
6
- js: new Options.js([]),
7
- ts: new Options.ts([parsers.ts]),
8
- svelte: new Options.svelte([parsers.svelte, parsers.ts]),
9
- mocha: new Options.mocha([parsers.ts]),
10
- html: new Options.html([parsers.html]),
11
- json: new Options.json([parsers.jsonc]),
12
- jsonc: new Options.jsonc([parsers.jsonc]),
13
- yml: new Options.yml([parsers.yml]),
6
+ js: new ScopeSettings.js([]),
7
+ ts: new ScopeSettings.ts([parsers.ts]),
8
+ svelte: new ScopeSettings.svelte([parsers.svelte, parsers.ts]),
9
+ mocha: new ScopeSettings.mocha([parsers.ts]),
10
+ html: new ScopeSettings.html([parsers.html]),
11
+ json: new ScopeSettings.json([parsers.jsonc]),
12
+ jsonc: new ScopeSettings.jsonc([parsers.jsonc]),
13
+ yml: new ScopeSettings.yml([parsers.yml]),
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,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AO,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