@storm-software/eslint 0.170.149 → 0.170.151
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/{chunk-RYE47BYA.js → chunk-RS7RUX35.js} +4 -4
- package/dist/index.cjs +381 -1601
- package/dist/index.js +2 -2
- package/dist/preset.cjs +381 -1601
- package/dist/preset.js +1 -1
- package/dist/{src-NUZS4HWD.js → src-CBZKDWSO.js} +1 -1
- package/dist/src-PBDL72VC.js +57 -0
- package/dist/src-PDNT24JZ.js +91 -0
- package/package.json +11 -13
- package/dist/src-ESOUFI7D.js +0 -594
- package/dist/src-Z36N4YRW.js +0 -779
package/dist/index.cjs
CHANGED
|
@@ -9,8 +9,9 @@ var findUpSimple = require('find-up-simple');
|
|
|
9
9
|
var pathe = require('pathe');
|
|
10
10
|
var tinyglobby = require('tinyglobby');
|
|
11
11
|
var parserJsonc = require('jsonc-eslint-parser');
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var base = require('eslint-plugin-pnpm');
|
|
13
|
+
var parserYaml = require('yaml-eslint-parser');
|
|
14
|
+
var base2 = require('eslint-plugin-tsdoc');
|
|
14
15
|
var eslintFlatConfigUtils = require('eslint-flat-config-utils');
|
|
15
16
|
var localPkg = require('local-pkg');
|
|
16
17
|
var url$1 = require('url');
|
|
@@ -73,8 +74,10 @@ function _interopNamespace(e) {
|
|
|
73
74
|
var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
74
75
|
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
75
76
|
var process2__default = /*#__PURE__*/_interopDefault(process2);
|
|
76
|
-
var
|
|
77
|
-
var
|
|
77
|
+
var parserJsonc__default = /*#__PURE__*/_interopDefault(parserJsonc);
|
|
78
|
+
var base__default = /*#__PURE__*/_interopDefault(base);
|
|
79
|
+
var parserYaml__default = /*#__PURE__*/_interopDefault(parserYaml);
|
|
80
|
+
var base2__default = /*#__PURE__*/_interopDefault(base2);
|
|
78
81
|
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
79
82
|
var path16__default = /*#__PURE__*/_interopDefault(path16);
|
|
80
83
|
var cspellConfig__default = /*#__PURE__*/_interopDefault(cspellConfig);
|
|
@@ -117,8 +120,8 @@ var __commonJS = (cb, mod) => function __require2() {
|
|
|
117
120
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
118
121
|
};
|
|
119
122
|
var __export = (target, all) => {
|
|
120
|
-
for (var
|
|
121
|
-
__defProp(target,
|
|
123
|
+
for (var name2 in all)
|
|
124
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
122
125
|
};
|
|
123
126
|
var __copyProps = (to, from, except, desc) => {
|
|
124
127
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -321,7 +324,7 @@ var init_package = __esm({
|
|
|
321
324
|
"../eslint-plugin-bun/package.json"() {
|
|
322
325
|
package_default2 = {
|
|
323
326
|
name: "@storm-software/eslint-plugin-bun",
|
|
324
|
-
version: "0.0.
|
|
327
|
+
version: "0.0.4",
|
|
325
328
|
private: false,
|
|
326
329
|
description: "An ESLint Plugin that enforces Bun catalog rules in Storm Software projects.",
|
|
327
330
|
keywords: [
|
|
@@ -435,7 +438,7 @@ var init_package = __esm({
|
|
|
435
438
|
});
|
|
436
439
|
function RuleCreator2(urlCreator) {
|
|
437
440
|
return function createNamedRule({
|
|
438
|
-
name:
|
|
441
|
+
name: name2,
|
|
439
442
|
meta: meta3,
|
|
440
443
|
...rule
|
|
441
444
|
}) {
|
|
@@ -444,7 +447,7 @@ function RuleCreator2(urlCreator) {
|
|
|
444
447
|
...meta3,
|
|
445
448
|
docs: {
|
|
446
449
|
...meta3.docs,
|
|
447
|
-
url: urlCreator(
|
|
450
|
+
url: urlCreator(name2)
|
|
448
451
|
}
|
|
449
452
|
},
|
|
450
453
|
...rule
|
|
@@ -488,8 +491,8 @@ function detectCatalogRoot(data) {
|
|
|
488
491
|
}
|
|
489
492
|
return isWorkspaceObject(data.workspaces) ? "workspaces" : "top";
|
|
490
493
|
}
|
|
491
|
-
function normalizeCatalogName(
|
|
492
|
-
return
|
|
494
|
+
function normalizeCatalogName(name2) {
|
|
495
|
+
return name2.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, "_");
|
|
493
496
|
}
|
|
494
497
|
function sortObjectKeys(input) {
|
|
495
498
|
return Object.fromEntries(
|
|
@@ -618,9 +621,9 @@ function readBunWorkspace(cwd2 = process2__default.default.cwd()) {
|
|
|
618
621
|
const found = [];
|
|
619
622
|
const { catalog, catalogs } = getCatalogData();
|
|
620
623
|
if (catalogs) {
|
|
621
|
-
for (const
|
|
622
|
-
if (catalogs[
|
|
623
|
-
found.push(
|
|
624
|
+
for (const name2 of Object.keys(catalogs)) {
|
|
625
|
+
if (catalogs[name2]?.[packageName]) {
|
|
626
|
+
found.push(name2);
|
|
624
627
|
}
|
|
625
628
|
}
|
|
626
629
|
}
|
|
@@ -629,7 +632,7 @@ function readBunWorkspace(cwd2 = process2__default.default.cwd()) {
|
|
|
629
632
|
}
|
|
630
633
|
return found;
|
|
631
634
|
};
|
|
632
|
-
const
|
|
635
|
+
const workspace2 = {
|
|
633
636
|
filepath: current,
|
|
634
637
|
setContent(newContent) {
|
|
635
638
|
content = newContent;
|
|
@@ -654,7 +657,7 @@ function readBunWorkspace(cwd2 = process2__default.default.cwd()) {
|
|
|
654
657
|
const clone2 = [...queue];
|
|
655
658
|
queue.length = 0;
|
|
656
659
|
for (const queued of clone2) {
|
|
657
|
-
queued(
|
|
660
|
+
queued(workspace2);
|
|
658
661
|
}
|
|
659
662
|
if (hasChanged) {
|
|
660
663
|
write();
|
|
@@ -686,7 +689,7 @@ function readBunWorkspace(cwd2 = process2__default.default.cwd()) {
|
|
|
686
689
|
return [];
|
|
687
690
|
}
|
|
688
691
|
};
|
|
689
|
-
return
|
|
692
|
+
return workspace2;
|
|
690
693
|
}
|
|
691
694
|
function getBunWorkspace(cwd2 = process2__default.default.cwd()) {
|
|
692
695
|
if (workspaceLastRead && workspace && !workspace.hasQueue() && Date.now() - workspaceLastRead > WORKSPACE_CACHE_TIME) {
|
|
@@ -882,7 +885,7 @@ var init_json_enforce_catalog = __esm({
|
|
|
882
885
|
context,
|
|
883
886
|
fields
|
|
884
887
|
)) {
|
|
885
|
-
if (ignore2?.some((
|
|
888
|
+
if (ignore2?.some((name2) => name2 === packageName)) {
|
|
886
889
|
continue;
|
|
887
890
|
}
|
|
888
891
|
if (specifier.startsWith("catalog:")) {
|
|
@@ -891,14 +894,14 @@ var init_json_enforce_catalog = __esm({
|
|
|
891
894
|
if (allowedProtocols?.some((protocol) => specifier.startsWith(protocol))) {
|
|
892
895
|
continue;
|
|
893
896
|
}
|
|
894
|
-
let
|
|
897
|
+
let workspace2;
|
|
895
898
|
try {
|
|
896
|
-
|
|
899
|
+
workspace2 = getBunWorkspace();
|
|
897
900
|
} catch {
|
|
898
901
|
return {};
|
|
899
902
|
}
|
|
900
|
-
let targetCatalog = reuseExistingCatalog ?
|
|
901
|
-
const resolvedConflicts =
|
|
903
|
+
let targetCatalog = reuseExistingCatalog ? workspace2.getPackageCatalogs(packageName)[0] || defaultCatalog : defaultCatalog;
|
|
904
|
+
const resolvedConflicts = workspace2.hasSpecifierConflicts(
|
|
902
905
|
targetCatalog,
|
|
903
906
|
packageName,
|
|
904
907
|
specifier
|
|
@@ -918,8 +921,8 @@ var init_json_enforce_catalog = __esm({
|
|
|
918
921
|
packageName
|
|
919
922
|
},
|
|
920
923
|
fix: shouldFix ? (fixer) => {
|
|
921
|
-
|
|
922
|
-
|
|
924
|
+
workspace2.queueChange(() => {
|
|
925
|
+
workspace2.setPackage(targetCatalog, packageName, specifier);
|
|
923
926
|
});
|
|
924
927
|
return fixer.replaceText(
|
|
925
928
|
property.value,
|
|
@@ -976,16 +979,16 @@ var init_json_no_duplicate_catalog_item = __esm({
|
|
|
976
979
|
if (!isRootWorkspacePackageJson(context.filename)) {
|
|
977
980
|
return {};
|
|
978
981
|
}
|
|
979
|
-
let
|
|
982
|
+
let workspace2;
|
|
980
983
|
try {
|
|
981
|
-
|
|
984
|
+
workspace2 = getBunWorkspace();
|
|
982
985
|
} catch {
|
|
983
986
|
return {};
|
|
984
987
|
}
|
|
985
|
-
if (
|
|
988
|
+
if (workspace2.hasChanged() || workspace2.hasQueue()) {
|
|
986
989
|
return {};
|
|
987
990
|
}
|
|
988
|
-
|
|
991
|
+
workspace2.setContent(context.sourceCode.text);
|
|
989
992
|
const root = getPackageJsonRootNode(context);
|
|
990
993
|
if (!root) {
|
|
991
994
|
return {};
|
|
@@ -1078,16 +1081,16 @@ var init_json_no_unused_catalog_item = __esm({
|
|
|
1078
1081
|
if (!isRootWorkspacePackageJson(context.filename)) {
|
|
1079
1082
|
return {};
|
|
1080
1083
|
}
|
|
1081
|
-
let
|
|
1084
|
+
let workspace2;
|
|
1082
1085
|
try {
|
|
1083
|
-
|
|
1086
|
+
workspace2 = getBunWorkspace();
|
|
1084
1087
|
} catch {
|
|
1085
1088
|
return {};
|
|
1086
1089
|
}
|
|
1087
|
-
if (
|
|
1090
|
+
if (workspace2.hasChanged() || workspace2.hasQueue()) {
|
|
1088
1091
|
return {};
|
|
1089
1092
|
}
|
|
1090
|
-
|
|
1093
|
+
workspace2.setContent(context.sourceCode.text);
|
|
1091
1094
|
const root = getPackageJsonRootNode(context);
|
|
1092
1095
|
if (!root) {
|
|
1093
1096
|
return {};
|
|
@@ -1119,7 +1122,7 @@ var init_json_no_unused_catalog_item = __esm({
|
|
|
1119
1122
|
if (entries.size === 0) {
|
|
1120
1123
|
return {};
|
|
1121
1124
|
}
|
|
1122
|
-
const packages = collectWorkspacePackageJsonPaths(
|
|
1125
|
+
const packages = collectWorkspacePackageJsonPaths(workspace2);
|
|
1123
1126
|
for (const path23 of packages) {
|
|
1124
1127
|
const pkg = JSON.parse(fs__default.default.readFileSync(path23, "utf8"));
|
|
1125
1128
|
for (const field of FIELDS) {
|
|
@@ -1127,12 +1130,12 @@ var init_json_no_unused_catalog_item = __esm({
|
|
|
1127
1130
|
if (!map) {
|
|
1128
1131
|
continue;
|
|
1129
1132
|
}
|
|
1130
|
-
for (const [
|
|
1133
|
+
for (const [name2, value] of Object.entries(map)) {
|
|
1131
1134
|
if (typeof value !== "string" || !value.startsWith("catalog:")) {
|
|
1132
1135
|
continue;
|
|
1133
1136
|
}
|
|
1134
1137
|
const catalogName = value.slice(8) || "default";
|
|
1135
|
-
entries.delete(`${
|
|
1138
|
+
entries.delete(`${name2}:${catalogName}`);
|
|
1136
1139
|
}
|
|
1137
1140
|
}
|
|
1138
1141
|
}
|
|
@@ -1225,14 +1228,14 @@ var init_json_valid_catalog = __esm({
|
|
|
1225
1228
|
if (!specifier.startsWith("catalog:")) {
|
|
1226
1229
|
continue;
|
|
1227
1230
|
}
|
|
1228
|
-
let
|
|
1231
|
+
let workspace2;
|
|
1229
1232
|
try {
|
|
1230
|
-
|
|
1233
|
+
workspace2 = getBunWorkspace();
|
|
1231
1234
|
} catch {
|
|
1232
1235
|
return {};
|
|
1233
1236
|
}
|
|
1234
1237
|
const currentCatalog = specifier.replace(/^catalog:/, "").trim() || "default";
|
|
1235
|
-
const existingCatalogs =
|
|
1238
|
+
const existingCatalogs = workspace2.getPackageCatalogs(packageName);
|
|
1236
1239
|
if (!existingCatalogs.includes(currentCatalog)) {
|
|
1237
1240
|
context.report({
|
|
1238
1241
|
node: property.value,
|
|
@@ -1245,8 +1248,8 @@ var init_json_valid_catalog = __esm({
|
|
|
1245
1248
|
let catalog = existingCatalogs[0];
|
|
1246
1249
|
if (!catalog && autoInsert) {
|
|
1247
1250
|
catalog = currentCatalog;
|
|
1248
|
-
|
|
1249
|
-
|
|
1251
|
+
workspace2.queueChange(() => {
|
|
1252
|
+
workspace2.setPackage(
|
|
1250
1253
|
catalog,
|
|
1251
1254
|
packageName,
|
|
1252
1255
|
autoInsertDefaultSpecifier
|
|
@@ -1266,787 +1269,105 @@ var init_json_valid_catalog = __esm({
|
|
|
1266
1269
|
});
|
|
1267
1270
|
}
|
|
1268
1271
|
});
|
|
1269
|
-
|
|
1270
|
-
// ../eslint-plugin-bun/src/plugin.ts
|
|
1271
|
-
var plugin2;
|
|
1272
|
-
var init_plugin = __esm({
|
|
1273
|
-
"../eslint-plugin-bun/src/plugin.ts"() {
|
|
1274
|
-
init_cjs_shims();
|
|
1275
|
-
init_package();
|
|
1276
|
-
init_json_enforce_catalog();
|
|
1277
|
-
init_json_no_duplicate_catalog_item();
|
|
1278
|
-
init_json_no_unused_catalog_item();
|
|
1279
|
-
init_json_valid_catalog();
|
|
1280
|
-
plugin2 = {
|
|
1281
|
-
meta: {
|
|
1282
|
-
name: "bun",
|
|
1283
|
-
version: package_default2.version
|
|
1284
|
-
},
|
|
1285
|
-
rules: {
|
|
1286
|
-
"json-enforce-catalog": json_enforce_catalog_default,
|
|
1287
|
-
"json-valid-catalog": json_valid_catalog_default,
|
|
1288
|
-
"json-no-unused-catalog-item": json_no_unused_catalog_item_default,
|
|
1289
|
-
"json-no-duplicate-catalog-item": json_no_duplicate_catalog_item_default
|
|
1290
|
-
}
|
|
1291
|
-
};
|
|
1292
|
-
}
|
|
1293
|
-
});
|
|
1294
|
-
var config3, recommended_default2;
|
|
1295
|
-
var init_recommended = __esm({
|
|
1296
|
-
"../eslint-plugin-bun/src/configs/recommended.ts"() {
|
|
1297
|
-
init_cjs_shims();
|
|
1298
|
-
init_globs();
|
|
1299
|
-
init_plugin();
|
|
1300
|
-
config3 = [
|
|
1301
|
-
{
|
|
1302
|
-
name: "bun/recommended/setup",
|
|
1303
|
-
plugins: {
|
|
1304
|
-
bun: plugin2
|
|
1305
|
-
}
|
|
1306
|
-
},
|
|
1307
|
-
{
|
|
1308
|
-
name: "bun/recommended/package-json",
|
|
1309
|
-
ignores: GLOB_EXCLUDE,
|
|
1310
|
-
files: ["package.json", "**/package.json"],
|
|
1311
|
-
languageOptions: {
|
|
1312
|
-
parser: parserJsonc__namespace.default
|
|
1313
|
-
},
|
|
1314
|
-
rules: {
|
|
1315
|
-
"bun/json-enforce-catalog": [
|
|
1316
|
-
"error",
|
|
1317
|
-
{
|
|
1318
|
-
autofix: true,
|
|
1319
|
-
allowedProtocols: ["workspace", "link", "file"],
|
|
1320
|
-
defaultCatalog: "default",
|
|
1321
|
-
reuseExistingCatalog: true,
|
|
1322
|
-
conflicts: "overrides",
|
|
1323
|
-
fields: ["dependencies", "devDependencies"],
|
|
1324
|
-
ignore: ["typescript"]
|
|
1325
|
-
}
|
|
1326
|
-
],
|
|
1327
|
-
"bun/json-valid-catalog": "error",
|
|
1328
|
-
"bun/json-no-unused-catalog-item": "error",
|
|
1329
|
-
"bun/json-no-duplicate-catalog-item": "error"
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
];
|
|
1333
|
-
recommended_default2 = config3;
|
|
1334
|
-
}
|
|
1335
|
-
});
|
|
1336
|
-
|
|
1337
|
-
// ../eslint-plugin-bun/src/configs/index.ts
|
|
1338
|
-
var configs2;
|
|
1339
|
-
var init_configs = __esm({
|
|
1340
|
-
"../eslint-plugin-bun/src/configs/index.ts"() {
|
|
1341
|
-
init_cjs_shims();
|
|
1342
|
-
init_recommended();
|
|
1343
|
-
configs2 = {
|
|
1344
|
-
recommended: recommended_default2
|
|
1345
|
-
};
|
|
1346
|
-
}
|
|
1347
|
-
});
|
|
1348
|
-
|
|
1349
|
-
// ../eslint-plugin-bun/src/index.ts
|
|
1350
|
-
var src_exports = {};
|
|
1351
|
-
__export(src_exports, {
|
|
1352
|
-
configs: () => configs2,
|
|
1353
|
-
default: () => src_default2,
|
|
1354
|
-
rules: () => rules2
|
|
1355
|
-
});
|
|
1356
|
-
var eslintPlugin2, src_default2, rules2;
|
|
1357
|
-
var init_src = __esm({
|
|
1358
|
-
"../eslint-plugin-bun/src/index.ts"() {
|
|
1359
|
-
init_cjs_shims();
|
|
1360
|
-
init_configs();
|
|
1361
|
-
init_plugin();
|
|
1362
|
-
eslintPlugin2 = {
|
|
1363
|
-
...plugin2,
|
|
1364
|
-
configs: configs2
|
|
1365
|
-
};
|
|
1366
|
-
src_default2 = eslintPlugin2;
|
|
1367
|
-
rules2 = plugin2.rules;
|
|
1368
|
-
}
|
|
1369
|
-
});
|
|
1370
|
-
function RuleCreator4(urlCreator) {
|
|
1371
|
-
return function createNamedRule({
|
|
1372
|
-
name: name3,
|
|
1373
|
-
meta: meta3,
|
|
1374
|
-
...rule
|
|
1375
|
-
}) {
|
|
1376
|
-
return createRule5({
|
|
1377
|
-
meta: {
|
|
1378
|
-
...meta3,
|
|
1379
|
-
docs: {
|
|
1380
|
-
...meta3.docs,
|
|
1381
|
-
url: urlCreator(name3)
|
|
1382
|
-
}
|
|
1383
|
-
},
|
|
1384
|
-
...rule
|
|
1385
|
-
});
|
|
1386
|
-
};
|
|
1387
|
-
}
|
|
1388
|
-
function createRule5({
|
|
1389
|
-
create,
|
|
1390
|
-
defaultOptions,
|
|
1391
|
-
meta: meta3
|
|
1392
|
-
}) {
|
|
1393
|
-
return {
|
|
1394
|
-
create: (context) => {
|
|
1395
|
-
const optionsWithDefault = context.options.map((options, index) => {
|
|
1396
|
-
return {
|
|
1397
|
-
...defaultOptions[index] || {},
|
|
1398
|
-
...options || {}
|
|
1399
|
-
};
|
|
1400
|
-
});
|
|
1401
|
-
return create(context, optionsWithDefault);
|
|
1402
|
-
},
|
|
1403
|
-
defaultOptions,
|
|
1404
|
-
meta: meta3
|
|
1405
|
-
};
|
|
1406
|
-
}
|
|
1407
|
-
function getPackageJsonRootNode2(context) {
|
|
1408
|
-
if (!context.filename.endsWith("package.json"))
|
|
1409
|
-
return;
|
|
1410
|
-
const ast = context.sourceCode.ast;
|
|
1411
|
-
const root = ast.body[0];
|
|
1412
|
-
if (root.expression.type === "JSONObjectExpression")
|
|
1413
|
-
return root.expression;
|
|
1414
|
-
}
|
|
1415
|
-
function* iterateDependencies2(context, fields) {
|
|
1416
|
-
const root = getPackageJsonRootNode2(context);
|
|
1417
|
-
if (!root)
|
|
1418
|
-
return;
|
|
1419
|
-
for (const fieldName of fields) {
|
|
1420
|
-
const path23 = fieldName.split(".");
|
|
1421
|
-
let node2 = root;
|
|
1422
|
-
for (let i = 0; i < path23.length; i++) {
|
|
1423
|
-
const item = node2.properties.find((property) => property.key.type === "JSONLiteral" && property.key.value === path23[i]);
|
|
1424
|
-
if (!item?.value || item.value.type !== "JSONObjectExpression") {
|
|
1425
|
-
node2 = void 0;
|
|
1426
|
-
break;
|
|
1427
|
-
}
|
|
1428
|
-
node2 = item.value;
|
|
1429
|
-
}
|
|
1430
|
-
if (!node2 || node2 === root)
|
|
1431
|
-
continue;
|
|
1432
|
-
for (const property of node2.properties) {
|
|
1433
|
-
if (property.value.type !== "JSONLiteral" || property.key.type !== "JSONLiteral")
|
|
1434
|
-
continue;
|
|
1435
|
-
if (typeof property.value.value !== "string")
|
|
1436
|
-
continue;
|
|
1437
|
-
const packageName = String(property.key.value);
|
|
1438
|
-
const specifier = String(property.value.value);
|
|
1439
|
-
yield {
|
|
1440
|
-
packageName,
|
|
1441
|
-
specifier,
|
|
1442
|
-
property
|
|
1443
|
-
};
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
function readPnpmWorkspace() {
|
|
1448
|
-
const filepath = findUpSimple.findUpSync("pnpm-workspace.yaml", { cwd: process2__default.default.cwd() });
|
|
1449
|
-
if (!filepath)
|
|
1450
|
-
throw new Error("pnpm-workspace.yaml not found");
|
|
1451
|
-
const content = fs__default.default.readFileSync(filepath, "utf-8");
|
|
1452
|
-
const workspace3 = pnpmWorkspaceYaml.parsePnpmWorkspaceYaml(content);
|
|
1453
|
-
let queueTimer;
|
|
1454
|
-
const queue = [];
|
|
1455
|
-
const write = () => {
|
|
1456
|
-
fs__default.default.writeFileSync(filepath, workspace3.toString());
|
|
1457
|
-
};
|
|
1458
|
-
const hasQueue = () => queueTimer != null;
|
|
1459
|
-
const queueChange = (fn, order) => {
|
|
1460
|
-
if (order === "pre")
|
|
1461
|
-
queue.unshift(fn);
|
|
1462
|
-
else
|
|
1463
|
-
queue.push(fn);
|
|
1464
|
-
if (queueTimer != null)
|
|
1465
|
-
clearTimeout(queueTimer);
|
|
1466
|
-
queueTimer = setTimeout(() => {
|
|
1467
|
-
queueTimer = void 0;
|
|
1468
|
-
const clone2 = [...queue];
|
|
1469
|
-
queue.length = 0;
|
|
1470
|
-
for (const fn2 of clone2)
|
|
1471
|
-
fn2(workspace3);
|
|
1472
|
-
if (workspace3.hasChanged())
|
|
1473
|
-
write();
|
|
1474
|
-
}, 1e3);
|
|
1475
|
-
};
|
|
1476
|
-
return {
|
|
1477
|
-
filepath,
|
|
1478
|
-
...workspace3,
|
|
1479
|
-
hasQueue,
|
|
1480
|
-
queueChange
|
|
1481
|
-
};
|
|
1482
|
-
}
|
|
1483
|
-
function getPnpmWorkspace() {
|
|
1484
|
-
if (workspaceLastRead2 && workspace2 && !workspace2.hasQueue() && Date.now() - workspaceLastRead2 > WORKSPACE_CACHE_TIME2) {
|
|
1485
|
-
workspace2 = void 0;
|
|
1486
|
-
}
|
|
1487
|
-
if (!workspace2) {
|
|
1488
|
-
workspace2 = readPnpmWorkspace();
|
|
1489
|
-
workspaceLastRead2 = Date.now();
|
|
1490
|
-
}
|
|
1491
|
-
return workspace2;
|
|
1492
|
-
}
|
|
1493
|
-
function getObjectPath2(obj, path23) {
|
|
1494
|
-
let current = obj;
|
|
1495
|
-
for (const key of path23) {
|
|
1496
|
-
current = current[key];
|
|
1497
|
-
if (!current)
|
|
1498
|
-
return void 0;
|
|
1499
|
-
}
|
|
1500
|
-
return current;
|
|
1501
|
-
}
|
|
1502
|
-
var name2, version3, blobUrl, createEslintRule, WORKSPACE_CACHE_TIME2, workspaceLastRead2, workspace2, RULE_NAME$4, DEFAULT_FIELDS$1, IGNORED_DEPENDENCIES2, enforceCatalog, RULE_NAME$3, preferWorkspaceSettings, RULE_NAME$2, DEFAULT_FIELDS3, validCatalog, rules$2, RULE_NAME$1, noDuplicateCatalogItem, RULE_NAME6, noUnusedCatalogItem, rules$1, rules4, plugin4, configsJson, configsYaml, configs4;
|
|
1503
|
-
var init_dist = __esm({
|
|
1504
|
-
"../../node_modules/.pnpm/eslint-plugin-pnpm@0.3.0_patch_hash=72dcde755c336eeca3e6170de1106fd85ecb66171e060788f80_f126904b94a1635d882631163ea19421/node_modules/eslint-plugin-pnpm/dist/index.mjs"() {
|
|
1505
|
-
init_cjs_shims();
|
|
1506
|
-
name2 = "eslint-plugin-pnpm";
|
|
1507
|
-
version3 = "0.3.0";
|
|
1508
|
-
blobUrl = "https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/";
|
|
1509
|
-
createEslintRule = RuleCreator4(
|
|
1510
|
-
(ruleName) => `${blobUrl}${ruleName}.test.ts`
|
|
1511
|
-
);
|
|
1512
|
-
WORKSPACE_CACHE_TIME2 = 1e4;
|
|
1513
|
-
RULE_NAME$4 = "json-enforce-catalog";
|
|
1514
|
-
DEFAULT_FIELDS$1 = [
|
|
1515
|
-
"dependencies",
|
|
1516
|
-
"devDependencies"
|
|
1517
|
-
];
|
|
1518
|
-
IGNORED_DEPENDENCIES2 = [
|
|
1519
|
-
"typescript"
|
|
1520
|
-
];
|
|
1521
|
-
enforceCatalog = createEslintRule({
|
|
1522
|
-
name: RULE_NAME$4,
|
|
1523
|
-
meta: {
|
|
1524
|
-
type: "layout",
|
|
1525
|
-
docs: {
|
|
1526
|
-
description: 'Enforce using "catalog:" in `package.json`'
|
|
1527
|
-
},
|
|
1528
|
-
fixable: "code",
|
|
1529
|
-
schema: [
|
|
1530
|
-
{
|
|
1531
|
-
type: "object",
|
|
1532
|
-
properties: {
|
|
1533
|
-
allowedProtocols: {
|
|
1534
|
-
type: "array",
|
|
1535
|
-
description: "Allowed protocols in specifier to not be converted to catalog",
|
|
1536
|
-
items: {
|
|
1537
|
-
type: "string"
|
|
1538
|
-
}
|
|
1539
|
-
},
|
|
1540
|
-
autofix: {
|
|
1541
|
-
type: "boolean",
|
|
1542
|
-
description: "Whether to autofix the linting error",
|
|
1543
|
-
default: true
|
|
1544
|
-
},
|
|
1545
|
-
defaultCatalog: {
|
|
1546
|
-
type: "string",
|
|
1547
|
-
description: "Default catalog to use when moving version to catalog with autofix"
|
|
1548
|
-
},
|
|
1549
|
-
reuseExistingCatalog: {
|
|
1550
|
-
type: "boolean",
|
|
1551
|
-
description: "Whether to reuse existing catalog when moving version to catalog with autofix",
|
|
1552
|
-
default: true
|
|
1553
|
-
},
|
|
1554
|
-
conflicts: {
|
|
1555
|
-
type: "string",
|
|
1556
|
-
description: "Strategy to handle conflicts when adding packages to catalogs",
|
|
1557
|
-
enum: ["new-catalog", "overrides", "error"],
|
|
1558
|
-
default: "new-catalog"
|
|
1559
|
-
},
|
|
1560
|
-
fields: {
|
|
1561
|
-
type: "array",
|
|
1562
|
-
description: "Fields to check for catalog",
|
|
1563
|
-
items: { type: "string" },
|
|
1564
|
-
default: DEFAULT_FIELDS$1
|
|
1565
|
-
},
|
|
1566
|
-
ignore: {
|
|
1567
|
-
type: "array",
|
|
1568
|
-
description: "A list of dependencies to ignore",
|
|
1569
|
-
items: { type: "string" },
|
|
1570
|
-
default: IGNORED_DEPENDENCIES2
|
|
1571
|
-
}
|
|
1572
|
-
},
|
|
1573
|
-
additionalProperties: false
|
|
1574
|
-
}
|
|
1575
|
-
],
|
|
1576
|
-
messages: {
|
|
1577
|
-
expectCatalog: 'Expect to use catalog instead of plain specifier, got "{{specifier}}" for package "{{packageName}}".'
|
|
1578
|
-
}
|
|
1579
|
-
},
|
|
1580
|
-
defaultOptions: [{}],
|
|
1581
|
-
create(context, [options]) {
|
|
1582
|
-
const {
|
|
1583
|
-
allowedProtocols = ["workspace", "link", "file"],
|
|
1584
|
-
defaultCatalog = "default",
|
|
1585
|
-
autofix = true,
|
|
1586
|
-
reuseExistingCatalog = true,
|
|
1587
|
-
conflicts = "new-catalog",
|
|
1588
|
-
fields = DEFAULT_FIELDS$1,
|
|
1589
|
-
ignore: ignore2 = IGNORED_DEPENDENCIES2
|
|
1590
|
-
} = options || {};
|
|
1591
|
-
for (const { packageName, specifier, property } of iterateDependencies2(context, fields)) {
|
|
1592
|
-
if (ignore2?.some((i) => i === packageName))
|
|
1593
|
-
continue;
|
|
1594
|
-
if (specifier.startsWith("catalog:"))
|
|
1595
|
-
continue;
|
|
1596
|
-
if (allowedProtocols?.some((p) => specifier.startsWith(p)))
|
|
1597
|
-
continue;
|
|
1598
|
-
const workspace3 = getPnpmWorkspace();
|
|
1599
|
-
if (!workspace3)
|
|
1600
|
-
return {};
|
|
1601
|
-
let targetCatalog = reuseExistingCatalog ? workspace3.getPackageCatalogs(packageName)[0] || defaultCatalog : defaultCatalog;
|
|
1602
|
-
const resolvedConflicts = workspace3.hasSpecifierConflicts(
|
|
1603
|
-
targetCatalog,
|
|
1604
|
-
packageName,
|
|
1605
|
-
specifier
|
|
1606
|
-
);
|
|
1607
|
-
let shouldFix = autofix;
|
|
1608
|
-
if (conflicts === "error") {
|
|
1609
|
-
if (resolvedConflicts.conflicts) {
|
|
1610
|
-
shouldFix = false;
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
if (conflicts === "new-catalog" && resolvedConflicts.conflicts) {
|
|
1614
|
-
targetCatalog = resolvedConflicts.newCatalogName;
|
|
1615
|
-
}
|
|
1616
|
-
context.report({
|
|
1617
|
-
node: property.value,
|
|
1618
|
-
messageId: "expectCatalog",
|
|
1619
|
-
data: {
|
|
1620
|
-
specifier,
|
|
1621
|
-
packageName
|
|
1622
|
-
},
|
|
1623
|
-
fix: shouldFix ? (fixer) => {
|
|
1624
|
-
workspace3.queueChange(() => {
|
|
1625
|
-
workspace3.setPackage(targetCatalog, packageName, specifier);
|
|
1626
|
-
});
|
|
1627
|
-
return fixer.replaceText(
|
|
1628
|
-
property.value,
|
|
1629
|
-
targetCatalog === "default" ? JSON.stringify("catalog:") : JSON.stringify(`catalog:${targetCatalog}`)
|
|
1630
|
-
);
|
|
1631
|
-
} : void 0
|
|
1632
|
-
});
|
|
1633
|
-
}
|
|
1634
|
-
return {};
|
|
1635
|
-
}
|
|
1636
|
-
});
|
|
1637
|
-
RULE_NAME$3 = "json-prefer-workspace-settings";
|
|
1638
|
-
preferWorkspaceSettings = createEslintRule({
|
|
1639
|
-
name: RULE_NAME$3,
|
|
1640
|
-
meta: {
|
|
1641
|
-
type: "layout",
|
|
1642
|
-
docs: {
|
|
1643
|
-
description: "Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This would requires pnpm v10.6+, see https://github.com/orgs/pnpm/discussions/9037."
|
|
1644
|
-
},
|
|
1645
|
-
fixable: "code",
|
|
1646
|
-
schema: [
|
|
1647
|
-
{
|
|
1648
|
-
type: "object",
|
|
1649
|
-
properties: {
|
|
1650
|
-
autofix: {
|
|
1651
|
-
type: "boolean",
|
|
1652
|
-
description: "Whether to autofix the linting error",
|
|
1653
|
-
default: true
|
|
1654
|
-
}
|
|
1655
|
-
},
|
|
1656
|
-
additionalProperties: false
|
|
1657
|
-
}
|
|
1658
|
-
],
|
|
1659
|
-
messages: {
|
|
1660
|
-
unexpectedPnpmSettings: "Unexpected pnpm settings in package.json, should move to pnpm-workspace.yaml"
|
|
1661
|
-
}
|
|
1662
|
-
},
|
|
1663
|
-
defaultOptions: [{}],
|
|
1664
|
-
create(context, [options = {}]) {
|
|
1665
|
-
const {
|
|
1666
|
-
autofix = true
|
|
1667
|
-
} = options || {};
|
|
1668
|
-
const root = getPackageJsonRootNode2(context);
|
|
1669
|
-
if (!root)
|
|
1670
|
-
return {};
|
|
1671
|
-
const pnpmNode = root.properties.find((property) => property.key.type === "JSONLiteral" && property.key.value === "pnpm");
|
|
1672
|
-
if (!pnpmNode)
|
|
1673
|
-
return {};
|
|
1674
|
-
const workspace3 = getPnpmWorkspace();
|
|
1675
|
-
if (!workspace3)
|
|
1676
|
-
return {};
|
|
1677
|
-
context.report({
|
|
1678
|
-
node: pnpmNode,
|
|
1679
|
-
messageId: "unexpectedPnpmSettings",
|
|
1680
|
-
fix: autofix ? (fixer) => {
|
|
1681
|
-
const json = JSON.parse(context.sourceCode.text);
|
|
1682
|
-
const pnpmSettings = json.pnpm;
|
|
1683
|
-
const flatValueParis = [];
|
|
1684
|
-
function traverse(value, paths) {
|
|
1685
|
-
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
1686
|
-
for (const key in value) {
|
|
1687
|
-
traverse(value[key], [...paths, key]);
|
|
1688
|
-
}
|
|
1689
|
-
} else {
|
|
1690
|
-
flatValueParis.push([paths, value]);
|
|
1691
|
-
}
|
|
1692
|
-
}
|
|
1693
|
-
traverse(pnpmSettings, []);
|
|
1694
|
-
workspace3.queueChange(() => {
|
|
1695
|
-
for (const [paths, value] of flatValueParis) {
|
|
1696
|
-
workspace3.setPath(paths, value);
|
|
1697
|
-
}
|
|
1698
|
-
});
|
|
1699
|
-
let start = pnpmNode.range[0];
|
|
1700
|
-
let end = pnpmNode.range[1];
|
|
1701
|
-
const before = context.sourceCode.getTokenBefore(pnpmNode);
|
|
1702
|
-
if (before)
|
|
1703
|
-
start = before.range[1];
|
|
1704
|
-
const after = context.sourceCode.getTokenAfter(pnpmNode);
|
|
1705
|
-
if (after?.type === "Punctuator" && after.value === ",")
|
|
1706
|
-
end = after.range[1];
|
|
1707
|
-
return fixer.removeRange([start, end]);
|
|
1708
|
-
} : void 0
|
|
1709
|
-
});
|
|
1710
|
-
return {};
|
|
1711
|
-
}
|
|
1712
|
-
});
|
|
1713
|
-
RULE_NAME$2 = "json-valid-catalog";
|
|
1714
|
-
DEFAULT_FIELDS3 = [
|
|
1715
|
-
"dependencies",
|
|
1716
|
-
"devDependencies",
|
|
1717
|
-
"optionalDependencies",
|
|
1718
|
-
"peerDependencies",
|
|
1719
|
-
"resolutions",
|
|
1720
|
-
"overrides",
|
|
1721
|
-
"pnpm.overrides"
|
|
1722
|
-
];
|
|
1723
|
-
validCatalog = createEslintRule({
|
|
1724
|
-
name: RULE_NAME$2,
|
|
1725
|
-
meta: {
|
|
1726
|
-
type: "layout",
|
|
1727
|
-
docs: {
|
|
1728
|
-
description: "Enforce using valid catalog in `package.json`"
|
|
1729
|
-
},
|
|
1730
|
-
fixable: "code",
|
|
1731
|
-
schema: [
|
|
1732
|
-
{
|
|
1733
|
-
type: "object",
|
|
1734
|
-
properties: {
|
|
1735
|
-
autoInsert: {
|
|
1736
|
-
type: "boolean",
|
|
1737
|
-
description: "Whether to auto insert to catalog if missing",
|
|
1738
|
-
default: true
|
|
1739
|
-
},
|
|
1740
|
-
autoInsertDefaultSpecifier: {
|
|
1741
|
-
type: "string",
|
|
1742
|
-
description: "Default specifier to use when auto inserting to catalog",
|
|
1743
|
-
default: "^0.0.0"
|
|
1744
|
-
},
|
|
1745
|
-
autofix: {
|
|
1746
|
-
type: "boolean",
|
|
1747
|
-
description: "Whether to autofix the linting error",
|
|
1748
|
-
default: true
|
|
1749
|
-
},
|
|
1750
|
-
enforceNoConflict: {
|
|
1751
|
-
type: "boolean",
|
|
1752
|
-
description: "Whether to enforce no conflicts when adding packages to catalogs (will create version-specific catalogs)",
|
|
1753
|
-
default: true
|
|
1754
|
-
},
|
|
1755
|
-
fields: {
|
|
1756
|
-
type: "array",
|
|
1757
|
-
description: "Fields to check for catalog",
|
|
1758
|
-
default: DEFAULT_FIELDS3
|
|
1759
|
-
}
|
|
1760
|
-
},
|
|
1761
|
-
additionalProperties: false
|
|
1762
|
-
}
|
|
1763
|
-
],
|
|
1764
|
-
messages: {
|
|
1765
|
-
invalidCatalog: 'Catalog "{{specifier}}" for package "{{packageName}}" is not defined in `pnpm-workspace.yaml`.'
|
|
1766
|
-
}
|
|
1767
|
-
},
|
|
1768
|
-
defaultOptions: [{}],
|
|
1769
|
-
create(context, [options = {}]) {
|
|
1770
|
-
const {
|
|
1771
|
-
autoInsert = true,
|
|
1772
|
-
autofix = true,
|
|
1773
|
-
autoInsertDefaultSpecifier = "^0.0.0",
|
|
1774
|
-
fields = DEFAULT_FIELDS3
|
|
1775
|
-
} = options || {};
|
|
1776
|
-
for (const { packageName, specifier, property } of iterateDependencies2(context, fields)) {
|
|
1777
|
-
if (!specifier.startsWith("catalog:"))
|
|
1778
|
-
continue;
|
|
1779
|
-
const workspace3 = getPnpmWorkspace();
|
|
1780
|
-
if (!workspace3)
|
|
1781
|
-
return {};
|
|
1782
|
-
const currentCatalog = specifier.replace(/^catalog:/, "").trim() || "default";
|
|
1783
|
-
const existingCatalogs = workspace3.getPackageCatalogs(packageName);
|
|
1784
|
-
if (!existingCatalogs.includes(currentCatalog)) {
|
|
1785
|
-
context.report({
|
|
1786
|
-
node: property.value,
|
|
1787
|
-
messageId: "invalidCatalog",
|
|
1788
|
-
data: {
|
|
1789
|
-
specifier,
|
|
1790
|
-
packageName
|
|
1791
|
-
},
|
|
1792
|
-
fix: !autofix || !autoInsert && !existingCatalogs.length ? void 0 : (fixer) => {
|
|
1793
|
-
let catalog = existingCatalogs[0];
|
|
1794
|
-
if (!catalog && autoInsert) {
|
|
1795
|
-
catalog = currentCatalog;
|
|
1796
|
-
workspace3.queueChange(() => {
|
|
1797
|
-
workspace3.setPackage(catalog, packageName, autoInsertDefaultSpecifier);
|
|
1798
|
-
}, "pre");
|
|
1799
|
-
}
|
|
1800
|
-
return fixer.replaceText(
|
|
1801
|
-
property.value,
|
|
1802
|
-
catalog === "default" ? JSON.stringify("catalog:") : JSON.stringify(`catalog:${catalog}`)
|
|
1803
|
-
);
|
|
1804
|
-
}
|
|
1805
|
-
});
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
return {};
|
|
1809
|
-
}
|
|
1810
|
-
});
|
|
1811
|
-
rules$2 = {
|
|
1812
|
-
"json-enforce-catalog": enforceCatalog,
|
|
1813
|
-
"json-valid-catalog": validCatalog,
|
|
1814
|
-
"json-prefer-workspace-settings": preferWorkspaceSettings
|
|
1815
|
-
};
|
|
1816
|
-
RULE_NAME$1 = "yaml-no-duplicate-catalog-item";
|
|
1817
|
-
noDuplicateCatalogItem = createEslintRule({
|
|
1818
|
-
name: RULE_NAME$1,
|
|
1819
|
-
meta: {
|
|
1820
|
-
type: "problem",
|
|
1821
|
-
docs: {
|
|
1822
|
-
description: "Disallow unused catalogs in `pnpm-workspace.yaml`"
|
|
1823
|
-
},
|
|
1824
|
-
fixable: "code",
|
|
1825
|
-
schema: [
|
|
1826
|
-
{
|
|
1827
|
-
type: "object",
|
|
1828
|
-
properties: {
|
|
1829
|
-
allow: {
|
|
1830
|
-
type: "array",
|
|
1831
|
-
items: { type: "string" }
|
|
1832
|
-
}
|
|
1833
|
-
},
|
|
1834
|
-
additionalProperties: false
|
|
1835
|
-
}
|
|
1836
|
-
],
|
|
1837
|
-
messages: {
|
|
1838
|
-
duplicateCatalogItem: 'Catalog item "{{name}}" is already defined in the "{{existingCatalog}}" catalog. You may want to remove one of them.'
|
|
1839
|
-
}
|
|
1840
|
-
},
|
|
1841
|
-
defaultOptions: [{}],
|
|
1842
|
-
create(context, [options = {}]) {
|
|
1843
|
-
if (pathe.basename(context.filename) !== "pnpm-workspace.yaml")
|
|
1844
|
-
return {};
|
|
1845
|
-
const workspace3 = getPnpmWorkspace();
|
|
1846
|
-
if (!workspace3 || pathe.normalize(workspace3.filepath) !== pathe.normalize(context.filename))
|
|
1847
|
-
return {};
|
|
1848
|
-
if (workspace3.hasChanged() || workspace3.hasQueue())
|
|
1849
|
-
return {};
|
|
1850
|
-
const { allow = [] } = options;
|
|
1851
|
-
workspace3.setContent(context.sourceCode.text);
|
|
1852
|
-
const json = workspace3.toJSON() || {};
|
|
1853
|
-
const exists = /* @__PURE__ */ new Map();
|
|
1854
|
-
const catalogs = {
|
|
1855
|
-
...json.catalogs,
|
|
1856
|
-
default: json.catalog
|
|
1857
|
-
};
|
|
1858
|
-
const doc = workspace3.getDocument();
|
|
1859
|
-
for (const [catalog, object2] of Object.entries(catalogs)) {
|
|
1860
|
-
if (!object2)
|
|
1861
|
-
continue;
|
|
1862
|
-
for (const key of Object.keys(object2)) {
|
|
1863
|
-
if (allow.includes(key))
|
|
1864
|
-
continue;
|
|
1865
|
-
if (exists.has(key)) {
|
|
1866
|
-
const existingCatalog = exists.get(key);
|
|
1867
|
-
const node2 = doc.getIn(catalog === "default" ? ["catalog", key] : ["catalogs", catalog, key], true);
|
|
1868
|
-
const start = context.sourceCode.getLocFromIndex(node2.range[0]);
|
|
1869
|
-
const end = context.sourceCode.getLocFromIndex(node2.range[1]);
|
|
1870
|
-
context.report({
|
|
1871
|
-
loc: {
|
|
1872
|
-
start,
|
|
1873
|
-
end
|
|
1874
|
-
},
|
|
1875
|
-
messageId: "duplicateCatalogItem",
|
|
1876
|
-
data: {
|
|
1877
|
-
name: key,
|
|
1878
|
-
currentCatalog: catalog,
|
|
1879
|
-
existingCatalog
|
|
1880
|
-
}
|
|
1881
|
-
});
|
|
1882
|
-
} else {
|
|
1883
|
-
exists.set(key, catalog);
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
return {};
|
|
1888
|
-
}
|
|
1889
|
-
});
|
|
1890
|
-
RULE_NAME6 = "yaml-no-unused-catalog-item";
|
|
1891
|
-
noUnusedCatalogItem = createEslintRule({
|
|
1892
|
-
name: RULE_NAME6,
|
|
1893
|
-
meta: {
|
|
1894
|
-
type: "problem",
|
|
1895
|
-
docs: {
|
|
1896
|
-
description: "Disallow unused catalogs in `pnpm-workspace.yaml`"
|
|
1897
|
-
},
|
|
1898
|
-
fixable: "code",
|
|
1899
|
-
schema: [],
|
|
1900
|
-
messages: {
|
|
1901
|
-
unusedCatalogItem: 'Catalog item "{{catalogItem}}" is not used in any package.json.'
|
|
1902
|
-
}
|
|
1903
|
-
},
|
|
1904
|
-
defaultOptions: [],
|
|
1905
|
-
create(context) {
|
|
1906
|
-
if (pathe.basename(context.filename) !== "pnpm-workspace.yaml")
|
|
1907
|
-
return {};
|
|
1908
|
-
const workspace3 = getPnpmWorkspace();
|
|
1909
|
-
if (!workspace3 || pathe.normalize(workspace3.filepath) !== pathe.normalize(context.filename))
|
|
1910
|
-
return {};
|
|
1911
|
-
if (workspace3.hasChanged() || workspace3.hasQueue())
|
|
1912
|
-
return {};
|
|
1913
|
-
workspace3.setContent(context.sourceCode.text);
|
|
1914
|
-
const parsed = workspace3.toJSON() || {};
|
|
1915
|
-
const root = pathe.resolve(pathe.dirname(context.filename));
|
|
1916
|
-
const entries = /* @__PURE__ */ new Map();
|
|
1917
|
-
const doc = workspace3.getDocument();
|
|
1918
|
-
const catalogs = {
|
|
1919
|
-
default: doc.getIn(["catalog"])
|
|
1920
|
-
};
|
|
1921
|
-
for (const item of doc.getIn(["catalogs"])?.items || [])
|
|
1922
|
-
catalogs[String(item.key)] = item.value;
|
|
1923
|
-
for (const [catalog, map] of Object.entries(catalogs)) {
|
|
1924
|
-
if (!map)
|
|
1925
|
-
continue;
|
|
1926
|
-
for (const item of map.items) {
|
|
1927
|
-
entries.set(`${String(item.key)}:${catalog}`, item);
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
if (entries.size === 0)
|
|
1931
|
-
return {};
|
|
1932
|
-
const dirs = parsed.packages ? tinyglobby.globSync(parsed.packages, {
|
|
1933
|
-
cwd: root,
|
|
1934
|
-
dot: false,
|
|
1935
|
-
ignore: [
|
|
1936
|
-
"**/node_modules/**",
|
|
1937
|
-
"**/dist/**",
|
|
1938
|
-
"**/build/**",
|
|
1939
|
-
"**/dist/**",
|
|
1940
|
-
"**/dist/**"
|
|
1941
|
-
],
|
|
1942
|
-
absolute: true,
|
|
1943
|
-
expandDirectories: false,
|
|
1944
|
-
onlyDirectories: true
|
|
1945
|
-
}) : [];
|
|
1946
|
-
dirs.push(root);
|
|
1947
|
-
const packages = dirs.map((dir) => pathe.resolve(dir, "package.json")).filter((x) => fs.existsSync(x)).sort();
|
|
1948
|
-
const FIELDS2 = [
|
|
1949
|
-
"dependencies",
|
|
1950
|
-
"devDependencies",
|
|
1951
|
-
"peerDependencies",
|
|
1952
|
-
"optionalDependencies",
|
|
1953
|
-
"overrides",
|
|
1954
|
-
"resolutions",
|
|
1955
|
-
"pnpm.overrides"
|
|
1956
|
-
];
|
|
1957
|
-
for (const path23 of packages) {
|
|
1958
|
-
const pkg = JSON.parse(fs.readFileSync(path23, "utf-8"));
|
|
1959
|
-
for (const field of FIELDS2) {
|
|
1960
|
-
const map = getObjectPath2(pkg, field.split("."));
|
|
1961
|
-
if (!map)
|
|
1962
|
-
continue;
|
|
1963
|
-
for (const [name3, value] of Object.entries(map)) {
|
|
1964
|
-
if (!value.startsWith("catalog:"))
|
|
1965
|
-
continue;
|
|
1966
|
-
const catalog = value.slice(8) || "default";
|
|
1967
|
-
const key = `${name3}:${catalog}`;
|
|
1968
|
-
entries.delete(key);
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
if (entries.size > 0) {
|
|
1973
|
-
for (const [key, value] of Array.from(entries.entries()).sort((a, b) => a[0].localeCompare(b[0]))) {
|
|
1974
|
-
const start = context.sourceCode.getLocFromIndex(value.key.range[0]);
|
|
1975
|
-
const end = context.sourceCode.getLocFromIndex(value.value.range.at(-1));
|
|
1976
|
-
context.report({
|
|
1977
|
-
loc: {
|
|
1978
|
-
start,
|
|
1979
|
-
end
|
|
1980
|
-
},
|
|
1981
|
-
messageId: "unusedCatalogItem",
|
|
1982
|
-
data: { catalogItem: key }
|
|
1983
|
-
});
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
return {};
|
|
1987
|
-
}
|
|
1988
|
-
});
|
|
1989
|
-
rules$1 = {
|
|
1990
|
-
"yaml-no-unused-catalog-item": noUnusedCatalogItem,
|
|
1991
|
-
"yaml-no-duplicate-catalog-item": noDuplicateCatalogItem
|
|
1992
|
-
};
|
|
1993
|
-
rules4 = {
|
|
1994
|
-
...rules$2,
|
|
1995
|
-
...rules$1
|
|
1996
|
-
};
|
|
1997
|
-
plugin4 = {
|
|
1272
|
+
|
|
1273
|
+
// ../eslint-plugin-bun/src/plugin.ts
|
|
1274
|
+
var plugin2;
|
|
1275
|
+
var init_plugin = __esm({
|
|
1276
|
+
"../eslint-plugin-bun/src/plugin.ts"() {
|
|
1277
|
+
init_cjs_shims();
|
|
1278
|
+
init_package();
|
|
1279
|
+
init_json_enforce_catalog();
|
|
1280
|
+
init_json_no_duplicate_catalog_item();
|
|
1281
|
+
init_json_no_unused_catalog_item();
|
|
1282
|
+
init_json_valid_catalog();
|
|
1283
|
+
plugin2 = {
|
|
1998
1284
|
meta: {
|
|
1999
|
-
name:
|
|
2000
|
-
version:
|
|
1285
|
+
name: "bun",
|
|
1286
|
+
version: package_default2.version
|
|
2001
1287
|
},
|
|
2002
|
-
rules:
|
|
1288
|
+
rules: {
|
|
1289
|
+
"json-enforce-catalog": json_enforce_catalog_default,
|
|
1290
|
+
"json-valid-catalog": json_valid_catalog_default,
|
|
1291
|
+
"json-no-unused-catalog-item": json_no_unused_catalog_item_default,
|
|
1292
|
+
"json-no-duplicate-catalog-item": json_no_duplicate_catalog_item_default
|
|
1293
|
+
}
|
|
2003
1294
|
};
|
|
2004
|
-
|
|
1295
|
+
}
|
|
1296
|
+
});
|
|
1297
|
+
var config3, recommended_default2;
|
|
1298
|
+
var init_recommended = __esm({
|
|
1299
|
+
"../eslint-plugin-bun/src/configs/recommended.ts"() {
|
|
1300
|
+
init_cjs_shims();
|
|
1301
|
+
init_globs();
|
|
1302
|
+
init_plugin();
|
|
1303
|
+
config3 = [
|
|
2005
1304
|
{
|
|
2006
|
-
name: "
|
|
2007
|
-
files: [
|
|
2008
|
-
"package.json",
|
|
2009
|
-
"**/package.json"
|
|
2010
|
-
],
|
|
2011
|
-
languageOptions: {
|
|
2012
|
-
parser: parserJsonc__namespace
|
|
2013
|
-
},
|
|
1305
|
+
name: "bun/recommended/setup",
|
|
2014
1306
|
plugins: {
|
|
2015
|
-
|
|
2016
|
-
},
|
|
2017
|
-
rules: {
|
|
2018
|
-
"pnpm/json-enforce-catalog": "error",
|
|
2019
|
-
"pnpm/json-valid-catalog": "error",
|
|
2020
|
-
"pnpm/json-prefer-workspace-settings": "error"
|
|
1307
|
+
bun: plugin2
|
|
2021
1308
|
}
|
|
2022
|
-
}
|
|
2023
|
-
];
|
|
2024
|
-
configsYaml = [
|
|
1309
|
+
},
|
|
2025
1310
|
{
|
|
2026
|
-
name: "
|
|
2027
|
-
|
|
1311
|
+
name: "bun/recommended/package-json",
|
|
1312
|
+
ignores: GLOB_EXCLUDE,
|
|
1313
|
+
files: ["package.json", "**/package.json"],
|
|
2028
1314
|
languageOptions: {
|
|
2029
|
-
parser:
|
|
2030
|
-
},
|
|
2031
|
-
plugins: {
|
|
2032
|
-
pnpm: plugin4
|
|
1315
|
+
parser: parserJsonc__default.default
|
|
2033
1316
|
},
|
|
2034
1317
|
rules: {
|
|
2035
|
-
"
|
|
2036
|
-
|
|
1318
|
+
"bun/json-enforce-catalog": [
|
|
1319
|
+
"error",
|
|
1320
|
+
{
|
|
1321
|
+
autofix: true,
|
|
1322
|
+
allowedProtocols: ["workspace", "link", "file"],
|
|
1323
|
+
defaultCatalog: "default",
|
|
1324
|
+
reuseExistingCatalog: true,
|
|
1325
|
+
conflicts: "overrides",
|
|
1326
|
+
fields: ["dependencies", "devDependencies"],
|
|
1327
|
+
ignore: ["typescript"]
|
|
1328
|
+
}
|
|
1329
|
+
],
|
|
1330
|
+
"bun/json-valid-catalog": "error",
|
|
1331
|
+
"bun/json-no-unused-catalog-item": "error",
|
|
1332
|
+
"bun/json-no-duplicate-catalog-item": "error"
|
|
2037
1333
|
}
|
|
2038
1334
|
}
|
|
2039
1335
|
];
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
1336
|
+
recommended_default2 = config3;
|
|
1337
|
+
}
|
|
1338
|
+
});
|
|
1339
|
+
|
|
1340
|
+
// ../eslint-plugin-bun/src/configs/index.ts
|
|
1341
|
+
var configs2;
|
|
1342
|
+
var init_configs = __esm({
|
|
1343
|
+
"../eslint-plugin-bun/src/configs/index.ts"() {
|
|
1344
|
+
init_cjs_shims();
|
|
1345
|
+
init_recommended();
|
|
1346
|
+
configs2 = {
|
|
1347
|
+
recommended: recommended_default2
|
|
1348
|
+
};
|
|
1349
|
+
}
|
|
1350
|
+
});
|
|
1351
|
+
|
|
1352
|
+
// ../eslint-plugin-bun/src/index.ts
|
|
1353
|
+
var src_exports = {};
|
|
1354
|
+
__export(src_exports, {
|
|
1355
|
+
configs: () => configs2,
|
|
1356
|
+
default: () => src_default2,
|
|
1357
|
+
rules: () => rules2
|
|
1358
|
+
});
|
|
1359
|
+
var eslintPlugin2, src_default2, rules2;
|
|
1360
|
+
var init_src = __esm({
|
|
1361
|
+
"../eslint-plugin-bun/src/index.ts"() {
|
|
1362
|
+
init_cjs_shims();
|
|
1363
|
+
init_configs();
|
|
1364
|
+
init_plugin();
|
|
1365
|
+
eslintPlugin2 = {
|
|
1366
|
+
...plugin2,
|
|
1367
|
+
configs: configs2
|
|
2048
1368
|
};
|
|
2049
|
-
|
|
1369
|
+
src_default2 = eslintPlugin2;
|
|
1370
|
+
rules2 = plugin2.rules;
|
|
2050
1371
|
}
|
|
2051
1372
|
});
|
|
2052
1373
|
|
|
@@ -2056,7 +1377,7 @@ var init_package2 = __esm({
|
|
|
2056
1377
|
"../eslint-plugin-pnpm/package.json"() {
|
|
2057
1378
|
package_default3 = {
|
|
2058
1379
|
name: "@storm-software/eslint-plugin-pnpm",
|
|
2059
|
-
version: "0.0.
|
|
1380
|
+
version: "0.0.79",
|
|
2060
1381
|
private: false,
|
|
2061
1382
|
description: "An ESLint Plugin that enforces PNPM-related rules in Storm Software projects.",
|
|
2062
1383
|
keywords: [
|
|
@@ -2161,16 +1482,13 @@ var init_package2 = __esm({
|
|
|
2161
1482
|
};
|
|
2162
1483
|
}
|
|
2163
1484
|
});
|
|
2164
|
-
|
|
2165
|
-
// ../eslint-plugin-pnpm/src/plugin.ts
|
|
2166
|
-
var plugin5;
|
|
1485
|
+
var plugin4;
|
|
2167
1486
|
var init_plugin2 = __esm({
|
|
2168
1487
|
"../eslint-plugin-pnpm/src/plugin.ts"() {
|
|
2169
1488
|
init_cjs_shims();
|
|
2170
|
-
init_dist();
|
|
2171
1489
|
init_package2();
|
|
2172
|
-
|
|
2173
|
-
...
|
|
1490
|
+
plugin4 = {
|
|
1491
|
+
...base__default.default,
|
|
2174
1492
|
meta: {
|
|
2175
1493
|
name: "pnpm",
|
|
2176
1494
|
version: package_default3.version
|
|
@@ -2188,7 +1506,7 @@ var init_recommended2 = __esm({
|
|
|
2188
1506
|
{
|
|
2189
1507
|
name: "pnpm/recommended/setup",
|
|
2190
1508
|
plugins: {
|
|
2191
|
-
pnpm:
|
|
1509
|
+
pnpm: plugin4
|
|
2192
1510
|
}
|
|
2193
1511
|
},
|
|
2194
1512
|
{
|
|
@@ -2196,7 +1514,7 @@ var init_recommended2 = __esm({
|
|
|
2196
1514
|
ignores: GLOB_EXCLUDE,
|
|
2197
1515
|
files: ["package.json", "**/package.json"],
|
|
2198
1516
|
languageOptions: {
|
|
2199
|
-
parser:
|
|
1517
|
+
parser: parserJsonc__default.default
|
|
2200
1518
|
},
|
|
2201
1519
|
rules: {
|
|
2202
1520
|
"pnpm/json-enforce-catalog": [
|
|
@@ -2219,7 +1537,7 @@ var init_recommended2 = __esm({
|
|
|
2219
1537
|
ignores: GLOB_EXCLUDE,
|
|
2220
1538
|
files: ["pnpm-workspace.yaml", "**/pnpm-workspace.yaml"],
|
|
2221
1539
|
languageOptions: {
|
|
2222
|
-
parser:
|
|
1540
|
+
parser: parserYaml__default.default
|
|
2223
1541
|
},
|
|
2224
1542
|
rules: {
|
|
2225
1543
|
"pnpm/yaml-no-unused-catalog-item": "error",
|
|
@@ -2232,12 +1550,12 @@ var init_recommended2 = __esm({
|
|
|
2232
1550
|
});
|
|
2233
1551
|
|
|
2234
1552
|
// ../eslint-plugin-pnpm/src/configs/index.ts
|
|
2235
|
-
var
|
|
1553
|
+
var configs4;
|
|
2236
1554
|
var init_configs2 = __esm({
|
|
2237
1555
|
"../eslint-plugin-pnpm/src/configs/index.ts"() {
|
|
2238
1556
|
init_cjs_shims();
|
|
2239
1557
|
init_recommended2();
|
|
2240
|
-
|
|
1558
|
+
configs4 = {
|
|
2241
1559
|
recommended: recommended_default5
|
|
2242
1560
|
};
|
|
2243
1561
|
}
|
|
@@ -2246,22 +1564,22 @@ var init_configs2 = __esm({
|
|
|
2246
1564
|
// ../eslint-plugin-pnpm/src/index.ts
|
|
2247
1565
|
var src_exports2 = {};
|
|
2248
1566
|
__export(src_exports2, {
|
|
2249
|
-
configs: () =>
|
|
1567
|
+
configs: () => configs4,
|
|
2250
1568
|
default: () => src_default3,
|
|
2251
|
-
rules: () =>
|
|
1569
|
+
rules: () => rules4
|
|
2252
1570
|
});
|
|
2253
|
-
var eslintPlugin3, src_default3,
|
|
1571
|
+
var eslintPlugin3, src_default3, rules4;
|
|
2254
1572
|
var init_src2 = __esm({
|
|
2255
1573
|
"../eslint-plugin-pnpm/src/index.ts"() {
|
|
2256
1574
|
init_cjs_shims();
|
|
2257
1575
|
init_configs2();
|
|
2258
1576
|
init_plugin2();
|
|
2259
1577
|
eslintPlugin3 = {
|
|
2260
|
-
...
|
|
2261
|
-
configs:
|
|
1578
|
+
...plugin4,
|
|
1579
|
+
configs: configs4
|
|
2262
1580
|
};
|
|
2263
1581
|
src_default3 = eslintPlugin3;
|
|
2264
|
-
|
|
1582
|
+
rules4 = plugin4.rules;
|
|
2265
1583
|
}
|
|
2266
1584
|
});
|
|
2267
1585
|
|
|
@@ -2833,9 +2151,9 @@ var require_stylesheet = __commonJS({
|
|
|
2833
2151
|
},
|
|
2834
2152
|
getStyleReferenceFromExpression: function(node2) {
|
|
2835
2153
|
const result = [];
|
|
2836
|
-
const
|
|
2837
|
-
if (
|
|
2838
|
-
result.push(
|
|
2154
|
+
const name2 = astHelpers.getObjectName(node2);
|
|
2155
|
+
if (name2) {
|
|
2156
|
+
result.push(name2);
|
|
2839
2157
|
}
|
|
2840
2158
|
const property = astHelpers.getPropertyName(node2);
|
|
2841
2159
|
if (property) {
|
|
@@ -3231,10 +2549,10 @@ var require_split_platform_components = __commonJS({
|
|
|
3231
2549
|
return node2.name;
|
|
3232
2550
|
}
|
|
3233
2551
|
}
|
|
3234
|
-
function hasNodeWithName(nodes,
|
|
2552
|
+
function hasNodeWithName(nodes, name2) {
|
|
3235
2553
|
return nodes.some((node2) => {
|
|
3236
2554
|
const nodeName = getName(node2);
|
|
3237
|
-
return nodeName && nodeName.includes(
|
|
2555
|
+
return nodeName && nodeName.includes(name2);
|
|
3238
2556
|
});
|
|
3239
2557
|
}
|
|
3240
2558
|
function reportErrors(components, filename) {
|
|
@@ -3316,8 +2634,8 @@ var require_no_raw_text = __commonJS({
|
|
|
3316
2634
|
let curNode = parent;
|
|
3317
2635
|
while (curNode) {
|
|
3318
2636
|
if (curNode.type === "JSXElement") {
|
|
3319
|
-
const
|
|
3320
|
-
if (allowedElements.includes(
|
|
2637
|
+
const name2 = elementName(curNode);
|
|
2638
|
+
if (allowedElements.includes(name2)) {
|
|
3321
2639
|
return true;
|
|
3322
2640
|
}
|
|
3323
2641
|
}
|
|
@@ -3489,10 +2807,10 @@ var require_eslint_plugin_react_native = __commonJS({
|
|
|
3489
2807
|
"no-raw-text": require_no_raw_text(),
|
|
3490
2808
|
"no-single-element-style-arrays": require_no_single_element_style_arrays()
|
|
3491
2809
|
};
|
|
3492
|
-
function configureAsError(
|
|
2810
|
+
function configureAsError(rules6) {
|
|
3493
2811
|
const result = {};
|
|
3494
|
-
for (const key in
|
|
3495
|
-
if (!
|
|
2812
|
+
for (const key in rules6) {
|
|
2813
|
+
if (!rules6.hasOwnProperty(key)) {
|
|
3496
2814
|
continue;
|
|
3497
2815
|
}
|
|
3498
2816
|
result["react-native/" + key] = 2;
|
|
@@ -3534,547 +2852,13 @@ var require_eslint_plugin_react_native = __commonJS({
|
|
|
3534
2852
|
}
|
|
3535
2853
|
});
|
|
3536
2854
|
|
|
3537
|
-
// ../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=c262176eba68bfd8898c896d48ca12af2147a650ca7a9cbfe8edf1cf981cdbc9/node_modules/eslint-plugin-tsdoc/lib/Debug.js
|
|
3538
|
-
var require_Debug = __commonJS({
|
|
3539
|
-
"../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=c262176eba68bfd8898c896d48ca12af2147a650ca7a9cbfe8edf1cf981cdbc9/node_modules/eslint-plugin-tsdoc/lib/Debug.js"(exports) {
|
|
3540
|
-
init_cjs_shims();
|
|
3541
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3542
|
-
exports.Debug = void 0;
|
|
3543
|
-
var Debug = class {
|
|
3544
|
-
// To debug the plugin, temporarily uncomment the body of this function
|
|
3545
|
-
static log(message2) {
|
|
3546
|
-
}
|
|
3547
|
-
};
|
|
3548
|
-
exports.Debug = Debug;
|
|
3549
|
-
}
|
|
3550
|
-
});
|
|
3551
|
-
|
|
3552
|
-
// ../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=c262176eba68bfd8898c896d48ca12af2147a650ca7a9cbfe8edf1cf981cdbc9/node_modules/eslint-plugin-tsdoc/lib/ConfigCache.js
|
|
3553
|
-
var require_ConfigCache = __commonJS({
|
|
3554
|
-
"../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=c262176eba68bfd8898c896d48ca12af2147a650ca7a9cbfe8edf1cf981cdbc9/node_modules/eslint-plugin-tsdoc/lib/ConfigCache.js"(exports) {
|
|
3555
|
-
init_cjs_shims();
|
|
3556
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
3557
|
-
if (k2 === void 0) k2 = k;
|
|
3558
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3559
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3560
|
-
desc = { enumerable: true, get: function() {
|
|
3561
|
-
return m[k];
|
|
3562
|
-
} };
|
|
3563
|
-
}
|
|
3564
|
-
Object.defineProperty(o, k2, desc);
|
|
3565
|
-
}) : (function(o, m, k, k2) {
|
|
3566
|
-
if (k2 === void 0) k2 = k;
|
|
3567
|
-
o[k2] = m[k];
|
|
3568
|
-
}));
|
|
3569
|
-
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
3570
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
3571
|
-
}) : function(o, v) {
|
|
3572
|
-
o["default"] = v;
|
|
3573
|
-
});
|
|
3574
|
-
var __importStar = exports && exports.__importStar || function(mod) {
|
|
3575
|
-
if (mod && mod.__esModule) return mod;
|
|
3576
|
-
var result = {};
|
|
3577
|
-
if (mod != null) {
|
|
3578
|
-
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
3579
|
-
}
|
|
3580
|
-
__setModuleDefault(result, mod);
|
|
3581
|
-
return result;
|
|
3582
|
-
};
|
|
3583
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3584
|
-
exports.ConfigCache = void 0;
|
|
3585
|
-
var tsdoc_config_1 = __require("@microsoft/tsdoc-config");
|
|
3586
|
-
var path23 = __importStar(__require("path"));
|
|
3587
|
-
var Debug_1 = require_Debug();
|
|
3588
|
-
function _nullishCoalesce(lhs, rhsFn) {
|
|
3589
|
-
if (lhs != null) {
|
|
3590
|
-
return lhs;
|
|
3591
|
-
} else {
|
|
3592
|
-
return rhsFn();
|
|
3593
|
-
}
|
|
3594
|
-
}
|
|
3595
|
-
var _fs = __require("fs");
|
|
3596
|
-
var _path = __require("path");
|
|
3597
|
-
var MAX_PATH_SEARCH_DEPTH3 = 30;
|
|
3598
|
-
var depth3 = 0;
|
|
3599
|
-
var ROOT_FILES = [
|
|
3600
|
-
"storm-workspace.json",
|
|
3601
|
-
"storm-workspace.json",
|
|
3602
|
-
"storm-workspace.yaml",
|
|
3603
|
-
"storm-workspace.yml",
|
|
3604
|
-
"storm-workspace.js",
|
|
3605
|
-
"storm-workspace.ts",
|
|
3606
|
-
".storm-workspace.json",
|
|
3607
|
-
".storm-workspace.yaml",
|
|
3608
|
-
".storm-workspace.yml",
|
|
3609
|
-
".storm-workspace.js",
|
|
3610
|
-
".storm-workspace.ts",
|
|
3611
|
-
"lerna.json",
|
|
3612
|
-
"nx.json",
|
|
3613
|
-
"turbo.json",
|
|
3614
|
-
"npm-workspace.json",
|
|
3615
|
-
"yarn-workspace.json",
|
|
3616
|
-
"pnpm-workspace.json",
|
|
3617
|
-
"npm-workspace.yaml",
|
|
3618
|
-
"yarn-workspace.yaml",
|
|
3619
|
-
"pnpm-workspace.yaml",
|
|
3620
|
-
"npm-workspace.yml",
|
|
3621
|
-
"yarn-workspace.yml",
|
|
3622
|
-
"pnpm-workspace.yml",
|
|
3623
|
-
"npm-lock.json",
|
|
3624
|
-
"yarn-lock.json",
|
|
3625
|
-
"pnpm-lock.json",
|
|
3626
|
-
"npm-lock.yaml",
|
|
3627
|
-
"yarn-lock.yaml",
|
|
3628
|
-
"pnpm-lock.yaml",
|
|
3629
|
-
"npm-lock.yml",
|
|
3630
|
-
"yarn-lock.yml",
|
|
3631
|
-
"pnpm-lock.yml",
|
|
3632
|
-
"bun.lockb"
|
|
3633
|
-
];
|
|
3634
|
-
var ROOT_DIRECTORIES = [
|
|
3635
|
-
".storm-workspace",
|
|
3636
|
-
".nx",
|
|
3637
|
-
".github",
|
|
3638
|
-
".vscode",
|
|
3639
|
-
".verdaccio"
|
|
3640
|
-
];
|
|
3641
|
-
function findWorkspaceRoot3(startPath) {
|
|
3642
|
-
const _startPath = _nullishCoalesce(startPath, () => process.cwd());
|
|
3643
|
-
if (ROOT_DIRECTORIES.some(
|
|
3644
|
-
(endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName))
|
|
3645
|
-
)) {
|
|
3646
|
-
return _startPath;
|
|
3647
|
-
}
|
|
3648
|
-
if (ROOT_FILES.some(
|
|
3649
|
-
(endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName))
|
|
3650
|
-
)) {
|
|
3651
|
-
return _startPath;
|
|
3652
|
-
}
|
|
3653
|
-
if (_startPath !== "/" && depth3++ < MAX_PATH_SEARCH_DEPTH3) {
|
|
3654
|
-
const parent = _path.join.call(void 0, _startPath, "..");
|
|
3655
|
-
return findWorkspaceRoot3(parent);
|
|
3656
|
-
}
|
|
3657
|
-
return void 0;
|
|
3658
|
-
}
|
|
3659
|
-
var CACHE_CHECK_INTERVAL_MS = 3 * 1e3;
|
|
3660
|
-
var CACHE_EXPIRE_MS = 20 * 1e3;
|
|
3661
|
-
var CACHE_MAX_SIZE = 100;
|
|
3662
|
-
var ConfigCache = class _ConfigCache {
|
|
3663
|
-
/**
|
|
3664
|
-
* Node.js equivalent of performance.now().
|
|
3665
|
-
*/
|
|
3666
|
-
static _getTimeInMs() {
|
|
3667
|
-
const [seconds, nanoseconds] = process.hrtime();
|
|
3668
|
-
return seconds * 1e3 + nanoseconds / 1e6;
|
|
3669
|
-
}
|
|
3670
|
-
static getForSourceFile(sourceFilePath, tsConfigRootDir) {
|
|
3671
|
-
const sourceFileFolder = path23.dirname(path23.resolve(sourceFilePath));
|
|
3672
|
-
const configFilePath = tsConfigRootDir ? path23.join(tsConfigRootDir, tsdoc_config_1.TSDocConfigFile.FILENAME) : tsdoc_config_1.TSDocConfigFile.findConfigPathForFolder(sourceFileFolder);
|
|
3673
|
-
const cacheKey = configFilePath || sourceFileFolder + "/";
|
|
3674
|
-
Debug_1.Debug.log(`Cache key: "${cacheKey}"`);
|
|
3675
|
-
const nowMs = _ConfigCache._getTimeInMs();
|
|
3676
|
-
let cachedConfig = void 0;
|
|
3677
|
-
cachedConfig = _ConfigCache._cachedConfigs.get(cacheKey);
|
|
3678
|
-
if (cachedConfig) {
|
|
3679
|
-
Debug_1.Debug.log("Cache hit");
|
|
3680
|
-
const loadAgeMs = nowMs - cachedConfig.loadTimeMs;
|
|
3681
|
-
const lastCheckAgeMs = nowMs - cachedConfig.lastCheckTimeMs;
|
|
3682
|
-
if (loadAgeMs > CACHE_EXPIRE_MS || loadAgeMs < 0) {
|
|
3683
|
-
Debug_1.Debug.log("Evicting because item is expired");
|
|
3684
|
-
cachedConfig = void 0;
|
|
3685
|
-
_ConfigCache._cachedConfigs.delete(cacheKey);
|
|
3686
|
-
} else if (lastCheckAgeMs > CACHE_CHECK_INTERVAL_MS || lastCheckAgeMs < 0) {
|
|
3687
|
-
Debug_1.Debug.log("Checking for modifications");
|
|
3688
|
-
cachedConfig.lastCheckTimeMs = nowMs;
|
|
3689
|
-
if (cachedConfig.configFile.checkForModifiedFiles()) {
|
|
3690
|
-
Debug_1.Debug.log("Evicting because item was modified");
|
|
3691
|
-
cachedConfig = void 0;
|
|
3692
|
-
_ConfigCache._cachedConfigs.delete(cacheKey);
|
|
3693
|
-
}
|
|
3694
|
-
}
|
|
3695
|
-
}
|
|
3696
|
-
if (!cachedConfig) {
|
|
3697
|
-
if (_ConfigCache._cachedConfigs.size > CACHE_MAX_SIZE) {
|
|
3698
|
-
Debug_1.Debug.log("Clearing cache");
|
|
3699
|
-
_ConfigCache._cachedConfigs.clear();
|
|
3700
|
-
}
|
|
3701
|
-
const configFile = tsdoc_config_1.TSDocConfigFile.loadFile(configFilePath);
|
|
3702
|
-
if (configFile.fileNotFound) {
|
|
3703
|
-
Debug_1.Debug.log(`File not found: "${configFilePath}"`);
|
|
3704
|
-
} else {
|
|
3705
|
-
Debug_1.Debug.log(`Loaded: "${configFilePath}"`);
|
|
3706
|
-
}
|
|
3707
|
-
cachedConfig = {
|
|
3708
|
-
configFile,
|
|
3709
|
-
lastCheckTimeMs: nowMs,
|
|
3710
|
-
loadTimeMs: nowMs
|
|
3711
|
-
};
|
|
3712
|
-
_ConfigCache._cachedConfigs.set(cacheKey, cachedConfig);
|
|
3713
|
-
}
|
|
3714
|
-
return cachedConfig.configFile;
|
|
3715
|
-
}
|
|
3716
|
-
static _checkConfigFilePath(workspaceRoot, configFilePath) {
|
|
3717
|
-
const workspaceRootPath = workspaceRoot ? workspaceRoot : "./";
|
|
3718
|
-
if (!configFilePath) {
|
|
3719
|
-
return void 0;
|
|
3720
|
-
}
|
|
3721
|
-
if (_fs.existsSync(configFilePath)) {
|
|
3722
|
-
return configFilePath;
|
|
3723
|
-
} else if (_fs.existsSync(
|
|
3724
|
-
path23.join(
|
|
3725
|
-
workspaceRootPath,
|
|
3726
|
-
configFilePath
|
|
3727
|
-
)
|
|
3728
|
-
)) {
|
|
3729
|
-
return path23.join(
|
|
3730
|
-
workspaceRootPath,
|
|
3731
|
-
configFilePath
|
|
3732
|
-
);
|
|
3733
|
-
} else if (_fs.existsSync(
|
|
3734
|
-
path23.join(
|
|
3735
|
-
workspaceRootPath,
|
|
3736
|
-
"node_modules",
|
|
3737
|
-
configFilePath
|
|
3738
|
-
)
|
|
3739
|
-
)) {
|
|
3740
|
-
return path23.join(
|
|
3741
|
-
workspaceRootPath,
|
|
3742
|
-
"node_modules",
|
|
3743
|
-
configFilePath
|
|
3744
|
-
);
|
|
3745
|
-
} else if (_fs.existsSync(
|
|
3746
|
-
path23.join(
|
|
3747
|
-
workspaceRootPath,
|
|
3748
|
-
"node_modules",
|
|
3749
|
-
"@storm-software",
|
|
3750
|
-
"tsdoc",
|
|
3751
|
-
configFilePath
|
|
3752
|
-
)
|
|
3753
|
-
)) {
|
|
3754
|
-
return path23.join(
|
|
3755
|
-
workspaceRootPath,
|
|
3756
|
-
"node_modules",
|
|
3757
|
-
"@storm-software",
|
|
3758
|
-
"tsdoc",
|
|
3759
|
-
configFilePath
|
|
3760
|
-
);
|
|
3761
|
-
} else if (_fs.existsSync(
|
|
3762
|
-
path23.join(
|
|
3763
|
-
workspaceRootPath,
|
|
3764
|
-
"node_modules",
|
|
3765
|
-
"@storm-software",
|
|
3766
|
-
"tsdoc",
|
|
3767
|
-
"config",
|
|
3768
|
-
configFilePath
|
|
3769
|
-
)
|
|
3770
|
-
)) {
|
|
3771
|
-
return path23.join(
|
|
3772
|
-
workspaceRootPath,
|
|
3773
|
-
"node_modules",
|
|
3774
|
-
"@storm-software",
|
|
3775
|
-
"tsdoc",
|
|
3776
|
-
"config",
|
|
3777
|
-
configFilePath
|
|
3778
|
-
);
|
|
3779
|
-
} else if (_fs.existsSync(
|
|
3780
|
-
path23.join(
|
|
3781
|
-
workspaceRootPath,
|
|
3782
|
-
"node_modules",
|
|
3783
|
-
"@storm-software",
|
|
3784
|
-
"tsdoc",
|
|
3785
|
-
"dist",
|
|
3786
|
-
configFilePath
|
|
3787
|
-
)
|
|
3788
|
-
)) {
|
|
3789
|
-
return path23.join(
|
|
3790
|
-
workspaceRootPath,
|
|
3791
|
-
"node_modules",
|
|
3792
|
-
"@storm-software",
|
|
3793
|
-
"tsdoc",
|
|
3794
|
-
"dist",
|
|
3795
|
-
configFilePath
|
|
3796
|
-
);
|
|
3797
|
-
}
|
|
3798
|
-
return void 0;
|
|
3799
|
-
}
|
|
3800
|
-
static getStormConfigFile(options) {
|
|
3801
|
-
const type = options && options.type ? options.type : "recommended";
|
|
3802
|
-
const configFile = options && options.configFile ? options.configFile : void 0;
|
|
3803
|
-
let workspaceRoot = "";
|
|
3804
|
-
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
3805
|
-
workspaceRoot = process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH;
|
|
3806
|
-
}
|
|
3807
|
-
if (!workspaceRoot) {
|
|
3808
|
-
workspaceRoot = findWorkspaceRoot3();
|
|
3809
|
-
}
|
|
3810
|
-
let currentConfigFile = process.env.STORM_TSDOC_CONFIG_FILE ? process.env.STORM_TSDOC_CONFIG_FILE : configFile;
|
|
3811
|
-
Debug_1.Debug.log(`Config file from user options: ${currentConfigFile || "(none)"}`);
|
|
3812
|
-
let configFilePath = _ConfigCache._checkConfigFilePath(
|
|
3813
|
-
workspaceRoot,
|
|
3814
|
-
currentConfigFile
|
|
3815
|
-
);
|
|
3816
|
-
if (!configFilePath) {
|
|
3817
|
-
currentConfigFile = `${((process.env.STORM_TSDOC_TYPE ? process.env.STORM_TSDOC_TYPE : type) || "recommended").replace(/\.jsonc?$/, "")}.json`;
|
|
3818
|
-
Debug_1.Debug.log(`Config file from user options not found, trying: ${currentConfigFile}`);
|
|
3819
|
-
configFilePath = _ConfigCache._checkConfigFilePath(
|
|
3820
|
-
workspaceRoot,
|
|
3821
|
-
currentConfigFile
|
|
3822
|
-
);
|
|
3823
|
-
if (!configFilePath) {
|
|
3824
|
-
configFilePath = _ConfigCache._checkConfigFilePath(
|
|
3825
|
-
workspaceRoot,
|
|
3826
|
-
"recommended.json"
|
|
3827
|
-
);
|
|
3828
|
-
if (!configFilePath) {
|
|
3829
|
-
configFilePath = _ConfigCache._checkConfigFilePath(
|
|
3830
|
-
workspaceRoot,
|
|
3831
|
-
"tsdoc.json"
|
|
3832
|
-
);
|
|
3833
|
-
}
|
|
3834
|
-
}
|
|
3835
|
-
}
|
|
3836
|
-
const cacheKey = configFilePath || "missing-config-file";
|
|
3837
|
-
Debug_1.Debug.log(`Storm Software Configuration Cache key: "${cacheKey}"`);
|
|
3838
|
-
const nowMs = _ConfigCache._getTimeInMs();
|
|
3839
|
-
let cachedConfig = void 0;
|
|
3840
|
-
cachedConfig = _ConfigCache._cachedConfigs.get(cacheKey);
|
|
3841
|
-
if (cachedConfig) {
|
|
3842
|
-
Debug_1.Debug.log("Cache hit");
|
|
3843
|
-
const loadAgeMs = nowMs - cachedConfig.loadTimeMs;
|
|
3844
|
-
const lastCheckAgeMs = nowMs - cachedConfig.lastCheckTimeMs;
|
|
3845
|
-
if (loadAgeMs > CACHE_EXPIRE_MS || loadAgeMs < 0) {
|
|
3846
|
-
Debug_1.Debug.log("Evicting because item is expired");
|
|
3847
|
-
cachedConfig = void 0;
|
|
3848
|
-
_ConfigCache._cachedConfigs.delete(cacheKey);
|
|
3849
|
-
} else if (lastCheckAgeMs > CACHE_CHECK_INTERVAL_MS || lastCheckAgeMs < 0) {
|
|
3850
|
-
Debug_1.Debug.log("Checking for modifications");
|
|
3851
|
-
cachedConfig.lastCheckTimeMs = nowMs;
|
|
3852
|
-
if (cachedConfig.configFile.checkForModifiedFiles()) {
|
|
3853
|
-
Debug_1.Debug.log("Evicting because item was modified");
|
|
3854
|
-
cachedConfig = void 0;
|
|
3855
|
-
_ConfigCache._cachedConfigs.delete(cacheKey);
|
|
3856
|
-
}
|
|
3857
|
-
}
|
|
3858
|
-
}
|
|
3859
|
-
if (!cachedConfig) {
|
|
3860
|
-
if (_ConfigCache._cachedConfigs.size > CACHE_MAX_SIZE) {
|
|
3861
|
-
Debug_1.Debug.log("Clearing cache");
|
|
3862
|
-
_ConfigCache._cachedConfigs.clear();
|
|
3863
|
-
}
|
|
3864
|
-
const configFile2 = tsdoc_config_1.TSDocConfigFile.loadFile(configFilePath);
|
|
3865
|
-
if (configFile2.fileNotFound) {
|
|
3866
|
-
Debug_1.Debug.log(`File not found: "${configFilePath}"`);
|
|
3867
|
-
} else {
|
|
3868
|
-
Debug_1.Debug.log(`Loaded: "${configFilePath}"`);
|
|
3869
|
-
}
|
|
3870
|
-
cachedConfig = {
|
|
3871
|
-
configFile: configFile2,
|
|
3872
|
-
lastCheckTimeMs: nowMs,
|
|
3873
|
-
loadTimeMs: nowMs
|
|
3874
|
-
};
|
|
3875
|
-
_ConfigCache._cachedConfigs.set(cacheKey, cachedConfig);
|
|
3876
|
-
}
|
|
3877
|
-
return cachedConfig.configFile;
|
|
3878
|
-
}
|
|
3879
|
-
};
|
|
3880
|
-
exports.ConfigCache = ConfigCache;
|
|
3881
|
-
ConfigCache._cachedConfigs = /* @__PURE__ */ new Map();
|
|
3882
|
-
ConfigCache._cachedPaths = /* @__PURE__ */ new Map();
|
|
3883
|
-
}
|
|
3884
|
-
});
|
|
3885
|
-
|
|
3886
|
-
// ../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=c262176eba68bfd8898c896d48ca12af2147a650ca7a9cbfe8edf1cf981cdbc9/node_modules/eslint-plugin-tsdoc/lib/index.js
|
|
3887
|
-
var require_lib = __commonJS({
|
|
3888
|
-
"../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=c262176eba68bfd8898c896d48ca12af2147a650ca7a9cbfe8edf1cf981cdbc9/node_modules/eslint-plugin-tsdoc/lib/index.js"(exports, module) {
|
|
3889
|
-
init_cjs_shims();
|
|
3890
|
-
var tsdoc_1 = __require("@microsoft/tsdoc");
|
|
3891
|
-
var Debug_1 = require_Debug();
|
|
3892
|
-
var ConfigCache_1 = require_ConfigCache();
|
|
3893
|
-
var tsdocMessageIds = {};
|
|
3894
|
-
var defaultTSDocConfiguration = new tsdoc_1.TSDocConfiguration();
|
|
3895
|
-
defaultTSDocConfiguration.allTsdocMessageIds.forEach((messageId) => {
|
|
3896
|
-
tsdocMessageIds[messageId] = `${messageId}: {{unformattedText}}`;
|
|
3897
|
-
});
|
|
3898
|
-
var plugin9 = {
|
|
3899
|
-
rules: {
|
|
3900
|
-
// NOTE: The actual ESLint rule name will be "tsdoc/syntax". It is calculated by deleting "eslint-plugin-"
|
|
3901
|
-
// from the NPM package name, and then appending this string.
|
|
3902
|
-
syntax: {
|
|
3903
|
-
meta: {
|
|
3904
|
-
messages: Object.assign({
|
|
3905
|
-
"error-loading-storm-config": `Error loading Storm Software's shared TSDoc config file:
|
|
3906
|
-
{{details}}
|
|
3907
|
-
|
|
3908
|
-
Please ensure "@storm-software/tsdoc" is installed in the workspace root.`,
|
|
3909
|
-
"error-loading-config-file": "Error loading TSDoc config file:\n{{details}}",
|
|
3910
|
-
"error-applying-storm-config": "Error applying Storm Software's shared TSDoc configuration: {{details}}",
|
|
3911
|
-
"error-applying-config": "Error applying TSDoc configuration: {{details}}"
|
|
3912
|
-
}, tsdocMessageIds),
|
|
3913
|
-
type: "problem",
|
|
3914
|
-
docs: {
|
|
3915
|
-
description: "Validates that TypeScript documentation comments conform to the TSDoc standard",
|
|
3916
|
-
category: "Stylistic Issues",
|
|
3917
|
-
recommended: true,
|
|
3918
|
-
url: "https://tsdoc.org/pages/packages/eslint-plugin-tsdoc"
|
|
3919
|
-
},
|
|
3920
|
-
schema: [
|
|
3921
|
-
{
|
|
3922
|
-
type: "object",
|
|
3923
|
-
properties: {
|
|
3924
|
-
type: {
|
|
3925
|
-
type: "string",
|
|
3926
|
-
enum: ["typedoc", "api-extractor", "base", "core", "callouts", "recommended"],
|
|
3927
|
-
description: "The TSDoc configuration type to use from '@storm-software/tsdoc'. Defaults to 'recommended' (@storm-software/tsdoc/recommended.json)."
|
|
3928
|
-
},
|
|
3929
|
-
configFile: {
|
|
3930
|
-
type: "string",
|
|
3931
|
-
description: "The TSDoc configuration file to use."
|
|
3932
|
-
},
|
|
3933
|
-
tsconfigRootDir: {
|
|
3934
|
-
type: "string",
|
|
3935
|
-
description: "The root directory to use when resolving the tsconfig file. This is only necessary if the tsconfig file is not located in the same directory as the source file being linted. If not provided, eslint will attempt to use the parser option 'tsconfigRootDir' if it is available."
|
|
3936
|
-
}
|
|
3937
|
-
},
|
|
3938
|
-
additionalProperties: false
|
|
3939
|
-
}
|
|
3940
|
-
]
|
|
3941
|
-
},
|
|
3942
|
-
defaultOptions: [
|
|
3943
|
-
{
|
|
3944
|
-
type: "recommended"
|
|
3945
|
-
}
|
|
3946
|
-
],
|
|
3947
|
-
create: (context) => {
|
|
3948
|
-
const tsdocConfiguration = new tsdoc_1.TSDocConfiguration();
|
|
3949
|
-
let tsConfigDir = void 0;
|
|
3950
|
-
const sourceFilePath = context.filename;
|
|
3951
|
-
Debug_1.Debug.log(`Linting: "${sourceFilePath}"`);
|
|
3952
|
-
try {
|
|
3953
|
-
let tsdocConfigFile = {};
|
|
3954
|
-
try {
|
|
3955
|
-
const userOptions = context.options ? Array.isArray(context.options) ? context.options.length > 0 ? context.options[0] : {} : context.options : {};
|
|
3956
|
-
tsConfigDir = userOptions.tsconfigRootDir;
|
|
3957
|
-
if (!tsConfigDir && context.parserOptions && context.parserOptions.tsconfigRootDir) {
|
|
3958
|
-
tsConfigDir = context.parserOptions.tsconfigRootDir;
|
|
3959
|
-
}
|
|
3960
|
-
const config7 = { type: userOptions.type || "recommended", configFile: userOptions.configFile };
|
|
3961
|
-
Debug_1.Debug.log(`Using eslint-plugin-tsdoc config: ${JSON.stringify(config7, void 0, 2)}`);
|
|
3962
|
-
tsdocConfigFile = ConfigCache_1.ConfigCache.getStormConfigFile(config7);
|
|
3963
|
-
if (!tsdocConfigFile.fileNotFound) {
|
|
3964
|
-
if (tsdocConfigFile.hasErrors) {
|
|
3965
|
-
context.report({
|
|
3966
|
-
loc: { line: 1, column: 1 },
|
|
3967
|
-
messageId: "error-loading-storm-config",
|
|
3968
|
-
data: {
|
|
3969
|
-
details: tsdocConfigFile.getErrorSummary()
|
|
3970
|
-
}
|
|
3971
|
-
});
|
|
3972
|
-
}
|
|
3973
|
-
try {
|
|
3974
|
-
tsdocConfigFile.configureParser(tsdocConfiguration);
|
|
3975
|
-
} catch (e) {
|
|
3976
|
-
context.report({
|
|
3977
|
-
loc: { line: 1, column: 1 },
|
|
3978
|
-
messageId: "error-applying-storm-config",
|
|
3979
|
-
data: {
|
|
3980
|
-
details: e.message
|
|
3981
|
-
}
|
|
3982
|
-
});
|
|
3983
|
-
}
|
|
3984
|
-
}
|
|
3985
|
-
} catch (e) {
|
|
3986
|
-
context.report({
|
|
3987
|
-
loc: { line: 1, column: 1 },
|
|
3988
|
-
messageId: "error-loading-storm-config",
|
|
3989
|
-
data: {
|
|
3990
|
-
details: `Unexpected exception: ${e.message}`
|
|
3991
|
-
}
|
|
3992
|
-
});
|
|
3993
|
-
}
|
|
3994
|
-
if (!tsdocConfigFile || tsdocConfigFile.fileNotFound || tsdocConfigFile.hasErrors) {
|
|
3995
|
-
tsdocConfigFile = ConfigCache_1.ConfigCache.getForSourceFile(sourceFilePath, tsConfigDir);
|
|
3996
|
-
if (!tsdocConfigFile.fileNotFound) {
|
|
3997
|
-
if (tsdocConfigFile.hasErrors) {
|
|
3998
|
-
context.report({
|
|
3999
|
-
loc: { line: 1, column: 1 },
|
|
4000
|
-
messageId: "error-loading-config-file",
|
|
4001
|
-
data: {
|
|
4002
|
-
details: tsdocConfigFile.getErrorSummary()
|
|
4003
|
-
}
|
|
4004
|
-
});
|
|
4005
|
-
}
|
|
4006
|
-
try {
|
|
4007
|
-
tsdocConfigFile.configureParser(tsdocConfiguration);
|
|
4008
|
-
} catch (e) {
|
|
4009
|
-
context.report({
|
|
4010
|
-
loc: { line: 1, column: 1 },
|
|
4011
|
-
messageId: "error-applying-config",
|
|
4012
|
-
data: {
|
|
4013
|
-
details: e.message
|
|
4014
|
-
}
|
|
4015
|
-
});
|
|
4016
|
-
}
|
|
4017
|
-
}
|
|
4018
|
-
}
|
|
4019
|
-
} catch (e) {
|
|
4020
|
-
context.report({
|
|
4021
|
-
loc: { line: 1, column: 1 },
|
|
4022
|
-
messageId: "error-loading-config-file",
|
|
4023
|
-
data: {
|
|
4024
|
-
details: `Unexpected exception: ${e.message}`
|
|
4025
|
-
}
|
|
4026
|
-
});
|
|
4027
|
-
}
|
|
4028
|
-
const tsdocParser = new tsdoc_1.TSDocParser(tsdocConfiguration);
|
|
4029
|
-
const sourceCode = context.sourceCode || context.getSourceCode();
|
|
4030
|
-
const checkCommentBlocks = function(node2) {
|
|
4031
|
-
for (const comment of sourceCode.getAllComments()) {
|
|
4032
|
-
if (comment.type !== "Block") {
|
|
4033
|
-
continue;
|
|
4034
|
-
}
|
|
4035
|
-
if (!comment.range) {
|
|
4036
|
-
continue;
|
|
4037
|
-
}
|
|
4038
|
-
const textRange = tsdoc_1.TextRange.fromStringRange(sourceCode.text, comment.range[0], comment.range[1]);
|
|
4039
|
-
if (textRange.length < 5) {
|
|
4040
|
-
continue;
|
|
4041
|
-
}
|
|
4042
|
-
if (textRange.buffer[textRange.pos + 2] !== "*") {
|
|
4043
|
-
continue;
|
|
4044
|
-
}
|
|
4045
|
-
const parserContext = tsdocParser.parseRange(textRange);
|
|
4046
|
-
for (const message2 of parserContext.log.messages) {
|
|
4047
|
-
context.report({
|
|
4048
|
-
loc: {
|
|
4049
|
-
start: sourceCode.getLocFromIndex(message2.textRange.pos),
|
|
4050
|
-
end: sourceCode.getLocFromIndex(message2.textRange.end)
|
|
4051
|
-
},
|
|
4052
|
-
messageId: message2.messageId,
|
|
4053
|
-
data: {
|
|
4054
|
-
unformattedText: message2.unformattedText
|
|
4055
|
-
}
|
|
4056
|
-
});
|
|
4057
|
-
}
|
|
4058
|
-
}
|
|
4059
|
-
};
|
|
4060
|
-
return {
|
|
4061
|
-
Program: checkCommentBlocks
|
|
4062
|
-
};
|
|
4063
|
-
}
|
|
4064
|
-
}
|
|
4065
|
-
}
|
|
4066
|
-
};
|
|
4067
|
-
module.exports = plugin9;
|
|
4068
|
-
}
|
|
4069
|
-
});
|
|
4070
|
-
|
|
4071
2855
|
// ../eslint-plugin-tsdoc/package.json
|
|
4072
2856
|
var package_default4;
|
|
4073
2857
|
var init_package3 = __esm({
|
|
4074
2858
|
"../eslint-plugin-tsdoc/package.json"() {
|
|
4075
2859
|
package_default4 = {
|
|
4076
2860
|
name: "@storm-software/eslint-plugin-tsdoc",
|
|
4077
|
-
version: "0.0.
|
|
2861
|
+
version: "0.0.79",
|
|
4078
2862
|
private: false,
|
|
4079
2863
|
description: "An ESLint Plugin that enforces TSDoc comments in Storm Software projects.",
|
|
4080
2864
|
keywords: [
|
|
@@ -4134,7 +2918,6 @@ var init_package3 = __esm({
|
|
|
4134
2918
|
"@microsoft/tsdoc-config": "catalog:",
|
|
4135
2919
|
"@storm-software/package-constants": "workspace:*",
|
|
4136
2920
|
"@typescript-eslint/utils": "catalog:",
|
|
4137
|
-
ajv: "catalog:",
|
|
4138
2921
|
defu: "catalog:",
|
|
4139
2922
|
"es-errors": "1.3.0",
|
|
4140
2923
|
"fast-deep-equal": "3.1.3",
|
|
@@ -4184,16 +2967,13 @@ var init_package3 = __esm({
|
|
|
4184
2967
|
};
|
|
4185
2968
|
}
|
|
4186
2969
|
});
|
|
4187
|
-
|
|
4188
|
-
// ../eslint-plugin-tsdoc/src/plugin.ts
|
|
4189
|
-
var import_eslint_plugin_tsdoc, plugin8;
|
|
2970
|
+
var plugin7;
|
|
4190
2971
|
var init_plugin3 = __esm({
|
|
4191
2972
|
"../eslint-plugin-tsdoc/src/plugin.ts"() {
|
|
4192
2973
|
init_cjs_shims();
|
|
4193
|
-
import_eslint_plugin_tsdoc = __toESM(require_lib());
|
|
4194
2974
|
init_package3();
|
|
4195
|
-
|
|
4196
|
-
...
|
|
2975
|
+
plugin7 = {
|
|
2976
|
+
...base2__default.default,
|
|
4197
2977
|
meta: {
|
|
4198
2978
|
name: "tsdoc",
|
|
4199
2979
|
version: package_default4.version
|
|
@@ -4214,7 +2994,7 @@ var init_recommended3 = __esm({
|
|
|
4214
2994
|
ignores: GLOB_EXCLUDE,
|
|
4215
2995
|
name: "tsdoc/recommended",
|
|
4216
2996
|
plugins: {
|
|
4217
|
-
tsdoc:
|
|
2997
|
+
tsdoc: plugin7
|
|
4218
2998
|
},
|
|
4219
2999
|
rules: {
|
|
4220
3000
|
"tsdoc/syntax": ["error", { type: "recommended" }]
|
|
@@ -4225,12 +3005,12 @@ var init_recommended3 = __esm({
|
|
|
4225
3005
|
});
|
|
4226
3006
|
|
|
4227
3007
|
// ../eslint-plugin-tsdoc/src/configs/index.ts
|
|
4228
|
-
var
|
|
3008
|
+
var configs6;
|
|
4229
3009
|
var init_configs3 = __esm({
|
|
4230
3010
|
"../eslint-plugin-tsdoc/src/configs/index.ts"() {
|
|
4231
3011
|
init_cjs_shims();
|
|
4232
3012
|
init_recommended3();
|
|
4233
|
-
|
|
3013
|
+
configs6 = {
|
|
4234
3014
|
recommended: recommended_default6
|
|
4235
3015
|
};
|
|
4236
3016
|
}
|
|
@@ -4239,22 +3019,22 @@ var init_configs3 = __esm({
|
|
|
4239
3019
|
// ../eslint-plugin-tsdoc/src/index.ts
|
|
4240
3020
|
var src_exports3 = {};
|
|
4241
3021
|
__export(src_exports3, {
|
|
4242
|
-
configs: () =>
|
|
3022
|
+
configs: () => configs6,
|
|
4243
3023
|
default: () => src_default4,
|
|
4244
|
-
rules: () =>
|
|
3024
|
+
rules: () => rules5
|
|
4245
3025
|
});
|
|
4246
|
-
var eslintPlugin4, src_default4,
|
|
3026
|
+
var eslintPlugin4, src_default4, rules5;
|
|
4247
3027
|
var init_src3 = __esm({
|
|
4248
3028
|
"../eslint-plugin-tsdoc/src/index.ts"() {
|
|
4249
3029
|
init_cjs_shims();
|
|
4250
3030
|
init_configs3();
|
|
4251
3031
|
init_plugin3();
|
|
4252
3032
|
eslintPlugin4 = {
|
|
4253
|
-
...
|
|
4254
|
-
configs:
|
|
3033
|
+
...plugin7,
|
|
3034
|
+
configs: configs6
|
|
4255
3035
|
};
|
|
4256
3036
|
src_default4 = eslintPlugin4;
|
|
4257
|
-
|
|
3037
|
+
rules5 = plugin7.rules;
|
|
4258
3038
|
}
|
|
4259
3039
|
});
|
|
4260
3040
|
|
|
@@ -4304,8 +3084,8 @@ async function interopDefault(m) {
|
|
|
4304
3084
|
const resolved = await m;
|
|
4305
3085
|
return resolved.default || resolved;
|
|
4306
3086
|
}
|
|
4307
|
-
function isPackageInScope(
|
|
4308
|
-
return localPkg.isPackageExists(
|
|
3087
|
+
function isPackageInScope(name2) {
|
|
3088
|
+
return localPkg.isPackageExists(name2, { paths: [scopeUrl] });
|
|
4309
3089
|
}
|
|
4310
3090
|
async function ensurePackages(packages) {
|
|
4311
3091
|
if (process2__default.default.env.CI || process2__default.default.stdout.isTTY === false || isCwdInScope === false)
|
|
@@ -4325,9 +3105,9 @@ async function ensurePackages(packages) {
|
|
|
4325
3105
|
(i) => i.installPackage(nonExistingPackages, { dev: true })
|
|
4326
3106
|
);
|
|
4327
3107
|
}
|
|
4328
|
-
function renameRules(
|
|
3108
|
+
function renameRules(rules6, map) {
|
|
4329
3109
|
return Object.fromEntries(
|
|
4330
|
-
Object.entries(
|
|
3110
|
+
Object.entries(rules6).map(([key, value]) => {
|
|
4331
3111
|
for (const [from, to] of Object.entries(map)) {
|
|
4332
3112
|
if (key.startsWith(`${from}/`))
|
|
4333
3113
|
return [to + key.slice(from.length), value];
|
|
@@ -4967,7 +3747,7 @@ init_cjs_shims();
|
|
|
4967
3747
|
init_cjs_shims();
|
|
4968
3748
|
var _a;
|
|
4969
3749
|
// @__NO_SIDE_EFFECTS__
|
|
4970
|
-
function $constructor(
|
|
3750
|
+
function $constructor(name2, initializer2, params) {
|
|
4971
3751
|
function init(inst, def) {
|
|
4972
3752
|
if (!inst._zod) {
|
|
4973
3753
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -4979,10 +3759,10 @@ function $constructor(name3, initializer2, params) {
|
|
|
4979
3759
|
enumerable: false
|
|
4980
3760
|
});
|
|
4981
3761
|
}
|
|
4982
|
-
if (inst._zod.traits.has(
|
|
3762
|
+
if (inst._zod.traits.has(name2)) {
|
|
4983
3763
|
return;
|
|
4984
3764
|
}
|
|
4985
|
-
inst._zod.traits.add(
|
|
3765
|
+
inst._zod.traits.add(name2);
|
|
4986
3766
|
initializer2(inst, def);
|
|
4987
3767
|
const proto = _.prototype;
|
|
4988
3768
|
const keys = Object.keys(proto);
|
|
@@ -4996,7 +3776,7 @@ function $constructor(name3, initializer2, params) {
|
|
|
4996
3776
|
const Parent = params?.Parent ?? Object;
|
|
4997
3777
|
class Definition extends Parent {
|
|
4998
3778
|
}
|
|
4999
|
-
Object.defineProperty(Definition, "name", { value:
|
|
3779
|
+
Object.defineProperty(Definition, "name", { value: name2 });
|
|
5000
3780
|
function _(def) {
|
|
5001
3781
|
var _a4;
|
|
5002
3782
|
const inst = params?.Parent ? new Definition() : this;
|
|
@@ -5012,10 +3792,10 @@ function $constructor(name3, initializer2, params) {
|
|
|
5012
3792
|
value: (inst) => {
|
|
5013
3793
|
if (params?.Parent && inst instanceof params.Parent)
|
|
5014
3794
|
return true;
|
|
5015
|
-
return inst?._zod?.traits?.has(
|
|
3795
|
+
return inst?._zod?.traits?.has(name2);
|
|
5016
3796
|
}
|
|
5017
3797
|
});
|
|
5018
|
-
Object.defineProperty(_, "name", { value:
|
|
3798
|
+
Object.defineProperty(_, "name", { value: name2 });
|
|
5019
3799
|
return _;
|
|
5020
3800
|
}
|
|
5021
3801
|
var $ZodAsyncError = class extends Error {
|
|
@@ -7005,7 +5785,7 @@ async function getPackageJsonConfig(root) {
|
|
|
7005
5785
|
let license = STORM_DEFAULT_LICENSE;
|
|
7006
5786
|
let homepage = void 0;
|
|
7007
5787
|
let support = void 0;
|
|
7008
|
-
let
|
|
5788
|
+
let name2 = void 0;
|
|
7009
5789
|
let namespace = void 0;
|
|
7010
5790
|
let repository = void 0;
|
|
7011
5791
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
@@ -7017,7 +5797,7 @@ async function getPackageJsonConfig(root) {
|
|
|
7017
5797
|
if (file) {
|
|
7018
5798
|
const packageJson = JSON.parse(file);
|
|
7019
5799
|
if (packageJson.name) {
|
|
7020
|
-
|
|
5800
|
+
name2 = packageJson.name;
|
|
7021
5801
|
}
|
|
7022
5802
|
if (packageJson.namespace) {
|
|
7023
5803
|
namespace = packageJson.namespace;
|
|
@@ -7046,7 +5826,7 @@ async function getPackageJsonConfig(root) {
|
|
|
7046
5826
|
}
|
|
7047
5827
|
return {
|
|
7048
5828
|
workspaceRoot,
|
|
7049
|
-
name:
|
|
5829
|
+
name: name2,
|
|
7050
5830
|
namespace,
|
|
7051
5831
|
repository,
|
|
7052
5832
|
license,
|
|
@@ -7087,7 +5867,7 @@ function applyDefaultConfig(config7) {
|
|
|
7087
5867
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
7088
5868
|
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
7089
5869
|
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
7090
|
-
const
|
|
5870
|
+
const configs7 = await Promise.all([
|
|
7091
5871
|
c12.loadConfig({
|
|
7092
5872
|
cwd: workspacePath,
|
|
7093
5873
|
packageJson: true,
|
|
@@ -7118,7 +5898,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
7118
5898
|
...options
|
|
7119
5899
|
})
|
|
7120
5900
|
]);
|
|
7121
|
-
return defu__default.default(
|
|
5901
|
+
return defu__default.default(configs7[0] ?? {}, configs7[1] ?? {});
|
|
7122
5902
|
};
|
|
7123
5903
|
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
7124
5904
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
@@ -7874,7 +6654,7 @@ init_cjs_shims();
|
|
|
7874
6654
|
|
|
7875
6655
|
// ../eslint-plugin-banner/package.json
|
|
7876
6656
|
var package_default = {
|
|
7877
|
-
version: "0.0.
|
|
6657
|
+
version: "0.0.81"};
|
|
7878
6658
|
|
|
7879
6659
|
// ../eslint-plugin-banner/src/rules/banner.ts
|
|
7880
6660
|
init_cjs_shims();
|
|
@@ -7883,7 +6663,7 @@ init_cjs_shims();
|
|
|
7883
6663
|
init_cjs_shims();
|
|
7884
6664
|
function RuleCreator(urlCreator) {
|
|
7885
6665
|
return function createNamedRule({
|
|
7886
|
-
name:
|
|
6666
|
+
name: name2,
|
|
7887
6667
|
meta: meta3,
|
|
7888
6668
|
...rule
|
|
7889
6669
|
}) {
|
|
@@ -7892,7 +6672,7 @@ function RuleCreator(urlCreator) {
|
|
|
7892
6672
|
...meta3,
|
|
7893
6673
|
docs: {
|
|
7894
6674
|
...meta3.docs,
|
|
7895
|
-
url: urlCreator(
|
|
6675
|
+
url: urlCreator(name2)
|
|
7896
6676
|
}
|
|
7897
6677
|
},
|
|
7898
6678
|
...rule
|
|
@@ -7968,12 +6748,12 @@ var ACRONYMS_LIST = [
|
|
|
7968
6748
|
|
|
7969
6749
|
// ../eslint-plugin-banner/src/helpers/get-banner.ts
|
|
7970
6750
|
function getBanner(options) {
|
|
7971
|
-
const { name:
|
|
6751
|
+
const { name: name2 } = options;
|
|
7972
6752
|
let padding = " ";
|
|
7973
|
-
for (let i = 0; i <
|
|
6753
|
+
for (let i = 0; i < name2.length + 2 && padding.length > 4; i++) {
|
|
7974
6754
|
padding = padding.slice(0, -1);
|
|
7975
6755
|
}
|
|
7976
|
-
let titleName =
|
|
6756
|
+
let titleName = name2;
|
|
7977
6757
|
if (titleName) {
|
|
7978
6758
|
if (titleName?.startsWith("@")) {
|
|
7979
6759
|
titleName = titleName.slice(1);
|
|
@@ -7989,8 +6769,8 @@ function getBanner(options) {
|
|
|
7989
6769
|
const organization = options.organization || "storm-software";
|
|
7990
6770
|
const licensing = options.licensing?.replace(/\/$/, "") || "https://stormsoftware.com/licenses";
|
|
7991
6771
|
const homepage = options.homepage || "https://stormsoftware.com";
|
|
7992
|
-
const repository = options.repository || `https://github.com/${organization}${
|
|
7993
|
-
const docs = options.docs || `https://docs.stormsoftware.com${
|
|
6772
|
+
const repository = options.repository || `https://github.com/${organization}${name2 ? `/${name2}` : ""}`;
|
|
6773
|
+
const docs = options.docs || `https://docs.stormsoftware.com${name2 ? `/projects/${name2}` : ""}`;
|
|
7994
6774
|
const formattedOrganization = (organization.charAt(0).toUpperCase() + organization.slice(1)).split("-").filter((word) => word && word.length > 0).map((word) => {
|
|
7995
6775
|
if (ACRONYMS_LIST.includes(word.toUpperCase())) {
|
|
7996
6776
|
return word.toUpperCase();
|
|
@@ -8005,7 +6785,7 @@ ${padding}\u{1F5F2} ${formattedOrganization} ${titleName ? `- ${titleName}` : ""
|
|
|
8005
6785
|
This code was released as part of ${titleName ? `the ${titleName}` : `a ${formattedOrganization}`} project. ${titleName ? titleName : "The project"}
|
|
8006
6786
|
is maintained by ${formattedOrganization} under the ${license} license, and is
|
|
8007
6787
|
free for commercial and private use. For more information, please visit
|
|
8008
|
-
our licensing page at ${licensing}/${
|
|
6788
|
+
our licensing page at ${licensing}/${name2 ? `projects/${name2}` : ""}.
|
|
8009
6789
|
|
|
8010
6790
|
Website: ${homepage}
|
|
8011
6791
|
Repository: ${repository}
|
|
@@ -8205,7 +6985,7 @@ var banner_default = createRule({
|
|
|
8205
6985
|
],
|
|
8206
6986
|
create: (context) => {
|
|
8207
6987
|
const {
|
|
8208
|
-
name:
|
|
6988
|
+
name: name2,
|
|
8209
6989
|
license,
|
|
8210
6990
|
organization,
|
|
8211
6991
|
licensing,
|
|
@@ -8217,7 +6997,7 @@ var banner_default = createRule({
|
|
|
8217
6997
|
lineEndings
|
|
8218
6998
|
} = context.options[0];
|
|
8219
6999
|
const banner2 = getBanner({
|
|
8220
|
-
name:
|
|
7000
|
+
name: name2,
|
|
8221
7001
|
license,
|
|
8222
7002
|
organization,
|
|
8223
7003
|
licensing,
|
|
@@ -8760,7 +7540,7 @@ async function bun(options = {}) {
|
|
|
8760
7540
|
"@storm-software/eslint-plugin-bun",
|
|
8761
7541
|
"jsonc-eslint-parser"
|
|
8762
7542
|
]);
|
|
8763
|
-
const [
|
|
7543
|
+
const [plugin8, parserJsonc3] = await Promise.all([
|
|
8764
7544
|
interopDefault(Promise.resolve().then(() => (init_src(), src_exports))),
|
|
8765
7545
|
interopDefault(import('jsonc-eslint-parser'))
|
|
8766
7546
|
]);
|
|
@@ -8803,20 +7583,20 @@ async function bun(options = {}) {
|
|
|
8803
7583
|
}
|
|
8804
7584
|
});
|
|
8805
7585
|
}
|
|
8806
|
-
const
|
|
7586
|
+
const configs7 = (Array.isArray(plugin8.configs?.recommended) ? plugin8.configs.recommended : [plugin8.configs?.recommended]).filter(
|
|
8807
7587
|
(config7) => config7 && typeof config7 === "object" && "name" in config7 && !config7.name?.endsWith("setup")
|
|
8808
7588
|
);
|
|
8809
|
-
const packageJsonConfig =
|
|
7589
|
+
const packageJsonConfig = configs7.find(
|
|
8810
7590
|
(config7) => config7.name?.endsWith("package-json") ?? false
|
|
8811
7591
|
);
|
|
8812
7592
|
return [
|
|
8813
7593
|
{
|
|
8814
7594
|
name: "storm/bun/setup",
|
|
8815
7595
|
plugins: {
|
|
8816
|
-
bun:
|
|
7596
|
+
bun: plugin8
|
|
8817
7597
|
}
|
|
8818
7598
|
},
|
|
8819
|
-
...
|
|
7599
|
+
...configs7.map((config7) => ({
|
|
8820
7600
|
name: config7.name,
|
|
8821
7601
|
...config7
|
|
8822
7602
|
})),
|
|
@@ -9040,7 +7820,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
9040
7820
|
options.dprintOptions ?? {}
|
|
9041
7821
|
);
|
|
9042
7822
|
const pluginFormat = await interopDefault(import('eslint-plugin-format'));
|
|
9043
|
-
const
|
|
7823
|
+
const configs7 = [
|
|
9044
7824
|
{
|
|
9045
7825
|
name: "storm/formatter/setup",
|
|
9046
7826
|
plugins: {
|
|
@@ -9049,7 +7829,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
9049
7829
|
}
|
|
9050
7830
|
];
|
|
9051
7831
|
if (options.css) {
|
|
9052
|
-
|
|
7832
|
+
configs7.push(
|
|
9053
7833
|
{
|
|
9054
7834
|
files: [GLOB_CSS, GLOB_POSTCSS],
|
|
9055
7835
|
languageOptions: {
|
|
@@ -9098,7 +7878,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
9098
7878
|
);
|
|
9099
7879
|
}
|
|
9100
7880
|
if (options.html) {
|
|
9101
|
-
|
|
7881
|
+
configs7.push({
|
|
9102
7882
|
files: [GLOB_HTML],
|
|
9103
7883
|
languageOptions: {
|
|
9104
7884
|
parser: parserPlain
|
|
@@ -9115,7 +7895,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
9115
7895
|
});
|
|
9116
7896
|
}
|
|
9117
7897
|
if (options.xml) {
|
|
9118
|
-
|
|
7898
|
+
configs7.push({
|
|
9119
7899
|
files: [GLOB_XML],
|
|
9120
7900
|
languageOptions: {
|
|
9121
7901
|
parser: parserPlain
|
|
@@ -9136,7 +7916,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
9136
7916
|
});
|
|
9137
7917
|
}
|
|
9138
7918
|
if (options.svg) {
|
|
9139
|
-
|
|
7919
|
+
configs7.push({
|
|
9140
7920
|
files: [GLOB_SVG],
|
|
9141
7921
|
languageOptions: {
|
|
9142
7922
|
parser: parserPlain
|
|
@@ -9158,7 +7938,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
9158
7938
|
}
|
|
9159
7939
|
if (options.markdown) {
|
|
9160
7940
|
const formater = options.markdown === true ? "prettier" : options.markdown;
|
|
9161
|
-
|
|
7941
|
+
configs7.push({
|
|
9162
7942
|
files: [GLOB_MARKDOWN],
|
|
9163
7943
|
languageOptions: {
|
|
9164
7944
|
parser: parserPlain
|
|
@@ -9179,7 +7959,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
9179
7959
|
});
|
|
9180
7960
|
}
|
|
9181
7961
|
if (options.astro) {
|
|
9182
|
-
|
|
7962
|
+
configs7.push({
|
|
9183
7963
|
files: [GLOB_ASTRO],
|
|
9184
7964
|
languageOptions: {
|
|
9185
7965
|
parser: parserPlain
|
|
@@ -9195,7 +7975,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
9195
7975
|
]
|
|
9196
7976
|
}
|
|
9197
7977
|
});
|
|
9198
|
-
|
|
7978
|
+
configs7.push({
|
|
9199
7979
|
files: [GLOB_ASTRO, GLOB_ASTRO_TS],
|
|
9200
7980
|
name: "storm/formatter/astro/disables",
|
|
9201
7981
|
rules: {
|
|
@@ -9210,7 +7990,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
9210
7990
|
});
|
|
9211
7991
|
}
|
|
9212
7992
|
if (options.graphql) {
|
|
9213
|
-
|
|
7993
|
+
configs7.push({
|
|
9214
7994
|
files: [GLOB_GRAPHQL],
|
|
9215
7995
|
languageOptions: {
|
|
9216
7996
|
parser: parserPlain
|
|
@@ -9226,7 +8006,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
9226
8006
|
}
|
|
9227
8007
|
});
|
|
9228
8008
|
}
|
|
9229
|
-
return
|
|
8009
|
+
return configs7;
|
|
9230
8010
|
}
|
|
9231
8011
|
|
|
9232
8012
|
// src/configs/graphql.ts
|
|
@@ -9754,13 +8534,13 @@ var docsUrl = (ruleName, commitish = `v${version2}`) => `${repoUrl}/blob/${commi
|
|
|
9754
8534
|
|
|
9755
8535
|
// ../../node_modules/.pnpm/eslint-plugin-import-x@4.17.1_patch_hash=2fde63e367ada6ae348459ff5a2b0bbc53a12189dad6a5_9840712109fb59ffd84be76551e40796/node_modules/eslint-plugin-import-x/lib/utils/create-rule.js
|
|
9756
8536
|
function RuleCreator3(urlCreator) {
|
|
9757
|
-
return function createNamedRule({ meta: meta3, name:
|
|
8537
|
+
return function createNamedRule({ meta: meta3, name: name2, ...rule }) {
|
|
9758
8538
|
return createRule_({
|
|
9759
8539
|
meta: {
|
|
9760
8540
|
...meta3,
|
|
9761
8541
|
docs: {
|
|
9762
8542
|
...meta3.docs,
|
|
9763
|
-
url: urlCreator(
|
|
8543
|
+
url: urlCreator(name2)
|
|
9764
8544
|
}
|
|
9765
8545
|
},
|
|
9766
8546
|
...rule
|
|
@@ -9781,9 +8561,9 @@ var createRule3 = RuleCreator3(docsUrl);
|
|
|
9781
8561
|
|
|
9782
8562
|
// ../../node_modules/.pnpm/eslint-plugin-import-x@4.17.1_patch_hash=2fde63e367ada6ae348459ff5a2b0bbc53a12189dad6a5_9840712109fb59ffd84be76551e40796/node_modules/eslint-plugin-import-x/lib/utils/declared-scope.js
|
|
9783
8563
|
init_cjs_shims();
|
|
9784
|
-
function declaredScope(context, node2,
|
|
8564
|
+
function declaredScope(context, node2, name2) {
|
|
9785
8565
|
const references = context.sourceCode.getScope(node2).references;
|
|
9786
|
-
const reference = references.find((x) => x.identifier.name ===
|
|
8566
|
+
const reference = references.find((x) => x.identifier.name === name2);
|
|
9787
8567
|
return reference?.resolved?.scope.type;
|
|
9788
8568
|
}
|
|
9789
8569
|
|
|
@@ -10078,49 +8858,49 @@ function getFilePackageName(filename) {
|
|
|
10078
8858
|
}
|
|
10079
8859
|
|
|
10080
8860
|
// ../../node_modules/.pnpm/eslint-plugin-import-x@4.17.1_patch_hash=2fde63e367ada6ae348459ff5a2b0bbc53a12189dad6a5_9840712109fb59ffd84be76551e40796/node_modules/eslint-plugin-import-x/lib/utils/import-type.js
|
|
10081
|
-
function baseModule(
|
|
10082
|
-
if (isScoped(
|
|
10083
|
-
const [scope, pkg2] =
|
|
8861
|
+
function baseModule(name2) {
|
|
8862
|
+
if (isScoped(name2)) {
|
|
8863
|
+
const [scope, pkg2] = name2.split("/");
|
|
10084
8864
|
return `${scope}/${pkg2}`;
|
|
10085
8865
|
}
|
|
10086
|
-
const [pkg] =
|
|
8866
|
+
const [pkg] = name2.split("/");
|
|
10087
8867
|
return pkg;
|
|
10088
8868
|
}
|
|
10089
|
-
function isInternalRegexMatch(
|
|
8869
|
+
function isInternalRegexMatch(name2, settings) {
|
|
10090
8870
|
const internalScope = settings?.["import-x/internal-regex"];
|
|
10091
|
-
return internalScope && new RegExp(internalScope).test(
|
|
8871
|
+
return internalScope && new RegExp(internalScope).test(name2);
|
|
10092
8872
|
}
|
|
10093
|
-
function isAbsolute3(
|
|
10094
|
-
return typeof
|
|
8873
|
+
function isAbsolute3(name2) {
|
|
8874
|
+
return typeof name2 === "string" && path16__default.default.isAbsolute(name2);
|
|
10095
8875
|
}
|
|
10096
|
-
function isBuiltIn(
|
|
10097
|
-
if (modulePath || !
|
|
8876
|
+
function isBuiltIn(name2, settings, modulePath) {
|
|
8877
|
+
if (modulePath || !name2) {
|
|
10098
8878
|
return false;
|
|
10099
8879
|
}
|
|
10100
|
-
const
|
|
8880
|
+
const base3 = baseModule(name2);
|
|
10101
8881
|
const extras = settings && settings["import-x/core-modules"] || [];
|
|
10102
|
-
return Module.isBuiltin(
|
|
8882
|
+
return Module.isBuiltin(base3) || extras.includes(base3);
|
|
10103
8883
|
}
|
|
10104
|
-
function isExternalModule(
|
|
10105
|
-
return (isModule(
|
|
8884
|
+
function isExternalModule(name2, modulePath, context) {
|
|
8885
|
+
return (isModule(name2) || isScoped(name2)) && typeTest(name2, context, modulePath) === "external";
|
|
10106
8886
|
}
|
|
10107
8887
|
var moduleRegExp = /^\w/;
|
|
10108
|
-
function isModule(
|
|
10109
|
-
return !!
|
|
8888
|
+
function isModule(name2) {
|
|
8889
|
+
return !!name2 && moduleRegExp.test(name2);
|
|
10110
8890
|
}
|
|
10111
8891
|
var scopedRegExp = /^@[^/]+\/?[^/]+/;
|
|
10112
|
-
function isScoped(
|
|
10113
|
-
return !!
|
|
8892
|
+
function isScoped(name2) {
|
|
8893
|
+
return !!name2 && scopedRegExp.test(name2);
|
|
10114
8894
|
}
|
|
10115
|
-
function isRelativeToParent(
|
|
10116
|
-
return /^\.\.$|^\.\.[/\\]/.test(
|
|
8895
|
+
function isRelativeToParent(name2) {
|
|
8896
|
+
return /^\.\.$|^\.\.[/\\]/.test(name2);
|
|
10117
8897
|
}
|
|
10118
8898
|
var indexFiles = /* @__PURE__ */ new Set([".", "./", "./index", "./index.js"]);
|
|
10119
|
-
function isIndex(
|
|
10120
|
-
return indexFiles.has(
|
|
8899
|
+
function isIndex(name2) {
|
|
8900
|
+
return indexFiles.has(name2);
|
|
10121
8901
|
}
|
|
10122
|
-
function isRelativeToSibling(
|
|
10123
|
-
return /^\.[/\\]/.test(
|
|
8902
|
+
function isRelativeToSibling(name2) {
|
|
8903
|
+
return /^\.[/\\]/.test(name2);
|
|
10124
8904
|
}
|
|
10125
8905
|
function isExternalPath(filepath, context) {
|
|
10126
8906
|
if (!filepath) {
|
|
@@ -10147,28 +8927,28 @@ function isInternalPath(filepath, context) {
|
|
|
10147
8927
|
const packagePath = getContextPackagePath(context);
|
|
10148
8928
|
return !path16__default.default.relative(packagePath, filepath).startsWith("../");
|
|
10149
8929
|
}
|
|
10150
|
-
function isExternalLookingName(
|
|
10151
|
-
return isModule(
|
|
8930
|
+
function isExternalLookingName(name2) {
|
|
8931
|
+
return isModule(name2) || isScoped(name2);
|
|
10152
8932
|
}
|
|
10153
|
-
function typeTest(
|
|
8933
|
+
function typeTest(name2, context, path23) {
|
|
10154
8934
|
const { settings } = context;
|
|
10155
|
-
if (typeof
|
|
10156
|
-
if (isInternalRegexMatch(
|
|
8935
|
+
if (typeof name2 === "string") {
|
|
8936
|
+
if (isInternalRegexMatch(name2, settings)) {
|
|
10157
8937
|
return "internal";
|
|
10158
8938
|
}
|
|
10159
|
-
if (isAbsolute3(
|
|
8939
|
+
if (isAbsolute3(name2)) {
|
|
10160
8940
|
return "absolute";
|
|
10161
8941
|
}
|
|
10162
|
-
if (isBuiltIn(
|
|
8942
|
+
if (isBuiltIn(name2, settings, path23)) {
|
|
10163
8943
|
return "builtin";
|
|
10164
8944
|
}
|
|
10165
|
-
if (isRelativeToParent(
|
|
8945
|
+
if (isRelativeToParent(name2)) {
|
|
10166
8946
|
return "parent";
|
|
10167
8947
|
}
|
|
10168
|
-
if (isIndex(
|
|
8948
|
+
if (isIndex(name2)) {
|
|
10169
8949
|
return "index";
|
|
10170
8950
|
}
|
|
10171
|
-
if (isRelativeToSibling(
|
|
8951
|
+
if (isRelativeToSibling(name2)) {
|
|
10172
8952
|
return "sibling";
|
|
10173
8953
|
}
|
|
10174
8954
|
}
|
|
@@ -10178,13 +8958,13 @@ function typeTest(name3, context, path23) {
|
|
|
10178
8958
|
if (isInternalPath(path23, context)) {
|
|
10179
8959
|
return "internal";
|
|
10180
8960
|
}
|
|
10181
|
-
if (typeof
|
|
8961
|
+
if (typeof name2 === "string" && isExternalLookingName(name2)) {
|
|
10182
8962
|
return "external";
|
|
10183
8963
|
}
|
|
10184
8964
|
return "unknown";
|
|
10185
8965
|
}
|
|
10186
|
-
function importType(
|
|
10187
|
-
return typeTest(
|
|
8966
|
+
function importType(name2, context) {
|
|
8967
|
+
return typeTest(name2, context, typeof name2 === "string" ? resolve3(name2, context) : null);
|
|
10188
8968
|
}
|
|
10189
8969
|
|
|
10190
8970
|
// ../../node_modules/.pnpm/eslint-plugin-import-x@4.17.1_patch_hash=2fde63e367ada6ae348459ff5a2b0bbc53a12189dad6a5_9840712109fb59ffd84be76551e40796/node_modules/eslint-plugin-import-x/lib/utils/legacy-resolver-settings.js
|
|
@@ -10224,32 +9004,32 @@ function normalizeConfigResolvers(resolvers, sourceFile) {
|
|
|
10224
9004
|
const map = /* @__PURE__ */ new Map();
|
|
10225
9005
|
for (const nameOrRecordOrObject of resolverArray) {
|
|
10226
9006
|
if (typeof nameOrRecordOrObject === "string") {
|
|
10227
|
-
const
|
|
10228
|
-
map.set(
|
|
10229
|
-
name:
|
|
9007
|
+
const name2 = nameOrRecordOrObject;
|
|
9008
|
+
map.set(name2, {
|
|
9009
|
+
name: name2,
|
|
10230
9010
|
enable: true,
|
|
10231
9011
|
options: void 0,
|
|
10232
|
-
resolver: requireResolver(
|
|
9012
|
+
resolver: requireResolver(name2, sourceFile)
|
|
10233
9013
|
});
|
|
10234
9014
|
} else if (typeof nameOrRecordOrObject === "object") {
|
|
10235
9015
|
if (nameOrRecordOrObject.name && nameOrRecordOrObject.resolver) {
|
|
10236
9016
|
const object2 = nameOrRecordOrObject;
|
|
10237
|
-
const { name:
|
|
10238
|
-
map.set(
|
|
9017
|
+
const { name: name2, enable = true, options, resolver } = object2;
|
|
9018
|
+
map.set(name2, { name: name2, enable, options, resolver });
|
|
10239
9019
|
} else {
|
|
10240
9020
|
const record2 = nameOrRecordOrObject;
|
|
10241
|
-
for (const [
|
|
10242
|
-
const resolver = requireResolver(
|
|
9021
|
+
for (const [name2, enableOrOptions] of Object.entries(record2)) {
|
|
9022
|
+
const resolver = requireResolver(name2, sourceFile);
|
|
10243
9023
|
if (typeof enableOrOptions === "boolean") {
|
|
10244
|
-
map.set(
|
|
10245
|
-
name:
|
|
9024
|
+
map.set(name2, {
|
|
9025
|
+
name: name2,
|
|
10246
9026
|
enable: enableOrOptions,
|
|
10247
9027
|
options: void 0,
|
|
10248
9028
|
resolver
|
|
10249
9029
|
});
|
|
10250
9030
|
} else {
|
|
10251
|
-
map.set(
|
|
10252
|
-
name:
|
|
9031
|
+
map.set(name2, {
|
|
9032
|
+
name: name2,
|
|
10253
9033
|
enable: true,
|
|
10254
9034
|
options: enableOrOptions,
|
|
10255
9035
|
resolver
|
|
@@ -10273,18 +9053,18 @@ try {
|
|
|
10273
9053
|
LEGACY_NODE_RESOLVERS.add(cjsRequire.resolve("eslint-import-resolver-node"));
|
|
10274
9054
|
} catch {
|
|
10275
9055
|
}
|
|
10276
|
-
function requireResolver(
|
|
10277
|
-
const resolver = tryRequire(`eslint-import-resolver-${
|
|
9056
|
+
function requireResolver(name2, sourceFile) {
|
|
9057
|
+
const resolver = tryRequire(`eslint-import-resolver-${name2}`, sourceFile) || tryRequire(name2, sourceFile) || tryRequire(path16__default.default.resolve(getBaseDir(sourceFile), name2));
|
|
10278
9058
|
if (!resolver) {
|
|
10279
|
-
if (LEGACY_NODE_RESOLVERS.has(
|
|
9059
|
+
if (LEGACY_NODE_RESOLVERS.has(name2)) {
|
|
10280
9060
|
return void 0;
|
|
10281
9061
|
}
|
|
10282
|
-
const err = new Error(`unable to load resolver "${
|
|
9062
|
+
const err = new Error(`unable to load resolver "${name2}".`);
|
|
10283
9063
|
err.name = IMPORT_RESOLVE_ERROR_NAME;
|
|
10284
9064
|
throw err;
|
|
10285
9065
|
}
|
|
10286
9066
|
if (!isLegacyResolverValid(resolver)) {
|
|
10287
|
-
const err = new Error(`${
|
|
9067
|
+
const err = new Error(`${name2} with invalid interface loaded as resolver`);
|
|
10288
9068
|
err.name = IMPORT_RESOLVE_ERROR_NAME;
|
|
10289
9069
|
throw err;
|
|
10290
9070
|
}
|
|
@@ -10538,11 +9318,11 @@ function fullResolve(modulePath, sourceFile, settings, context) {
|
|
|
10538
9318
|
};
|
|
10539
9319
|
const sourceFiles = context.physicalFilename === sourceFile || !isExternalLookingName(modulePath) ? [sourceFile] : [sourceFile, context.physicalFilename];
|
|
10540
9320
|
for (const sourceFile2 of sourceFiles) {
|
|
10541
|
-
for (const { enable, name:
|
|
9321
|
+
for (const { enable, name: name2, options, resolver } of normalizeConfigResolvers(configResolvers, sourceFile2)) {
|
|
10542
9322
|
if (!enable) {
|
|
10543
9323
|
continue;
|
|
10544
9324
|
}
|
|
10545
|
-
if (LEGACY_NODE_RESOLVERS.has(
|
|
9325
|
+
if (LEGACY_NODE_RESOLVERS.has(name2)) {
|
|
10546
9326
|
const resolverOptions = options || {};
|
|
10547
9327
|
const resolved2 = legacyNodeResolve(resolverOptions, context, modulePath, sourceFile2);
|
|
10548
9328
|
if (resolved2?.found) {
|
|
@@ -11072,44 +9852,44 @@ var ExportMap = class _ExportMap {
|
|
|
11072
9852
|
}
|
|
11073
9853
|
return size;
|
|
11074
9854
|
}
|
|
11075
|
-
has(
|
|
11076
|
-
if (this.namespace.has(
|
|
9855
|
+
has(name2) {
|
|
9856
|
+
if (this.namespace.has(name2)) {
|
|
11077
9857
|
return true;
|
|
11078
9858
|
}
|
|
11079
|
-
if (this.reexports.has(
|
|
9859
|
+
if (this.reexports.has(name2)) {
|
|
11080
9860
|
return true;
|
|
11081
9861
|
}
|
|
11082
|
-
if (
|
|
9862
|
+
if (name2 !== "default") {
|
|
11083
9863
|
for (const dep of this.dependencies) {
|
|
11084
9864
|
const innerMap = dep();
|
|
11085
9865
|
if (!innerMap) {
|
|
11086
9866
|
continue;
|
|
11087
9867
|
}
|
|
11088
|
-
if (innerMap.has(
|
|
9868
|
+
if (innerMap.has(name2)) {
|
|
11089
9869
|
return true;
|
|
11090
9870
|
}
|
|
11091
9871
|
}
|
|
11092
9872
|
}
|
|
11093
9873
|
return false;
|
|
11094
9874
|
}
|
|
11095
|
-
hasDeep(
|
|
11096
|
-
if (this.namespace.has(
|
|
9875
|
+
hasDeep(name2) {
|
|
9876
|
+
if (this.namespace.has(name2)) {
|
|
11097
9877
|
return { found: true, path: [this] };
|
|
11098
9878
|
}
|
|
11099
|
-
if (this.reexports.has(
|
|
11100
|
-
const reexports = this.reexports.get(
|
|
9879
|
+
if (this.reexports.has(name2)) {
|
|
9880
|
+
const reexports = this.reexports.get(name2);
|
|
11101
9881
|
const imported = reexports.getImport();
|
|
11102
9882
|
if (imported == null) {
|
|
11103
9883
|
return { found: true, path: [this] };
|
|
11104
9884
|
}
|
|
11105
|
-
if (imported.path === this.path && reexports.local ===
|
|
9885
|
+
if (imported.path === this.path && reexports.local === name2) {
|
|
11106
9886
|
return { found: false, path: [this] };
|
|
11107
9887
|
}
|
|
11108
9888
|
const deep = imported.hasDeep(reexports.local);
|
|
11109
9889
|
deep.path.unshift(this);
|
|
11110
9890
|
return deep;
|
|
11111
9891
|
}
|
|
11112
|
-
if (
|
|
9892
|
+
if (name2 !== "default") {
|
|
11113
9893
|
for (const dep of this.dependencies) {
|
|
11114
9894
|
const innerMap = dep();
|
|
11115
9895
|
if (innerMap == null) {
|
|
@@ -11121,7 +9901,7 @@ var ExportMap = class _ExportMap {
|
|
|
11121
9901
|
if (innerMap.path === this.path) {
|
|
11122
9902
|
continue;
|
|
11123
9903
|
}
|
|
11124
|
-
const innerValue = innerMap.hasDeep(
|
|
9904
|
+
const innerValue = innerMap.hasDeep(name2);
|
|
11125
9905
|
if (innerValue.found) {
|
|
11126
9906
|
innerValue.path.unshift(this);
|
|
11127
9907
|
return innerValue;
|
|
@@ -11130,22 +9910,22 @@ var ExportMap = class _ExportMap {
|
|
|
11130
9910
|
}
|
|
11131
9911
|
return { found: false, path: [this] };
|
|
11132
9912
|
}
|
|
11133
|
-
get(
|
|
11134
|
-
if (this.namespace.has(
|
|
11135
|
-
return this.namespace.get(
|
|
9913
|
+
get(name2) {
|
|
9914
|
+
if (this.namespace.has(name2)) {
|
|
9915
|
+
return this.namespace.get(name2);
|
|
11136
9916
|
}
|
|
11137
|
-
if (this.reexports.has(
|
|
11138
|
-
const reexports = this.reexports.get(
|
|
9917
|
+
if (this.reexports.has(name2)) {
|
|
9918
|
+
const reexports = this.reexports.get(name2);
|
|
11139
9919
|
const imported = reexports.getImport();
|
|
11140
9920
|
if (imported == null) {
|
|
11141
9921
|
return null;
|
|
11142
9922
|
}
|
|
11143
|
-
if (imported.path === this.path && reexports.local ===
|
|
9923
|
+
if (imported.path === this.path && reexports.local === name2) {
|
|
11144
9924
|
return void 0;
|
|
11145
9925
|
}
|
|
11146
9926
|
return imported.get(reexports.local);
|
|
11147
9927
|
}
|
|
11148
|
-
if (
|
|
9928
|
+
if (name2 !== "default") {
|
|
11149
9929
|
for (const dep of this.dependencies) {
|
|
11150
9930
|
const innerMap = dep();
|
|
11151
9931
|
if (!innerMap) {
|
|
@@ -11154,7 +9934,7 @@ var ExportMap = class _ExportMap {
|
|
|
11154
9934
|
if (innerMap.path === this.path) {
|
|
11155
9935
|
continue;
|
|
11156
9936
|
}
|
|
11157
|
-
const innerValue = innerMap.get(
|
|
9937
|
+
const innerValue = innerMap.get(name2);
|
|
11158
9938
|
if (innerValue !== void 0) {
|
|
11159
9939
|
return innerValue;
|
|
11160
9940
|
}
|
|
@@ -11165,9 +9945,9 @@ var ExportMap = class _ExportMap {
|
|
|
11165
9945
|
for (const [n, v] of this.namespace.entries()) {
|
|
11166
9946
|
callback.call(thisArg, v, n, this);
|
|
11167
9947
|
}
|
|
11168
|
-
for (const [
|
|
9948
|
+
for (const [name2, reexports] of this.reexports.entries()) {
|
|
11169
9949
|
const reexported = reexports.getImport();
|
|
11170
|
-
callback.call(thisArg, reexported?.get(reexports.local),
|
|
9950
|
+
callback.call(thisArg, reexported?.get(reexports.local), name2, this);
|
|
11171
9951
|
}
|
|
11172
9952
|
this.dependencies.forEach((dep) => {
|
|
11173
9953
|
const d = dep();
|
|
@@ -11456,7 +10236,7 @@ function moduleVisitor(visitor, options) {
|
|
|
11456
10236
|
return visitors;
|
|
11457
10237
|
}
|
|
11458
10238
|
function makeOptionsSchema(additionalProperties) {
|
|
11459
|
-
const
|
|
10239
|
+
const base3 = {
|
|
11460
10240
|
type: "object",
|
|
11461
10241
|
properties: {
|
|
11462
10242
|
commonjs: { type: "boolean" },
|
|
@@ -11472,10 +10252,10 @@ function makeOptionsSchema(additionalProperties) {
|
|
|
11472
10252
|
};
|
|
11473
10253
|
if (additionalProperties) {
|
|
11474
10254
|
for (const key in additionalProperties) {
|
|
11475
|
-
|
|
10255
|
+
base3.properties[key] = additionalProperties[key];
|
|
11476
10256
|
}
|
|
11477
10257
|
}
|
|
11478
|
-
return
|
|
10258
|
+
return base3;
|
|
11479
10259
|
}
|
|
11480
10260
|
makeOptionsSchema();
|
|
11481
10261
|
|
|
@@ -11957,12 +10737,12 @@ var export_default = createRule3({
|
|
|
11957
10737
|
defaultOptions: [],
|
|
11958
10738
|
create(context) {
|
|
11959
10739
|
const namespace = /* @__PURE__ */ new Map([[rootProgram, /* @__PURE__ */ new Map()]]);
|
|
11960
|
-
function addNamed(
|
|
10740
|
+
function addNamed(name2, node2, parent, isType) {
|
|
11961
10741
|
if (!namespace.has(parent)) {
|
|
11962
10742
|
namespace.set(parent, /* @__PURE__ */ new Map());
|
|
11963
10743
|
}
|
|
11964
10744
|
const named = namespace.get(parent);
|
|
11965
|
-
const key = isType ? `${tsTypePrefix}${
|
|
10745
|
+
const key = isType ? `${tsTypePrefix}${name2}` : name2;
|
|
11966
10746
|
let nodes = named.get(key);
|
|
11967
10747
|
if (nodes == null) {
|
|
11968
10748
|
nodes = /* @__PURE__ */ new Set();
|
|
@@ -12018,10 +10798,10 @@ var export_default = createRule3({
|
|
|
12018
10798
|
}
|
|
12019
10799
|
const parent = getParent(node2);
|
|
12020
10800
|
let any2 = false;
|
|
12021
|
-
remoteExports.$forEach((_,
|
|
12022
|
-
if (
|
|
10801
|
+
remoteExports.$forEach((_, name2) => {
|
|
10802
|
+
if (name2 !== "default") {
|
|
12023
10803
|
any2 = true;
|
|
12024
|
-
addNamed(
|
|
10804
|
+
addNamed(name2, node2, parent);
|
|
12025
10805
|
}
|
|
12026
10806
|
});
|
|
12027
10807
|
if (!any2) {
|
|
@@ -12034,7 +10814,7 @@ var export_default = createRule3({
|
|
|
12034
10814
|
},
|
|
12035
10815
|
"Program:exit"() {
|
|
12036
10816
|
for (const [, named] of namespace) {
|
|
12037
|
-
for (const [
|
|
10817
|
+
for (const [name2, nodes] of named) {
|
|
12038
10818
|
if (nodes.size === 0) {
|
|
12039
10819
|
continue;
|
|
12040
10820
|
}
|
|
@@ -12049,7 +10829,7 @@ var export_default = createRule3({
|
|
|
12049
10829
|
if (shouldSkipTypescriptNamespace(node2, nodes)) {
|
|
12050
10830
|
continue;
|
|
12051
10831
|
}
|
|
12052
|
-
if (
|
|
10832
|
+
if (name2 === "default") {
|
|
12053
10833
|
context.report({
|
|
12054
10834
|
node: node2,
|
|
12055
10835
|
messageId: "multiDefault"
|
|
@@ -12059,7 +10839,7 @@ var export_default = createRule3({
|
|
|
12059
10839
|
node: node2,
|
|
12060
10840
|
messageId: "multiNamed",
|
|
12061
10841
|
data: {
|
|
12062
|
-
name:
|
|
10842
|
+
name: name2.replace(tsTypePrefix, "")
|
|
12063
10843
|
}
|
|
12064
10844
|
});
|
|
12065
10845
|
}
|
|
@@ -14385,8 +13165,8 @@ var named_default = createRule3({
|
|
|
14385
13165
|
continue;
|
|
14386
13166
|
}
|
|
14387
13167
|
const imNode = im[key];
|
|
14388
|
-
const
|
|
14389
|
-
const deepLookup = imports2.hasDeep(
|
|
13168
|
+
const name2 = imNode.name || imNode.value;
|
|
13169
|
+
const deepLookup = imports2.hasDeep(name2);
|
|
14390
13170
|
if (!deepLookup.found) {
|
|
14391
13171
|
if (deepLookup.path.length > 1) {
|
|
14392
13172
|
const deepPath = deepLookup.path.map((i) => path16__default.default.relative(path16__default.default.dirname(context.physicalFilename), i.path)).join(" -> ");
|
|
@@ -14394,7 +13174,7 @@ var named_default = createRule3({
|
|
|
14394
13174
|
node: imNode,
|
|
14395
13175
|
messageId: "notFoundDeep",
|
|
14396
13176
|
data: {
|
|
14397
|
-
name:
|
|
13177
|
+
name: name2,
|
|
14398
13178
|
deepPath
|
|
14399
13179
|
}
|
|
14400
13180
|
});
|
|
@@ -14403,7 +13183,7 @@ var named_default = createRule3({
|
|
|
14403
13183
|
node: imNode,
|
|
14404
13184
|
messageId: "notFound",
|
|
14405
13185
|
data: {
|
|
14406
|
-
name:
|
|
13186
|
+
name: name2,
|
|
14407
13187
|
path: node2.source.value
|
|
14408
13188
|
}
|
|
14409
13189
|
});
|
|
@@ -15285,7 +14065,7 @@ var no_cycle_default = createRule3({
|
|
|
15285
14065
|
}
|
|
15286
14066
|
const options = context.options[0] || {};
|
|
15287
14067
|
const maxDepth = typeof options.maxDepth === "number" ? options.maxDepth : Number.POSITIVE_INFINITY;
|
|
15288
|
-
const ignoreModule = options.ignoreExternal ? (
|
|
14068
|
+
const ignoreModule = options.ignoreExternal ? (name2) => isExternalModule(name2, resolve3(name2, context), context) : () => false;
|
|
15289
14069
|
return {
|
|
15290
14070
|
...moduleVisitor(function checkSourceValue(sourceNode, importer) {
|
|
15291
14071
|
if (ignoreModule(sourceNode.value)) {
|
|
@@ -16115,8 +14895,8 @@ function getDependencies(context, packageDir) {
|
|
|
16115
14895
|
}
|
|
16116
14896
|
}
|
|
16117
14897
|
}
|
|
16118
|
-
function getModuleOriginalName(
|
|
16119
|
-
const [first, second] =
|
|
14898
|
+
function getModuleOriginalName(name2) {
|
|
14899
|
+
const [first, second] = name2.split("/");
|
|
16120
14900
|
return first.startsWith("@") ? `${first}/${second}` : first;
|
|
16121
14901
|
}
|
|
16122
14902
|
function checkDependencyDeclaration(deps, packageName, declarationStatus) {
|
|
@@ -16143,19 +14923,19 @@ function checkDependencyDeclaration(deps, packageName, declarationStatus) {
|
|
|
16143
14923
|
isInBundledDeps: result.isInBundledDeps || deps.bundledDependencies.includes(ancestorName)
|
|
16144
14924
|
}), newDeclarationStatus);
|
|
16145
14925
|
}
|
|
16146
|
-
function reportIfMissing(context, deps, depsOptions, node2,
|
|
14926
|
+
function reportIfMissing(context, deps, depsOptions, node2, name2, whitelist) {
|
|
16147
14927
|
if (!depsOptions.verifyTypeImports && ("importKind" in node2 && (node2.importKind === "type" || node2.importKind === "typeof") || "exportKind" in node2 && node2.exportKind === "type" || "specifiers" in node2 && Array.isArray(node2.specifiers) && node2.specifiers.length > 0 && node2.specifiers.every((specifier) => "importKind" in specifier && (specifier.importKind === "type" || specifier.importKind === "typeof")))) {
|
|
16148
14928
|
return;
|
|
16149
14929
|
}
|
|
16150
|
-
const typeOfImport = importType(
|
|
14930
|
+
const typeOfImport = importType(name2, context);
|
|
16151
14931
|
if (typeOfImport !== "external" && (typeOfImport !== "internal" || !depsOptions.verifyInternalDeps)) {
|
|
16152
14932
|
return;
|
|
16153
14933
|
}
|
|
16154
|
-
const resolved = resolve3(
|
|
14934
|
+
const resolved = resolve3(name2, context);
|
|
16155
14935
|
if (!resolved) {
|
|
16156
14936
|
return;
|
|
16157
14937
|
}
|
|
16158
|
-
const importPackageName = getModuleOriginalName(
|
|
14938
|
+
const importPackageName = getModuleOriginalName(name2);
|
|
16159
14939
|
let declarationStatus = checkDependencyDeclaration(deps, importPackageName);
|
|
16160
14940
|
if (declarationStatus.isInDeps || depsOptions.allowDevDeps && declarationStatus.isInDevDeps || depsOptions.allowPeerDeps && declarationStatus.isInPeerDeps || depsOptions.allowOptDeps && declarationStatus.isInOptDeps || depsOptions.allowBundledDeps && declarationStatus.isInBundledDeps) {
|
|
16161
14941
|
return;
|
|
@@ -16490,9 +15270,9 @@ var no_mutable_exports_default = createRule3({
|
|
|
16490
15270
|
});
|
|
16491
15271
|
}
|
|
16492
15272
|
}
|
|
16493
|
-
function checkDeclarationsInScope({ variables },
|
|
15273
|
+
function checkDeclarationsInScope({ variables }, name2) {
|
|
16494
15274
|
for (const variable of variables) {
|
|
16495
|
-
if (variable.name ===
|
|
15275
|
+
if (variable.name === name2) {
|
|
16496
15276
|
for (const def of variable.defs) {
|
|
16497
15277
|
if (def.type === "Variable" && def.parent) {
|
|
16498
15278
|
checkDeclaration(def.parent);
|
|
@@ -16844,21 +15624,21 @@ function getVariableNamesInScope(scopeManager, node2) {
|
|
|
16844
15624
|
}
|
|
16845
15625
|
function generateLocalNames(names, nameConflicts, namespaceName) {
|
|
16846
15626
|
const localNames = {};
|
|
16847
|
-
for (const
|
|
15627
|
+
for (const name2 of names) {
|
|
16848
15628
|
let localName;
|
|
16849
|
-
if (!nameConflicts[
|
|
16850
|
-
localName =
|
|
16851
|
-
} else if (nameConflicts[
|
|
15629
|
+
if (!nameConflicts[name2].has(name2)) {
|
|
15630
|
+
localName = name2;
|
|
15631
|
+
} else if (nameConflicts[name2].has(`${namespaceName}_${name2}`)) {
|
|
16852
15632
|
for (let i = 1; i < Number.POSITIVE_INFINITY; i++) {
|
|
16853
|
-
if (!nameConflicts[
|
|
16854
|
-
localName = `${namespaceName}_${
|
|
15633
|
+
if (!nameConflicts[name2].has(`${namespaceName}_${name2}_${i}`)) {
|
|
15634
|
+
localName = `${namespaceName}_${name2}_${i}`;
|
|
16855
15635
|
break;
|
|
16856
15636
|
}
|
|
16857
15637
|
}
|
|
16858
15638
|
} else {
|
|
16859
|
-
localName = `${namespaceName}_${
|
|
15639
|
+
localName = `${namespaceName}_${name2}`;
|
|
16860
15640
|
}
|
|
16861
|
-
localNames[
|
|
15641
|
+
localNames[name2] = localName;
|
|
16862
15642
|
}
|
|
16863
15643
|
return localNames;
|
|
16864
15644
|
}
|
|
@@ -18065,8 +16845,8 @@ In the meantime, if you want to keep this rule enabled, you can suppress this wa
|
|
|
18065
16845
|
}
|
|
18066
16846
|
}
|
|
18067
16847
|
}
|
|
18068
|
-
forEachDeclarationIdentifier(s.declaration, (
|
|
18069
|
-
newExportIdentifiers.add(
|
|
16848
|
+
forEachDeclarationIdentifier(s.declaration, (name2) => {
|
|
16849
|
+
newExportIdentifiers.add(name2);
|
|
18070
16850
|
});
|
|
18071
16851
|
}
|
|
18072
16852
|
}
|
|
@@ -18141,11 +16921,11 @@ In the meantime, if you want to keep this rule enabled, you can suppress this wa
|
|
|
18141
16921
|
if (astNode.type === AST_NODE_TYPES3.ExportNamedDeclaration && astNode.source) {
|
|
18142
16922
|
resolvedPath = resolve3(astNode.source.raw.replaceAll(/('|")/g, ""), context);
|
|
18143
16923
|
for (const specifier of astNode.specifiers) {
|
|
18144
|
-
const
|
|
18145
|
-
if (
|
|
16924
|
+
const name2 = getValue(specifier.local);
|
|
16925
|
+
if (name2 === DEFAULT) {
|
|
18146
16926
|
newDefaultImports.add(resolvedPath);
|
|
18147
16927
|
} else {
|
|
18148
|
-
newImports.set(
|
|
16928
|
+
newImports.set(name2, resolvedPath);
|
|
18149
16929
|
}
|
|
18150
16930
|
}
|
|
18151
16931
|
}
|
|
@@ -18343,8 +17123,8 @@ In the meantime, if you want to keep this rule enabled, you can suppress this wa
|
|
|
18343
17123
|
for (const specifier of node2.specifiers) {
|
|
18344
17124
|
checkUsage(specifier, getValue(specifier.exported), false);
|
|
18345
17125
|
}
|
|
18346
|
-
forEachDeclarationIdentifier(node2.declaration, (
|
|
18347
|
-
checkUsage(node2,
|
|
17126
|
+
forEachDeclarationIdentifier(node2.declaration, (name2, isTypeExport) => {
|
|
17127
|
+
checkUsage(node2, name2, isTypeExport);
|
|
18348
17128
|
});
|
|
18349
17129
|
}
|
|
18350
17130
|
};
|
|
@@ -19362,11 +18142,11 @@ var order_default = createRule3({
|
|
|
19362
18142
|
return {
|
|
19363
18143
|
ImportDeclaration(node2) {
|
|
19364
18144
|
if (node2.specifiers.length > 0 || options.warnOnUnassignedImports) {
|
|
19365
|
-
const
|
|
18145
|
+
const name2 = node2.source.value;
|
|
19366
18146
|
registerNode(context, {
|
|
19367
18147
|
node: node2,
|
|
19368
|
-
value:
|
|
19369
|
-
displayName:
|
|
18148
|
+
value: name2,
|
|
18149
|
+
displayName: name2,
|
|
19370
18150
|
type: "import"
|
|
19371
18151
|
}, ranks, getBlockImports(node2.parent), pathGroupsExcludedImportTypes, isSortingTypesGroup);
|
|
19372
18152
|
if (named.import) {
|
|
@@ -19488,11 +18268,11 @@ var order_default = createRule3({
|
|
|
19488
18268
|
} else {
|
|
19489
18269
|
const nameParts = getNamedCJSExports(context, node2.left);
|
|
19490
18270
|
if (nameParts && nameParts.length > 0) {
|
|
19491
|
-
const
|
|
18271
|
+
const name2 = nameParts.join(".");
|
|
19492
18272
|
getBlockExports(node2.parent.parent).push({
|
|
19493
18273
|
node: node2,
|
|
19494
|
-
value:
|
|
19495
|
-
displayName:
|
|
18274
|
+
value: name2,
|
|
18275
|
+
displayName: name2,
|
|
19496
18276
|
type: "export",
|
|
19497
18277
|
rank: 0
|
|
19498
18278
|
});
|
|
@@ -19854,7 +18634,7 @@ var getImportSource;
|
|
|
19854
18634
|
var isAllSameSubmodule;
|
|
19855
18635
|
var prefer_zod_namespace_default;
|
|
19856
18636
|
var init_prefer_zod_namespace = __esm2({ "src/rules/prefer-zod-namespace.ts"() {
|
|
19857
|
-
createRule4 = utils.ESLintUtils.RuleCreator((
|
|
18637
|
+
createRule4 = utils.ESLintUtils.RuleCreator((name2) => `https://github.com/samchungy/eslint-plugin-import-zod/blob/main/docs/rules/${name2}.md`);
|
|
19858
18638
|
getImportSource = (importedName, originalSource) => {
|
|
19859
18639
|
return importedName === "core" && originalSource === "zod/v4" ? `${originalSource}/${importedName}` : originalSource;
|
|
19860
18640
|
};
|
|
@@ -21511,7 +20291,7 @@ async function pnpm(options = {}) {
|
|
|
21511
20291
|
} = options;
|
|
21512
20292
|
const workspaceRoot = findWorkspaceRoot2();
|
|
21513
20293
|
await ensurePackages(["@storm-software/eslint-plugin-pnpm", "jsonc-eslint-parser", "yaml-eslint-parser"]);
|
|
21514
|
-
const [
|
|
20294
|
+
const [plugin8, parserJsonc3, parserYaml2] = await Promise.all([
|
|
21515
20295
|
interopDefault(Promise.resolve().then(() => (init_src2(), src_exports2))),
|
|
21516
20296
|
interopDefault(import('jsonc-eslint-parser')),
|
|
21517
20297
|
interopDefault(import('yaml-eslint-parser'))
|
|
@@ -21559,7 +20339,7 @@ async function pnpm(options = {}) {
|
|
|
21559
20339
|
{
|
|
21560
20340
|
name: "storm/pnpm/setup",
|
|
21561
20341
|
plugins: {
|
|
21562
|
-
pnpm:
|
|
20342
|
+
pnpm: plugin8
|
|
21563
20343
|
}
|
|
21564
20344
|
},
|
|
21565
20345
|
{
|
|
@@ -21867,12 +20647,12 @@ async function reactNative(options = {}) {
|
|
|
21867
20647
|
init_cjs_shims();
|
|
21868
20648
|
async function regexp(options = {}) {
|
|
21869
20649
|
const config7 = eslintPluginRegexp.configs["flat/recommended"];
|
|
21870
|
-
const
|
|
20650
|
+
const rules6 = {
|
|
21871
20651
|
...config7.rules
|
|
21872
20652
|
};
|
|
21873
20653
|
if (options.level === "warn") {
|
|
21874
|
-
for (const key in
|
|
21875
|
-
if (
|
|
20654
|
+
for (const key in rules6) {
|
|
20655
|
+
if (rules6[key] === "error") rules6[key] = "warn";
|
|
21876
20656
|
}
|
|
21877
20657
|
}
|
|
21878
20658
|
return [
|
|
@@ -21880,7 +20660,7 @@ async function regexp(options = {}) {
|
|
|
21880
20660
|
...config7,
|
|
21881
20661
|
name: "storm/regexp/rules",
|
|
21882
20662
|
rules: {
|
|
21883
|
-
...
|
|
20663
|
+
...rules6,
|
|
21884
20664
|
"regexp/no-unused-capturing-group": [
|
|
21885
20665
|
"error",
|
|
21886
20666
|
{
|
|
@@ -22203,10 +20983,10 @@ async function storybook(options = {}) {
|
|
|
22203
20983
|
// src/configs/test.ts
|
|
22204
20984
|
init_cjs_shims();
|
|
22205
20985
|
init_globs();
|
|
22206
|
-
var
|
|
20986
|
+
var plugin6;
|
|
22207
20987
|
async function test(options = {}) {
|
|
22208
20988
|
const { files = GLOB_TESTS, isInEditor = false, overrides = {} } = options;
|
|
22209
|
-
|
|
20989
|
+
plugin6 = plugin6 || {
|
|
22210
20990
|
...default4__default.default,
|
|
22211
20991
|
rules: {
|
|
22212
20992
|
...default4__default.default.rules,
|
|
@@ -22218,7 +20998,7 @@ async function test(options = {}) {
|
|
|
22218
20998
|
{
|
|
22219
20999
|
name: "storm/test/setup",
|
|
22220
21000
|
plugins: {
|
|
22221
|
-
test:
|
|
21001
|
+
test: plugin6
|
|
22222
21002
|
}
|
|
22223
21003
|
},
|
|
22224
21004
|
{
|
|
@@ -22848,7 +21628,7 @@ function getOverrides(options, key) {
|
|
|
22848
21628
|
}
|
|
22849
21629
|
function preset(options, ...userConfigs) {
|
|
22850
21630
|
const {
|
|
22851
|
-
name:
|
|
21631
|
+
name: name2,
|
|
22852
21632
|
globals = {},
|
|
22853
21633
|
banner: enableBanner = true,
|
|
22854
21634
|
astro: enableAstro = false,
|
|
@@ -22888,10 +21668,10 @@ function preset(options, ...userConfigs) {
|
|
|
22888
21668
|
if (stylisticOptions && !("jsx" in stylisticOptions)) {
|
|
22889
21669
|
stylisticOptions.jsx = enableJsx;
|
|
22890
21670
|
}
|
|
22891
|
-
const
|
|
21671
|
+
const configs7 = [];
|
|
22892
21672
|
if (enableGitignore) {
|
|
22893
21673
|
if (typeof enableGitignore !== "boolean") {
|
|
22894
|
-
|
|
21674
|
+
configs7.push(
|
|
22895
21675
|
interopDefault(import('eslint-config-flat-gitignore')).then((r) => [
|
|
22896
21676
|
r({
|
|
22897
21677
|
name: "storm/gitignore",
|
|
@@ -22900,7 +21680,7 @@ function preset(options, ...userConfigs) {
|
|
|
22900
21680
|
])
|
|
22901
21681
|
);
|
|
22902
21682
|
} else {
|
|
22903
|
-
|
|
21683
|
+
configs7.push(
|
|
22904
21684
|
interopDefault(import('eslint-config-flat-gitignore')).then((r) => [
|
|
22905
21685
|
r({
|
|
22906
21686
|
name: "storm/gitignore",
|
|
@@ -22910,7 +21690,7 @@ function preset(options, ...userConfigs) {
|
|
|
22910
21690
|
);
|
|
22911
21691
|
}
|
|
22912
21692
|
}
|
|
22913
|
-
|
|
21693
|
+
configs7.push(
|
|
22914
21694
|
ignores(options.ignores),
|
|
22915
21695
|
javascript({
|
|
22916
21696
|
globals,
|
|
@@ -22935,7 +21715,7 @@ function preset(options, ...userConfigs) {
|
|
|
22935
21715
|
}
|
|
22936
21716
|
}
|
|
22937
21717
|
if (enableTypeScript) {
|
|
22938
|
-
|
|
21718
|
+
configs7.push(
|
|
22939
21719
|
typescript({
|
|
22940
21720
|
...typescriptOptions,
|
|
22941
21721
|
tsconfigPath: typescriptOptions.tsconfigPath === false ? void 0 : typescriptOptions.tsconfigPath,
|
|
@@ -22946,25 +21726,25 @@ function preset(options, ...userConfigs) {
|
|
|
22946
21726
|
);
|
|
22947
21727
|
}
|
|
22948
21728
|
if (enableBanner) {
|
|
22949
|
-
|
|
21729
|
+
configs7.push(
|
|
22950
21730
|
banner({
|
|
22951
21731
|
...resolveSubOptions(options, "banner"),
|
|
22952
|
-
name:
|
|
21732
|
+
name: name2,
|
|
22953
21733
|
overrides: getOverrides(options, "banner")
|
|
22954
21734
|
})
|
|
22955
21735
|
);
|
|
22956
21736
|
}
|
|
22957
21737
|
if (!stylisticOptions) {
|
|
22958
|
-
|
|
21738
|
+
configs7.push(prettier());
|
|
22959
21739
|
}
|
|
22960
21740
|
if (enableCSpell) {
|
|
22961
|
-
|
|
21741
|
+
configs7.push(cspell(resolveSubOptions(options, "cspell")));
|
|
22962
21742
|
}
|
|
22963
21743
|
if (enableUnicorn) {
|
|
22964
|
-
|
|
21744
|
+
configs7.push(unicorn(enableUnicorn === true ? {} : enableUnicorn));
|
|
22965
21745
|
}
|
|
22966
21746
|
if (enableJSDoc) {
|
|
22967
|
-
|
|
21747
|
+
configs7.push(
|
|
22968
21748
|
jsdoc({
|
|
22969
21749
|
...resolveSubOptions(options, "jsdoc"),
|
|
22970
21750
|
overrides: getOverrides(options, "jsdoc")
|
|
@@ -22972,7 +21752,7 @@ function preset(options, ...userConfigs) {
|
|
|
22972
21752
|
);
|
|
22973
21753
|
}
|
|
22974
21754
|
if (enableTSDoc) {
|
|
22975
|
-
|
|
21755
|
+
configs7.push(
|
|
22976
21756
|
tsdoc({
|
|
22977
21757
|
...resolveSubOptions(options, "tsdoc"),
|
|
22978
21758
|
overrides: getOverrides(options, "tsdoc")
|
|
@@ -22980,17 +21760,17 @@ function preset(options, ...userConfigs) {
|
|
|
22980
21760
|
);
|
|
22981
21761
|
}
|
|
22982
21762
|
if (enableJsx) {
|
|
22983
|
-
|
|
21763
|
+
configs7.push(jsx());
|
|
22984
21764
|
}
|
|
22985
21765
|
if (enableZod) {
|
|
22986
|
-
|
|
21766
|
+
configs7.push(
|
|
22987
21767
|
zod({
|
|
22988
21768
|
overrides: getOverrides(options, "zod")
|
|
22989
21769
|
})
|
|
22990
21770
|
);
|
|
22991
21771
|
}
|
|
22992
21772
|
if (stylisticOptions) {
|
|
22993
|
-
|
|
21773
|
+
configs7.push(
|
|
22994
21774
|
stylistic({
|
|
22995
21775
|
...stylisticOptions,
|
|
22996
21776
|
lineEndings: stylisticOptions.lineEndings ?? "unix",
|
|
@@ -23000,10 +21780,10 @@ function preset(options, ...userConfigs) {
|
|
|
23000
21780
|
);
|
|
23001
21781
|
}
|
|
23002
21782
|
if (enableRegexp) {
|
|
23003
|
-
|
|
21783
|
+
configs7.push(regexp(typeof enableRegexp === "boolean" ? {} : enableRegexp));
|
|
23004
21784
|
}
|
|
23005
21785
|
if (enableTest) {
|
|
23006
|
-
|
|
21786
|
+
configs7.push(
|
|
23007
21787
|
test({
|
|
23008
21788
|
isInEditor,
|
|
23009
21789
|
overrides: getOverrides(options, "test")
|
|
@@ -23011,10 +21791,10 @@ function preset(options, ...userConfigs) {
|
|
|
23011
21791
|
);
|
|
23012
21792
|
}
|
|
23013
21793
|
if (enableGraphQL) {
|
|
23014
|
-
|
|
21794
|
+
configs7.push(graphql(resolveSubOptions(options, "graphql")));
|
|
23015
21795
|
}
|
|
23016
21796
|
if (enableReact) {
|
|
23017
|
-
|
|
21797
|
+
configs7.push(
|
|
23018
21798
|
react({
|
|
23019
21799
|
...typescriptOptions,
|
|
23020
21800
|
tsconfigPath: typescriptOptions.tsconfigPath === false ? void 0 : typescriptOptions.tsconfigPath,
|
|
@@ -23024,7 +21804,7 @@ function preset(options, ...userConfigs) {
|
|
|
23024
21804
|
);
|
|
23025
21805
|
}
|
|
23026
21806
|
if (enableReactNative) {
|
|
23027
|
-
|
|
21807
|
+
configs7.push(
|
|
23028
21808
|
reactNative({
|
|
23029
21809
|
...resolveSubOptions(options, "react-native"),
|
|
23030
21810
|
overrides: getOverrides(options, "react-native")
|
|
@@ -23032,13 +21812,13 @@ function preset(options, ...userConfigs) {
|
|
|
23032
21812
|
);
|
|
23033
21813
|
}
|
|
23034
21814
|
if (enableNext) {
|
|
23035
|
-
|
|
21815
|
+
configs7.push(next(resolveSubOptions(options, "next")));
|
|
23036
21816
|
}
|
|
23037
21817
|
if (enableStorybook) {
|
|
23038
|
-
|
|
21818
|
+
configs7.push(storybook(resolveSubOptions(options, "storybook")));
|
|
23039
21819
|
}
|
|
23040
21820
|
if (enableUnoCSS) {
|
|
23041
|
-
|
|
21821
|
+
configs7.push(
|
|
23042
21822
|
unocss({
|
|
23043
21823
|
...resolveSubOptions(options, "unocss"),
|
|
23044
21824
|
overrides: getOverrides(options, "unocss")
|
|
@@ -23046,7 +21826,7 @@ function preset(options, ...userConfigs) {
|
|
|
23046
21826
|
);
|
|
23047
21827
|
}
|
|
23048
21828
|
if (enableAstro) {
|
|
23049
|
-
|
|
21829
|
+
configs7.push(
|
|
23050
21830
|
astro({
|
|
23051
21831
|
overrides: getOverrides(options, "astro"),
|
|
23052
21832
|
stylistic: stylisticOptions
|
|
@@ -23054,7 +21834,7 @@ function preset(options, ...userConfigs) {
|
|
|
23054
21834
|
);
|
|
23055
21835
|
}
|
|
23056
21836
|
if (enablePnpm ?? packageManager !== "bun") {
|
|
23057
|
-
|
|
21837
|
+
configs7.push(
|
|
23058
21838
|
pnpm({
|
|
23059
21839
|
overrides: getOverrides(options, "pnpm"),
|
|
23060
21840
|
ignore: typeof enablePnpm !== "boolean" ? enablePnpm?.ignore : void 0
|
|
@@ -23062,13 +21842,13 @@ function preset(options, ...userConfigs) {
|
|
|
23062
21842
|
);
|
|
23063
21843
|
}
|
|
23064
21844
|
if (enableBun ?? packageManager === "bun") {
|
|
23065
|
-
|
|
21845
|
+
configs7.push(bun({
|
|
23066
21846
|
overrides: getOverrides(options, "bun"),
|
|
23067
21847
|
ignore: typeof enableBun !== "boolean" ? enableBun?.ignore : void 0
|
|
23068
21848
|
}));
|
|
23069
21849
|
}
|
|
23070
21850
|
if (options.jsonc ?? true) {
|
|
23071
|
-
|
|
21851
|
+
configs7.push(
|
|
23072
21852
|
jsonc({
|
|
23073
21853
|
overrides: getOverrides(options, "jsonc"),
|
|
23074
21854
|
stylistic: stylisticOptions
|
|
@@ -23076,11 +21856,11 @@ function preset(options, ...userConfigs) {
|
|
|
23076
21856
|
sortTsconfig()
|
|
23077
21857
|
);
|
|
23078
21858
|
if (stylisticOptions) {
|
|
23079
|
-
|
|
21859
|
+
configs7.push(sortPackageJson());
|
|
23080
21860
|
}
|
|
23081
21861
|
}
|
|
23082
21862
|
if (options.yaml ?? true) {
|
|
23083
|
-
|
|
21863
|
+
configs7.push(
|
|
23084
21864
|
yaml({
|
|
23085
21865
|
overrides: getOverrides(options, "yaml"),
|
|
23086
21866
|
stylistic: stylisticOptions
|
|
@@ -23088,7 +21868,7 @@ function preset(options, ...userConfigs) {
|
|
|
23088
21868
|
);
|
|
23089
21869
|
}
|
|
23090
21870
|
if (options.toml ?? true) {
|
|
23091
|
-
|
|
21871
|
+
configs7.push(
|
|
23092
21872
|
toml({
|
|
23093
21873
|
overrides: getOverrides(options, "toml"),
|
|
23094
21874
|
stylistic: stylisticOptions
|
|
@@ -23096,28 +21876,28 @@ function preset(options, ...userConfigs) {
|
|
|
23096
21876
|
);
|
|
23097
21877
|
}
|
|
23098
21878
|
if (options.markdown === true) {
|
|
23099
|
-
|
|
21879
|
+
configs7.push(
|
|
23100
21880
|
markdown({
|
|
23101
21881
|
overrides: getOverrides(options, "markdown")
|
|
23102
21882
|
})
|
|
23103
21883
|
);
|
|
23104
21884
|
}
|
|
23105
21885
|
if (enableMdx) {
|
|
23106
|
-
|
|
21886
|
+
configs7.push(
|
|
23107
21887
|
mdx({
|
|
23108
21888
|
overrides: getOverrides(options, "mdx")
|
|
23109
21889
|
})
|
|
23110
21890
|
);
|
|
23111
21891
|
}
|
|
23112
21892
|
if (options.formatters) {
|
|
23113
|
-
|
|
21893
|
+
configs7.push(
|
|
23114
21894
|
formatters(
|
|
23115
21895
|
options.formatters,
|
|
23116
21896
|
typeof stylisticOptions === "boolean" ? {} : stylisticOptions
|
|
23117
21897
|
)
|
|
23118
21898
|
);
|
|
23119
21899
|
}
|
|
23120
|
-
|
|
21900
|
+
configs7.push(disables());
|
|
23121
21901
|
if ("files" in options) {
|
|
23122
21902
|
throw new Error(
|
|
23123
21903
|
'[@storm-software/eslint] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.'
|
|
@@ -23129,10 +21909,10 @@ function preset(options, ...userConfigs) {
|
|
|
23129
21909
|
}
|
|
23130
21910
|
return acc;
|
|
23131
21911
|
}, {});
|
|
23132
|
-
if (Object.keys(fusedConfig).length)
|
|
21912
|
+
if (Object.keys(fusedConfig).length) configs7.push([fusedConfig]);
|
|
23133
21913
|
let composer = new eslintFlatConfigUtils.FlatConfigComposer();
|
|
23134
21914
|
composer = composer.append(
|
|
23135
|
-
...
|
|
21915
|
+
...configs7,
|
|
23136
21916
|
...userConfigs
|
|
23137
21917
|
);
|
|
23138
21918
|
if (autoRenamePlugins) {
|