@eslinted/core 26.0.0 → 26.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/factory.d.ts +7 -38
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +106 -95
- package/dist/factory.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/interface/configuration/defaults/index.d.ts +5 -5
- package/dist/interface/configuration/defaults/index.d.ts.map +1 -1
- package/dist/interface/configuration/extensions/index.d.ts +1 -1
- package/dist/interface/configuration/extensions/index.d.ts.map +1 -1
- package/dist/interface/configuration/index.d.ts +1 -1
- package/dist/interface/configuration/index.d.ts.map +1 -1
- package/dist/interface/imports.d.ts +3 -3
- package/dist/interface/imports.d.ts.map +1 -1
- package/dist/interface/index.d.ts +3 -3
- package/dist/interface/index.d.ts.map +1 -1
- package/dist/scope/dependencies/index.d.ts +2 -2
- package/dist/scope/dependencies/index.d.ts.map +1 -1
- package/dist/scope/dependencies/parsers.d.ts +1 -1
- package/dist/scope/dependencies/parsers.d.ts.map +1 -1
- package/dist/scope/dependencies/plugins.d.ts +1 -1
- package/dist/scope/dependencies/plugins.d.ts.map +1 -1
- package/dist/scope/index.d.ts +2 -2
- package/dist/scope/index.d.ts.map +1 -1
- package/dist/scope/index.js +1 -1
- package/dist/scope/{tree/index.d.ts → tree.d.ts} +1 -1
- package/dist/scope/tree.d.ts.map +1 -0
- package/dist/scope/{tree/index.js → tree.js} +1 -1
- package/dist/scope/tree.js.map +1 -0
- package/dist/scope/tree.spec.d.ts +2 -0
- package/dist/scope/tree.spec.d.ts.map +1 -0
- package/dist/scope/{tree/index.spec.js → tree.spec.js} +2 -2
- package/dist/scope/tree.spec.js.map +1 -0
- package/package.json +1 -1
- package/src/factory.ts +229 -198
- package/src/index.ts +8 -19
- package/src/interface/configuration/defaults/index.ts +15 -13
- package/src/interface/configuration/extensions/index.ts +2 -2
- package/src/interface/configuration/index.ts +5 -3
- package/src/interface/imports.ts +4 -4
- package/src/interface/index.ts +5 -5
- package/src/scope/dependencies/index.ts +2 -2
- package/src/scope/dependencies/parsers.ts +1 -1
- package/src/scope/dependencies/plugins.ts +1 -1
- package/src/scope/index.ts +2 -2
- package/src/scope/{tree/index.spec.ts → tree.spec.ts} +1 -1
- package/dist/scope/tree/index.d.ts.map +0 -1
- package/dist/scope/tree/index.js.map +0 -1
- package/dist/scope/tree/index.spec.d.ts +0 -2
- package/dist/scope/tree/index.spec.d.ts.map +0 -1
- package/dist/scope/tree/index.spec.js.map +0 -1
- /package/src/scope/{tree/index.ts → tree.ts} +0 -0
package/src/factory.ts
CHANGED
|
@@ -1,89 +1,58 @@
|
|
|
1
1
|
import type { Input } from "./interface";
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export default function factory<
|
|
4
4
|
Scope extends string,
|
|
5
5
|
OptionalScope extends Scope,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
constructor(
|
|
15
|
-
tree: Array<
|
|
16
|
-
readonly [
|
|
17
|
-
Scope,
|
|
18
|
-
readonly Scope[],
|
|
19
|
-
]
|
|
20
|
-
>,
|
|
21
|
-
optionalScopes: readonly Scope[],
|
|
22
|
-
{
|
|
23
|
-
plugins,
|
|
24
|
-
parsers,
|
|
25
|
-
}: Input<
|
|
26
|
-
Scope,
|
|
27
|
-
OptionalScope,
|
|
28
|
-
RequiredPlugin,
|
|
29
|
-
RequiredParser
|
|
30
|
-
>["imports"],
|
|
31
|
-
defaults: Input<
|
|
32
|
-
Scope,
|
|
33
|
-
OptionalScope,
|
|
34
|
-
RequiredPlugin,
|
|
35
|
-
RequiredParser
|
|
36
|
-
>["configuration"]["defaults"],
|
|
37
|
-
extensions: Input<
|
|
6
|
+
BundledPlugin extends string,
|
|
7
|
+
BundledParser extends Scope,
|
|
8
|
+
// Tree,
|
|
9
|
+
>(
|
|
10
|
+
scopes: readonly Scope[],
|
|
11
|
+
optionalScopes: readonly OptionalScope[],
|
|
12
|
+
tree: Array<
|
|
13
|
+
readonly [
|
|
38
14
|
Scope,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
15
|
+
readonly Scope[],
|
|
16
|
+
]
|
|
17
|
+
>,
|
|
18
|
+
{
|
|
19
|
+
plugins,
|
|
20
|
+
parsers,
|
|
21
|
+
}: {
|
|
22
|
+
plugins: Record<BundledPlugin, unknown>;
|
|
23
|
+
parsers: Record<BundledParser, unknown>;
|
|
24
|
+
},
|
|
25
|
+
defaults: Input<
|
|
26
|
+
Scope,
|
|
27
|
+
OptionalScope,
|
|
28
|
+
BundledPlugin,
|
|
29
|
+
BundledParser
|
|
30
|
+
>["configuration"]["defaults"],
|
|
31
|
+
extensions: Input<
|
|
32
|
+
Scope,
|
|
33
|
+
OptionalScope,
|
|
34
|
+
BundledPlugin,
|
|
35
|
+
BundledParser
|
|
36
|
+
>["configuration"]["extensions"] = {},
|
|
37
|
+
) {
|
|
38
|
+
for (const scope of optionalScopes)
|
|
39
|
+
if (extensions[scope] !== undefined) {
|
|
47
40
|
Object.assign(
|
|
48
41
|
plugins,
|
|
49
42
|
{
|
|
50
|
-
|
|
43
|
+
[scope]: extensions[scope].plugin,
|
|
51
44
|
},
|
|
52
45
|
);
|
|
53
46
|
Object.assign(
|
|
54
47
|
parsers,
|
|
55
48
|
{
|
|
56
|
-
|
|
49
|
+
[scope]: extensions[scope].parser,
|
|
57
50
|
},
|
|
58
51
|
);
|
|
59
52
|
}
|
|
60
53
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
: defaults.ignores["*"].concat(extensions["*"]?.ignores ?? []);
|
|
64
|
-
|
|
65
|
-
this.globalConfigs = {
|
|
66
|
-
plugins: {
|
|
67
|
-
name: "linted/*/plugins",
|
|
68
|
-
plugins,
|
|
69
|
-
},
|
|
70
|
-
ignores: {
|
|
71
|
-
name: "linted/*/ignores",
|
|
72
|
-
ignores,
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
this.scopes = {
|
|
76
|
-
files: defaults.files,
|
|
77
|
-
ignores: defaults.ignores,
|
|
78
|
-
rules: defaults.rules,
|
|
79
|
-
};
|
|
80
|
-
this.parsers = parsers;
|
|
81
|
-
|
|
82
|
-
const extended = new Set<Scope>(Object.keys(extensions) as unknown[] as Scope[]);
|
|
83
|
-
|
|
84
|
-
extended.delete("*" as unknown as Scope);
|
|
85
|
-
|
|
86
|
-
for (const scope of extended) {
|
|
54
|
+
for (const scope of scopes)
|
|
55
|
+
if (extensions[scope] !== undefined) {
|
|
87
56
|
const {
|
|
88
57
|
[scope]: {
|
|
89
58
|
files = [],
|
|
@@ -92,150 +61,212 @@ export class Factory<
|
|
|
92
61
|
} = {},
|
|
93
62
|
} = extensions;
|
|
94
63
|
|
|
95
|
-
if (files.length !== 0)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
defaultFiles
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
64
|
+
if (files.length !== 0)
|
|
65
|
+
if (defaults.files[scope] === undefined)
|
|
66
|
+
Object.assign(
|
|
67
|
+
defaults.files,
|
|
68
|
+
{ [scope]: files },
|
|
69
|
+
);
|
|
70
|
+
else {
|
|
71
|
+
const defaultFiles = defaults.files[scope],
|
|
72
|
+
L = defaultFiles.length;
|
|
73
|
+
|
|
74
|
+
defaultFiles.length += files.length;
|
|
75
|
+
|
|
76
|
+
for (let i = 0; i < files.length; i++)
|
|
77
|
+
defaultFiles[L + i] = files[i] as string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (ignores.length !== 0)
|
|
81
|
+
if (defaults.ignores[scope] === undefined)
|
|
82
|
+
Object.assign(
|
|
83
|
+
defaults.ignores,
|
|
84
|
+
{ [scope]: ignores },
|
|
85
|
+
);
|
|
86
|
+
else {
|
|
87
|
+
const defaultIgnores = defaults.ignores[scope],
|
|
88
|
+
L = defaultIgnores.length;
|
|
89
|
+
|
|
90
|
+
defaultIgnores.length += ignores.length;
|
|
91
|
+
|
|
92
|
+
for (let i = 0; i < ignores.length; i++)
|
|
93
|
+
defaultIgnores[L + i] = ignores[i] as string;
|
|
94
|
+
}
|
|
114
95
|
|
|
115
96
|
if (rules !== null)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
97
|
+
if (defaults.rules[scope] === undefined)
|
|
98
|
+
Object.assign(
|
|
99
|
+
defaults.rules,
|
|
100
|
+
{
|
|
101
|
+
[scope]: [
|
|
102
|
+
{
|
|
103
|
+
id: scope.concat("/override"),
|
|
104
|
+
rules,
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
);
|
|
109
|
+
else
|
|
110
|
+
/* eslint-disable no-param-reassign */
|
|
111
|
+
defaults.rules[scope][
|
|
112
|
+
defaults.rules[scope].length
|
|
113
|
+
] = {
|
|
114
|
+
id: scope.concat("/override"),
|
|
115
|
+
rules,
|
|
116
|
+
};
|
|
122
117
|
}
|
|
123
118
|
|
|
124
|
-
|
|
119
|
+
const OptionalScope = new Set<Scope>(optionalScopes);
|
|
125
120
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
121
|
+
for (const [scope, parents] of tree)
|
|
122
|
+
if (
|
|
123
|
+
!OptionalScope.has(scope)
|
|
124
|
+
|| scope in parsers
|
|
125
|
+
) {
|
|
126
|
+
const files = defaults.files[scope],
|
|
127
|
+
ignores = defaults.ignores[scope];
|
|
133
128
|
|
|
129
|
+
if (files !== undefined)
|
|
134
130
|
if (files.length !== 0)
|
|
135
|
-
for (const parent of parents)
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
parentFiles
|
|
143
|
-
|
|
144
|
-
|
|
131
|
+
for (const parent of parents)
|
|
132
|
+
if (defaults.files[parent] === undefined)
|
|
133
|
+
Object.assign(
|
|
134
|
+
defaults.files,
|
|
135
|
+
{ [parent]: files },
|
|
136
|
+
);
|
|
137
|
+
else {
|
|
138
|
+
const parentFiles = defaults.files[parent],
|
|
139
|
+
L = parentFiles.length;
|
|
140
|
+
|
|
141
|
+
parentFiles.length += files.length;
|
|
142
|
+
|
|
143
|
+
for (let i = 0; i < files.length; i++)
|
|
144
|
+
parentFiles[L + i] = files[i]!;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (ignores !== undefined)
|
|
145
148
|
if (ignores.length !== 0)
|
|
146
|
-
for (const parent of parents)
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
parentIgnores
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
];
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
public scope(scope: Scope) {
|
|
166
|
-
const {
|
|
167
|
-
files: { [scope]: files },
|
|
168
|
-
ignores: { [scope]: ignores },
|
|
169
|
-
rules: { [scope]: rules },
|
|
170
|
-
} = this.scopes;
|
|
149
|
+
for (const parent of parents)
|
|
150
|
+
if (defaults.ignores[parent] === undefined)
|
|
151
|
+
Object.assign(
|
|
152
|
+
defaults.ignores,
|
|
153
|
+
{ [parent]: ignores },
|
|
154
|
+
);
|
|
155
|
+
else {
|
|
156
|
+
const parentIgnores = defaults.ignores[parent],
|
|
157
|
+
L = parentIgnores.length;
|
|
158
|
+
|
|
159
|
+
parentIgnores.length += ignores.length;
|
|
160
|
+
|
|
161
|
+
for (let i = 0; i < ignores.length; i++)
|
|
162
|
+
parentIgnores[L + i] = ignores[i]!;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
171
165
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
166
|
+
const configs: unknown[] = [
|
|
167
|
+
{
|
|
168
|
+
name: "linted/*/plugins",
|
|
169
|
+
plugins,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "linted/*/ignores",
|
|
173
|
+
ignores: extensions["*"]?.override === true
|
|
174
|
+
? extensions["*"].ignores ?? []
|
|
175
|
+
: defaults.ignores["*"].concat(extensions["*"]?.ignores ?? []),
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
scopeConfigs: unknown[] = scopes.flatMap(
|
|
179
|
+
scope => {
|
|
175
180
|
const {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
} =
|
|
181
|
-
|
|
182
|
-
if ("parser" in languageOptions)
|
|
183
|
-
if (languageOptions.parser in this.parsers)
|
|
184
|
-
languageOptions.parser = this.parsers[languageOptions.parser as RequiredParser] as unknown as RequiredParser;
|
|
185
|
-
else
|
|
186
|
-
return [];
|
|
181
|
+
files: { [scope]: files },
|
|
182
|
+
ignores: { [scope]: ignores = [] },
|
|
183
|
+
rules: { [scope]: rules },
|
|
184
|
+
settings: { [scope]: settings },
|
|
185
|
+
} = defaults;
|
|
187
186
|
|
|
188
|
-
if (
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
);
|
|
187
|
+
if (
|
|
188
|
+
files === undefined
|
|
189
|
+
|| rules === undefined
|
|
190
|
+
|| files.length === 0
|
|
191
|
+
|| rules.length === 0
|
|
192
|
+
|| OptionalScope.has(scope)
|
|
193
|
+
&& !(scope in parsers)
|
|
194
|
+
|
|
195
|
+
)
|
|
196
|
+
return [];
|
|
197
|
+
else {
|
|
198
|
+
const manifest = {
|
|
199
|
+
name: "linted/".concat(scope),
|
|
200
|
+
files,
|
|
201
|
+
ignores,
|
|
202
|
+
};
|
|
205
203
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
204
|
+
if (settings !== undefined) {
|
|
205
|
+
const {
|
|
206
|
+
languageOptions = {},
|
|
207
|
+
parserOptions,
|
|
208
|
+
processor,
|
|
209
|
+
language,
|
|
210
|
+
} = settings;
|
|
211
|
+
|
|
212
|
+
if (languageOptions.parser !== undefined)
|
|
213
|
+
languageOptions.parser = parsers[languageOptions.parser as BundledParser] as unknown as BundledParser;
|
|
214
|
+
|
|
215
|
+
if (parserOptions?.parser !== undefined)
|
|
216
|
+
parserOptions.parser = parsers[parserOptions.parser as BundledParser] as unknown as BundledParser;
|
|
217
|
+
|
|
218
|
+
if (parserOptions !== undefined && Object.keys(parserOptions).length !== 0)
|
|
219
|
+
Object.assign(
|
|
220
|
+
languageOptions,
|
|
221
|
+
{ parserOptions },
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
if (Object.keys(languageOptions).length !== 0)
|
|
225
|
+
Object.assign(
|
|
226
|
+
manifest,
|
|
227
|
+
{ languageOptions },
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
if (processor !== undefined)
|
|
231
|
+
Object.assign(
|
|
232
|
+
manifest,
|
|
233
|
+
{ processor },
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
if (language !== undefined)
|
|
237
|
+
Object.assign(
|
|
238
|
+
manifest,
|
|
239
|
+
{ language },
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return [manifest].concat(
|
|
244
|
+
rules.map(
|
|
245
|
+
(
|
|
246
|
+
{
|
|
247
|
+
id,
|
|
248
|
+
rules,
|
|
249
|
+
},
|
|
250
|
+
) => ({
|
|
251
|
+
name: "linted/".concat(scope, "/", id),
|
|
252
|
+
files,
|
|
253
|
+
ignores,
|
|
254
|
+
rules,
|
|
255
|
+
}),
|
|
256
|
+
),
|
|
210
257
|
);
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
);
|
|
211
261
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
manifest,
|
|
215
|
-
{ processor },
|
|
216
|
-
);
|
|
262
|
+
if (scopeConfigs.length !== 0) {
|
|
263
|
+
const L = configs.length;
|
|
217
264
|
|
|
218
|
-
|
|
219
|
-
Object.assign(
|
|
220
|
-
manifest,
|
|
221
|
-
{ language },
|
|
222
|
-
);
|
|
265
|
+
configs.length += scopeConfigs.length;
|
|
223
266
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
(
|
|
227
|
-
{
|
|
228
|
-
id,
|
|
229
|
-
rules,
|
|
230
|
-
},
|
|
231
|
-
) => ({
|
|
232
|
-
name: "linted/".concat(scope, "/", id),
|
|
233
|
-
files,
|
|
234
|
-
ignores,
|
|
235
|
-
rules,
|
|
236
|
-
}),
|
|
237
|
-
),
|
|
238
|
-
);
|
|
239
|
-
}
|
|
267
|
+
for (let i = 0; i < scopeConfigs.length; i++)
|
|
268
|
+
configs[L + i] = scopeConfigs[i];
|
|
240
269
|
}
|
|
270
|
+
|
|
271
|
+
return configs;
|
|
241
272
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Input } from "./interface";
|
|
2
2
|
import type {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
BundledPlugin,
|
|
4
|
+
BundledParser,
|
|
5
5
|
} from "./scope";
|
|
6
6
|
import {
|
|
7
7
|
scopes,
|
|
8
8
|
optionalScopes,
|
|
9
9
|
tree,
|
|
10
10
|
} from "./scope";
|
|
11
|
-
import
|
|
11
|
+
import factory from "./factory";
|
|
12
12
|
|
|
13
13
|
export default function (
|
|
14
14
|
{
|
|
@@ -20,27 +20,16 @@ export default function (
|
|
|
20
20
|
}: Input<
|
|
21
21
|
(typeof scopes[number]),
|
|
22
22
|
(typeof optionalScopes[number]),
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
BundledPlugin,
|
|
24
|
+
BundledParser
|
|
25
25
|
>,
|
|
26
26
|
) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
(typeof optionalScopes[number]),
|
|
30
|
-
RequiredPlugin,
|
|
31
|
-
RequiredParser
|
|
32
|
-
>(
|
|
33
|
-
tree,
|
|
27
|
+
return factory(
|
|
28
|
+
scopes,
|
|
34
29
|
optionalScopes,
|
|
30
|
+
tree,
|
|
35
31
|
imports,
|
|
36
32
|
defaults,
|
|
37
33
|
extensions,
|
|
38
34
|
);
|
|
39
|
-
|
|
40
|
-
return (factory.globals as unknown[])
|
|
41
|
-
.concat(
|
|
42
|
-
scopes.flatMap(
|
|
43
|
-
scope => factory.scope(scope),
|
|
44
|
-
),
|
|
45
|
-
);
|
|
46
35
|
}
|
|
@@ -5,26 +5,28 @@ export interface Defaults<
|
|
|
5
5
|
Scope extends string,
|
|
6
6
|
Parser extends Scope,
|
|
7
7
|
> {
|
|
8
|
-
settings: Settings<
|
|
8
|
+
settings: Partial<Settings<
|
|
9
9
|
Scope,
|
|
10
10
|
Parser
|
|
11
|
-
|
|
12
|
-
files: Record<
|
|
11
|
+
>>;
|
|
12
|
+
files: Partial<Record<
|
|
13
13
|
Scope,
|
|
14
14
|
string[]
|
|
15
|
-
|
|
16
|
-
ignores:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
>>;
|
|
16
|
+
ignores:
|
|
17
|
+
& Record<
|
|
18
|
+
"*",
|
|
19
|
+
string[]
|
|
20
|
+
>
|
|
21
|
+
& Partial<Record<
|
|
22
|
+
Scope,
|
|
23
|
+
string[]
|
|
24
|
+
>>;
|
|
25
|
+
rules: Partial<Record<
|
|
24
26
|
Scope,
|
|
25
27
|
{
|
|
26
28
|
id: string;
|
|
27
29
|
rules: Rules;
|
|
28
30
|
}[]
|
|
29
|
-
|
|
31
|
+
>>;
|
|
30
32
|
}
|
package/src/interface/imports.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export interface Imports<
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
BundledPlugin extends string,
|
|
3
|
+
BundledParser extends string,
|
|
4
4
|
> {
|
|
5
5
|
plugins: Record<
|
|
6
|
-
|
|
6
|
+
BundledPlugin,
|
|
7
7
|
unknown
|
|
8
8
|
>;
|
|
9
9
|
parsers: Record<
|
|
10
|
-
|
|
10
|
+
BundledParser,
|
|
11
11
|
unknown
|
|
12
12
|
>;
|
|
13
13
|
}
|
package/src/interface/index.ts
CHANGED
|
@@ -4,18 +4,18 @@ import type { Configuration } from "./configuration";
|
|
|
4
4
|
export interface Input<
|
|
5
5
|
Scope extends string,
|
|
6
6
|
OptionalScope extends Scope,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
BundledPlugin extends string,
|
|
8
|
+
BundledParser extends Scope,
|
|
9
9
|
> {
|
|
10
10
|
imports: Imports<
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
BundledPlugin,
|
|
12
|
+
BundledParser
|
|
13
13
|
>;
|
|
14
14
|
configuration: Configuration<
|
|
15
15
|
Scope,
|
|
16
16
|
OptionalScope,
|
|
17
17
|
(
|
|
18
|
-
|
|
|
18
|
+
| BundledParser
|
|
19
19
|
| OptionalScope
|
|
20
20
|
)
|
|
21
21
|
>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export type {
|
|
1
|
+
export type { BundledPlugin } from "./plugins";
|
|
2
|
+
export type { BundledParser } from "./parsers";
|
package/src/scope/index.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scope/tree/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,qMAqBhB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scope/tree/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB;QACE,QAAQ;QACR,CAAC,OAAO,CAAC;KACD;IACV;QACE,OAAO;QACP,CAAC,MAAM,CAAC;KACA;IACV;QACE,OAAO;QACP,CAAC,IAAI,CAAC;KACE;IACV;QACE,QAAQ;QACR,CAAC,IAAI,CAAC;KACE;IACV;QACE,IAAI;QACJ,CAAC,IAAI,CAAC;KACE;CACX,CAAC"}
|