@storm-software/eslint-plugin-bun 0.0.2
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/LICENSE +201 -0
- package/README.md +280 -0
- package/dist/configs/index.d.ts +5 -0
- package/dist/configs/index.mjs +944 -0
- package/dist/configs/recommended.d.ts +5 -0
- package/dist/configs/recommended.mjs +939 -0
- package/dist/helpers/bun-workspace.d.ts +48 -0
- package/dist/helpers/bun-workspace.mjs +265 -0
- package/dist/helpers/create-rule.d.ts +9 -0
- package/dist/helpers/create-rule.mjs +42 -0
- package/dist/helpers/iterate-dependencies.d.ts +11 -0
- package/dist/helpers/iterate-dependencies.mjs +63 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.mjs +952 -0
- package/dist/plugin.d.ts +33 -0
- package/dist/plugin.mjs +808 -0
- package/dist/rules/json-enforce-catalog.d.ts +18 -0
- package/dist/rules/json-enforce-catalog.mjs +447 -0
- package/dist/rules/json-no-duplicate-catalog-item.d.ts +12 -0
- package/dist/rules/json-no-duplicate-catalog-item.mjs +391 -0
- package/dist/rules/json-no-unused-catalog-item.d.ts +7 -0
- package/dist/rules/json-no-unused-catalog-item.mjs +429 -0
- package/dist/rules/json-valid-catalog.d.ts +15 -0
- package/dist/rules/json-valid-catalog.mjs +426 -0
- package/package.json +91 -0
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
import defu from 'defu';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import process from 'node:process';
|
|
4
|
+
import { findUpSync } from 'find-up-simple';
|
|
5
|
+
import { dirname, normalize } from 'pathe';
|
|
6
|
+
import 'tinyglobby';
|
|
7
|
+
|
|
8
|
+
// src/helpers/create-rule.ts
|
|
9
|
+
function RuleCreator(urlCreator) {
|
|
10
|
+
return function createNamedRule({
|
|
11
|
+
name,
|
|
12
|
+
meta,
|
|
13
|
+
...rule
|
|
14
|
+
}) {
|
|
15
|
+
return createRuleInfo({
|
|
16
|
+
meta: {
|
|
17
|
+
...meta,
|
|
18
|
+
docs: {
|
|
19
|
+
...meta.docs,
|
|
20
|
+
url: urlCreator(name)
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
...rule
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function createRuleInfo({
|
|
28
|
+
create,
|
|
29
|
+
defaultOptions,
|
|
30
|
+
meta
|
|
31
|
+
}) {
|
|
32
|
+
return {
|
|
33
|
+
create: ((context) => {
|
|
34
|
+
const optionsWithDefault = context.options.map((options, index) => {
|
|
35
|
+
return defu(defaultOptions?.[index] ?? {}, options);
|
|
36
|
+
});
|
|
37
|
+
return create(context, optionsWithDefault);
|
|
38
|
+
}),
|
|
39
|
+
defaultOptions: defaultOptions ?? {},
|
|
40
|
+
meta
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
var createRule = RuleCreator(
|
|
44
|
+
(ruleName) => `https://docs.stormsoftware.com/projects/storm-ops/eslint-plugin-bun/rules/${ruleName}.md`
|
|
45
|
+
);
|
|
46
|
+
function isWorkspaceObject(workspaces) {
|
|
47
|
+
return Boolean(workspaces) && typeof workspaces === "object" && !Array.isArray(workspaces);
|
|
48
|
+
}
|
|
49
|
+
function detectCatalogRoot(data) {
|
|
50
|
+
if (data.catalog || data.catalogs) {
|
|
51
|
+
return "top";
|
|
52
|
+
}
|
|
53
|
+
if (isWorkspaceObject(data.workspaces) && (data.workspaces.catalog || data.workspaces.catalogs)) {
|
|
54
|
+
return "workspaces";
|
|
55
|
+
}
|
|
56
|
+
return isWorkspaceObject(data.workspaces) ? "workspaces" : "top";
|
|
57
|
+
}
|
|
58
|
+
function normalizeCatalogName(name) {
|
|
59
|
+
return name.replace(/\^/g, "h").replace(/~/g, "t").replace(/\./g, "_").replace(/</g, "l").replace(/>/g, "g").replace(/=/g, "e").replace(/\*/g, "s").replace(/@/g, "a").replace(/\|/g, "p").replace(/&/g, "n").replace(/-/g, "m").replace(/\+/g, "u").replace(/\s/g, "_");
|
|
60
|
+
}
|
|
61
|
+
function sortObjectKeys(input) {
|
|
62
|
+
return Object.fromEntries(
|
|
63
|
+
Object.entries(input).sort(([left], [right]) => left.localeCompare(right))
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function isWorkspaceRootPackageJson(data) {
|
|
67
|
+
return Boolean(
|
|
68
|
+
data.workspaces || data.catalog || data.catalogs
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
function readBunWorkspace(cwd = process.cwd()) {
|
|
72
|
+
const filepath = findUpSync("package.json", {
|
|
73
|
+
cwd,
|
|
74
|
+
type: "file"
|
|
75
|
+
});
|
|
76
|
+
if (!filepath) {
|
|
77
|
+
throw new Error("package.json not found");
|
|
78
|
+
}
|
|
79
|
+
let current = filepath;
|
|
80
|
+
let content = fs.readFileSync(current, "utf8");
|
|
81
|
+
let data = JSON.parse(content);
|
|
82
|
+
while (!isWorkspaceRootPackageJson(data)) {
|
|
83
|
+
const searchFrom = dirname(dirname(current));
|
|
84
|
+
const next = findUpSync("package.json", {
|
|
85
|
+
cwd: searchFrom,
|
|
86
|
+
type: "file"
|
|
87
|
+
});
|
|
88
|
+
if (!next || normalize(next) === normalize(current)) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
current = next;
|
|
92
|
+
content = fs.readFileSync(current, "utf8");
|
|
93
|
+
data = JSON.parse(content);
|
|
94
|
+
}
|
|
95
|
+
if (!isWorkspaceRootPackageJson(data)) {
|
|
96
|
+
throw new Error(
|
|
97
|
+
"Bun workspace root package.json with workspaces/catalog not found"
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
let hasChanged = false;
|
|
101
|
+
let queueTimer;
|
|
102
|
+
const queue = [];
|
|
103
|
+
let catalogRoot = detectCatalogRoot(data);
|
|
104
|
+
const write = () => {
|
|
105
|
+
if (!fs.existsSync(current)) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
fs.writeFileSync(current, `${JSON.stringify(data, null, 2)}
|
|
109
|
+
`);
|
|
110
|
+
};
|
|
111
|
+
const clearQueue = () => {
|
|
112
|
+
if (queueTimer != null) {
|
|
113
|
+
clearTimeout(queueTimer);
|
|
114
|
+
queueTimer = void 0;
|
|
115
|
+
}
|
|
116
|
+
queue.length = 0;
|
|
117
|
+
};
|
|
118
|
+
const getCatalogContainer = () => {
|
|
119
|
+
if (catalogRoot === "workspaces") {
|
|
120
|
+
if (!isWorkspaceObject(data.workspaces)) {
|
|
121
|
+
data.workspaces = {
|
|
122
|
+
packages: Array.isArray(data.workspaces) ? data.workspaces : [],
|
|
123
|
+
catalog: {},
|
|
124
|
+
catalogs: {}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
return data.workspaces;
|
|
128
|
+
}
|
|
129
|
+
return data;
|
|
130
|
+
};
|
|
131
|
+
const getCatalogData = () => {
|
|
132
|
+
const container = getCatalogContainer();
|
|
133
|
+
return {
|
|
134
|
+
catalog: container.catalog,
|
|
135
|
+
catalogs: container.catalogs
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
const setPackage = (catalogName, packageName, specifier) => {
|
|
139
|
+
const container = getCatalogContainer();
|
|
140
|
+
if (catalogName === "default") {
|
|
141
|
+
container.catalog ??= {};
|
|
142
|
+
if (container.catalog[packageName] !== specifier) {
|
|
143
|
+
container.catalog[packageName] = specifier;
|
|
144
|
+
container.catalog = sortObjectKeys(container.catalog);
|
|
145
|
+
hasChanged = true;
|
|
146
|
+
}
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
container.catalogs ??= {};
|
|
150
|
+
container.catalogs[catalogName] ??= {};
|
|
151
|
+
if (container.catalogs[catalogName][packageName] !== specifier) {
|
|
152
|
+
container.catalogs[catalogName][packageName] = specifier;
|
|
153
|
+
container.catalogs[catalogName] = sortObjectKeys(
|
|
154
|
+
container.catalogs[catalogName]
|
|
155
|
+
);
|
|
156
|
+
container.catalogs = sortObjectKeys(container.catalogs);
|
|
157
|
+
hasChanged = true;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
const hasSpecifierConflicts = (catalogName, packageName, specifier) => {
|
|
161
|
+
const { catalog, catalogs } = getCatalogData();
|
|
162
|
+
const existingSpecifier = catalogName === "default" ? catalog?.[packageName] : catalogs?.[catalogName]?.[packageName];
|
|
163
|
+
if (existingSpecifier === specifier) {
|
|
164
|
+
return {
|
|
165
|
+
conflicts: false,
|
|
166
|
+
newCatalogName: catalogName,
|
|
167
|
+
existingSpecifier
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
if (existingSpecifier) {
|
|
171
|
+
const versionSuffix = normalizeCatalogName(specifier);
|
|
172
|
+
const newCatalogName = catalogName === "default" ? `conflicts_${packageName}_${versionSuffix}` : `conflicts_${catalogName}_${versionSuffix}`;
|
|
173
|
+
return {
|
|
174
|
+
conflicts: true,
|
|
175
|
+
existingSpecifier,
|
|
176
|
+
newCatalogName
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
conflicts: false,
|
|
181
|
+
newCatalogName: catalogName
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
const getPackageCatalogs = (packageName) => {
|
|
185
|
+
const found = [];
|
|
186
|
+
const { catalog, catalogs } = getCatalogData();
|
|
187
|
+
if (catalogs) {
|
|
188
|
+
for (const name of Object.keys(catalogs)) {
|
|
189
|
+
if (catalogs[name]?.[packageName]) {
|
|
190
|
+
found.push(name);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (catalog?.[packageName]) {
|
|
195
|
+
found.push("default");
|
|
196
|
+
}
|
|
197
|
+
return found;
|
|
198
|
+
};
|
|
199
|
+
const workspace2 = {
|
|
200
|
+
filepath: current,
|
|
201
|
+
setContent(newContent) {
|
|
202
|
+
content = newContent;
|
|
203
|
+
data = JSON.parse(newContent);
|
|
204
|
+
catalogRoot = detectCatalogRoot(data);
|
|
205
|
+
hasChanged = false;
|
|
206
|
+
},
|
|
207
|
+
hasChanged: () => hasChanged,
|
|
208
|
+
hasQueue: () => queueTimer != null,
|
|
209
|
+
clearQueue,
|
|
210
|
+
queueChange(fn, order) {
|
|
211
|
+
if (order === "pre") {
|
|
212
|
+
queue.unshift(fn);
|
|
213
|
+
} else {
|
|
214
|
+
queue.push(fn);
|
|
215
|
+
}
|
|
216
|
+
if (queueTimer != null) {
|
|
217
|
+
clearTimeout(queueTimer);
|
|
218
|
+
}
|
|
219
|
+
queueTimer = setTimeout(() => {
|
|
220
|
+
queueTimer = void 0;
|
|
221
|
+
const clone = [...queue];
|
|
222
|
+
queue.length = 0;
|
|
223
|
+
for (const queued of clone) {
|
|
224
|
+
queued(workspace2);
|
|
225
|
+
}
|
|
226
|
+
if (hasChanged) {
|
|
227
|
+
write();
|
|
228
|
+
}
|
|
229
|
+
}, 1e3);
|
|
230
|
+
},
|
|
231
|
+
toJSON: () => data,
|
|
232
|
+
toString: () => `${JSON.stringify(data, null, 2)}
|
|
233
|
+
`,
|
|
234
|
+
setPackage,
|
|
235
|
+
setPackageNoConflicts(catalogName, packageName, specifier) {
|
|
236
|
+
const { newCatalogName } = hasSpecifierConflicts(
|
|
237
|
+
catalogName,
|
|
238
|
+
packageName,
|
|
239
|
+
specifier
|
|
240
|
+
);
|
|
241
|
+
setPackage(newCatalogName, packageName, specifier);
|
|
242
|
+
},
|
|
243
|
+
getPackageCatalogs,
|
|
244
|
+
hasSpecifierConflicts,
|
|
245
|
+
getCatalogData,
|
|
246
|
+
getWorkspacePackagePatterns() {
|
|
247
|
+
if (Array.isArray(data.workspaces)) {
|
|
248
|
+
return data.workspaces;
|
|
249
|
+
}
|
|
250
|
+
if (isWorkspaceObject(data.workspaces) && data.workspaces.packages) {
|
|
251
|
+
return data.workspaces.packages;
|
|
252
|
+
}
|
|
253
|
+
return [];
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
return workspace2;
|
|
257
|
+
}
|
|
258
|
+
var WORKSPACE_CACHE_TIME = 1e4;
|
|
259
|
+
var workspaceLastRead;
|
|
260
|
+
var workspace;
|
|
261
|
+
function getBunWorkspace(cwd = process.cwd()) {
|
|
262
|
+
if (workspaceLastRead && workspace && !workspace.hasQueue() && Date.now() - workspaceLastRead > WORKSPACE_CACHE_TIME) {
|
|
263
|
+
workspace = void 0;
|
|
264
|
+
}
|
|
265
|
+
if (!workspace) {
|
|
266
|
+
workspace = readBunWorkspace(cwd);
|
|
267
|
+
workspaceLastRead = Date.now();
|
|
268
|
+
}
|
|
269
|
+
return workspace;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// src/helpers/iterate-dependencies.ts
|
|
273
|
+
function getPackageJsonRootNode(context) {
|
|
274
|
+
if (!context.filename.endsWith("package.json")) {
|
|
275
|
+
return void 0;
|
|
276
|
+
}
|
|
277
|
+
const ast = context.sourceCode.ast;
|
|
278
|
+
const root = ast.body[0];
|
|
279
|
+
if (root?.expression?.type === "JSONObjectExpression") {
|
|
280
|
+
return root.expression;
|
|
281
|
+
}
|
|
282
|
+
return void 0;
|
|
283
|
+
}
|
|
284
|
+
function* iterateDependencies(context, fields) {
|
|
285
|
+
const root = getPackageJsonRootNode(context);
|
|
286
|
+
if (!root) {
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
for (const fieldName of fields) {
|
|
290
|
+
const path = fieldName.split(".");
|
|
291
|
+
let node = root;
|
|
292
|
+
for (const segment of path) {
|
|
293
|
+
const item = node.properties?.find(
|
|
294
|
+
(property) => property.key.type === "JSONLiteral" && property.key.value === segment
|
|
295
|
+
);
|
|
296
|
+
if (!item?.value || item.value.type !== "JSONObjectExpression") {
|
|
297
|
+
node = void 0;
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
node = item.value;
|
|
301
|
+
}
|
|
302
|
+
if (!node || node === root || !node.properties) {
|
|
303
|
+
continue;
|
|
304
|
+
}
|
|
305
|
+
for (const property of node.properties) {
|
|
306
|
+
if (property.value.type !== "JSONLiteral" || property.key.type !== "JSONLiteral") {
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
if (typeof property.value.value !== "string") {
|
|
310
|
+
continue;
|
|
311
|
+
}
|
|
312
|
+
yield {
|
|
313
|
+
packageName: String(property.key.value),
|
|
314
|
+
specifier: String(property.value.value),
|
|
315
|
+
property
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// src/rules/json-valid-catalog.ts
|
|
322
|
+
var RULE_NAME = "json-valid-catalog";
|
|
323
|
+
var DEFAULT_FIELDS = [
|
|
324
|
+
"dependencies",
|
|
325
|
+
"devDependencies",
|
|
326
|
+
"optionalDependencies",
|
|
327
|
+
"peerDependencies",
|
|
328
|
+
"resolutions",
|
|
329
|
+
"overrides"
|
|
330
|
+
];
|
|
331
|
+
var json_valid_catalog_default = createRule({
|
|
332
|
+
name: RULE_NAME,
|
|
333
|
+
meta: {
|
|
334
|
+
type: "layout",
|
|
335
|
+
docs: {
|
|
336
|
+
description: "Enforce using valid Bun catalog references in `package.json`"
|
|
337
|
+
},
|
|
338
|
+
fixable: "code",
|
|
339
|
+
schema: [
|
|
340
|
+
{
|
|
341
|
+
type: "object",
|
|
342
|
+
properties: {
|
|
343
|
+
autoInsert: {
|
|
344
|
+
type: "boolean",
|
|
345
|
+
description: "Whether to auto insert to catalog if missing",
|
|
346
|
+
default: true
|
|
347
|
+
},
|
|
348
|
+
autoInsertDefaultSpecifier: {
|
|
349
|
+
type: "string",
|
|
350
|
+
description: "Default specifier to use when auto inserting to catalog",
|
|
351
|
+
default: "^0.0.0"
|
|
352
|
+
},
|
|
353
|
+
autofix: {
|
|
354
|
+
type: "boolean",
|
|
355
|
+
description: "Whether to autofix the linting error",
|
|
356
|
+
default: true
|
|
357
|
+
},
|
|
358
|
+
fields: {
|
|
359
|
+
type: "array",
|
|
360
|
+
description: "Fields to check for catalog",
|
|
361
|
+
default: DEFAULT_FIELDS
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
additionalProperties: false
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
messages: {
|
|
368
|
+
invalidCatalog: 'Catalog "{{specifier}}" for package "{{packageName}}" is not defined in the workspace root `package.json`.'
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
defaultOptions: [{}],
|
|
372
|
+
create(context, [options = {}]) {
|
|
373
|
+
const {
|
|
374
|
+
autoInsert = true,
|
|
375
|
+
autofix = true,
|
|
376
|
+
autoInsertDefaultSpecifier = "^0.0.0",
|
|
377
|
+
fields = DEFAULT_FIELDS
|
|
378
|
+
} = options || {};
|
|
379
|
+
for (const { packageName, specifier, property } of iterateDependencies(
|
|
380
|
+
context,
|
|
381
|
+
fields
|
|
382
|
+
)) {
|
|
383
|
+
if (!specifier.startsWith("catalog:")) {
|
|
384
|
+
continue;
|
|
385
|
+
}
|
|
386
|
+
let workspace2;
|
|
387
|
+
try {
|
|
388
|
+
workspace2 = getBunWorkspace();
|
|
389
|
+
} catch {
|
|
390
|
+
return {};
|
|
391
|
+
}
|
|
392
|
+
const currentCatalog = specifier.replace(/^catalog:/, "").trim() || "default";
|
|
393
|
+
const existingCatalogs = workspace2.getPackageCatalogs(packageName);
|
|
394
|
+
if (!existingCatalogs.includes(currentCatalog)) {
|
|
395
|
+
context.report({
|
|
396
|
+
node: property.value,
|
|
397
|
+
messageId: "invalidCatalog",
|
|
398
|
+
data: {
|
|
399
|
+
specifier,
|
|
400
|
+
packageName
|
|
401
|
+
},
|
|
402
|
+
fix: !autofix || !autoInsert && !existingCatalogs.length ? void 0 : (fixer) => {
|
|
403
|
+
let catalog = existingCatalogs[0];
|
|
404
|
+
if (!catalog && autoInsert) {
|
|
405
|
+
catalog = currentCatalog;
|
|
406
|
+
workspace2.queueChange(() => {
|
|
407
|
+
workspace2.setPackage(
|
|
408
|
+
catalog,
|
|
409
|
+
packageName,
|
|
410
|
+
autoInsertDefaultSpecifier
|
|
411
|
+
);
|
|
412
|
+
}, "pre");
|
|
413
|
+
}
|
|
414
|
+
return fixer.replaceText(
|
|
415
|
+
property.value,
|
|
416
|
+
catalog === "default" ? JSON.stringify("catalog:") : JSON.stringify(`catalog:${catalog}`)
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
return {};
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
|
|
426
|
+
export { json_valid_catalog_default as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@storm-software/eslint-plugin-bun",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "An ESLint Plugin that enforces Bun catalog rules in Storm Software projects.",
|
|
6
|
+
"keywords": ["eslint", "eslint-plugin", "storm-software", "bun", "catalog"],
|
|
7
|
+
"homepage": "https://stormsoftware.com",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://stormsoftware.com/support",
|
|
10
|
+
"email": "support@stormsoftware.com"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "github",
|
|
14
|
+
"url": "https://github.com/storm-software/storm-ops.git",
|
|
15
|
+
"directory": "packages/eslint-plugin-bun"
|
|
16
|
+
},
|
|
17
|
+
"funding": {
|
|
18
|
+
"type": "github",
|
|
19
|
+
"url": "https://github.com/sponsors/storm-software"
|
|
20
|
+
},
|
|
21
|
+
"license": "Apache-2.0",
|
|
22
|
+
"author": {
|
|
23
|
+
"name": "Storm Software",
|
|
24
|
+
"email": "contact@stormsoftware.com",
|
|
25
|
+
"url": "https://stormsoftware.com"
|
|
26
|
+
},
|
|
27
|
+
"maintainers": [
|
|
28
|
+
{
|
|
29
|
+
"name": "Storm Software",
|
|
30
|
+
"email": "contact@stormsoftware.com",
|
|
31
|
+
"url": "https://stormsoftware.com"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"contributors": [
|
|
35
|
+
{
|
|
36
|
+
"name": "Storm Software",
|
|
37
|
+
"email": "contact@stormsoftware.com",
|
|
38
|
+
"url": "https://stormsoftware.com"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"type": "module",
|
|
42
|
+
"exports": {
|
|
43
|
+
".": { "types": "./dist/index.d.ts", "default": "./dist/index.mjs" },
|
|
44
|
+
"./index": { "types": "./dist/index.d.ts", "default": "./dist/index.mjs" },
|
|
45
|
+
"./configs": {
|
|
46
|
+
"types": "./dist/configs/index.d.ts",
|
|
47
|
+
"default": "./dist/configs/index.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./configs/recommended": {
|
|
50
|
+
"types": "./dist/configs/recommended.d.ts",
|
|
51
|
+
"default": "./dist/configs/recommended.mjs"
|
|
52
|
+
},
|
|
53
|
+
"./helpers/create-rule": {
|
|
54
|
+
"types": "./dist/helpers/create-rule.d.ts",
|
|
55
|
+
"default": "./dist/helpers/create-rule.mjs"
|
|
56
|
+
},
|
|
57
|
+
"./plugin": {
|
|
58
|
+
"types": "./dist/plugin.d.ts",
|
|
59
|
+
"default": "./dist/plugin.mjs"
|
|
60
|
+
},
|
|
61
|
+
"./package.json": "./package.json"
|
|
62
|
+
},
|
|
63
|
+
"files": ["dist"],
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@storm-software/package-constants": "0.1.127",
|
|
66
|
+
"@typescript-eslint/utils": "^8.66.0",
|
|
67
|
+
"defu": "^6.1.7",
|
|
68
|
+
"find-up-simple": "^1.0.1",
|
|
69
|
+
"jsonc-eslint-parser": "^2.4.2",
|
|
70
|
+
"pathe": "^2.0.3",
|
|
71
|
+
"tinyglobby": "^0.2.17"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@eslint/compat": "^2.1.0",
|
|
75
|
+
"@eslint/config-inspector": "^1.5.0",
|
|
76
|
+
"@storm-software/prettier": "0.59.167",
|
|
77
|
+
"@types/eslint": "^9.6.1",
|
|
78
|
+
"@types/eslint__js": "^8.42.3",
|
|
79
|
+
"@types/node": "^25.9.5",
|
|
80
|
+
"eslint": "^10.8.0",
|
|
81
|
+
"eslint-flat-config-utils": "^2.1.4",
|
|
82
|
+
"eslint-plugin-eslint-plugin": "^7.6.0",
|
|
83
|
+
"eslint-plugin-i18n-text": "^1.0.1",
|
|
84
|
+
"eslint-typegen": "^2.3.1",
|
|
85
|
+
"tsup": "8.4.0"
|
|
86
|
+
},
|
|
87
|
+
"peerDependencies": { "eslint": ">=9.39.3" },
|
|
88
|
+
"peerDependenciesMeta": { "eslint": { "optional": false } },
|
|
89
|
+
"publishConfig": { "access": "public" },
|
|
90
|
+
"gitHead": "37e2a4dcb02f87727a9de4428f910ba4d9c4524f"
|
|
91
|
+
}
|