@pengzhanbo/eslint-config 2.9.0 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +475 -358
- package/dist/index.js +303 -149
- package/package.json +41 -41
package/dist/index.js
CHANGED
|
@@ -504,7 +504,6 @@ async function stylistic(options = {}) {
|
|
|
504
504
|
}
|
|
505
505
|
//#endregion
|
|
506
506
|
//#region src/configs/formatters.ts
|
|
507
|
-
const formatPackages = ["eslint-plugin-format"];
|
|
508
507
|
function mergePrettierOptions(options, overrides) {
|
|
509
508
|
return {
|
|
510
509
|
...options,
|
|
@@ -512,22 +511,122 @@ function mergePrettierOptions(options, overrides) {
|
|
|
512
511
|
plugins: [...overrides.plugins || [], ...options.plugins || []]
|
|
513
512
|
};
|
|
514
513
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
css
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
514
|
+
function buildCssConfigs(prettierOptions) {
|
|
515
|
+
return [
|
|
516
|
+
[
|
|
517
|
+
[GLOB_CSS, GLOB_POSTCSS],
|
|
518
|
+
"css",
|
|
519
|
+
"config/formatter/css"
|
|
520
|
+
],
|
|
521
|
+
[
|
|
522
|
+
[GLOB_SCSS],
|
|
523
|
+
"scss",
|
|
524
|
+
"config/formatter/scss"
|
|
525
|
+
],
|
|
526
|
+
[
|
|
527
|
+
[GLOB_LESS],
|
|
528
|
+
"less",
|
|
529
|
+
"config/formatter/less"
|
|
530
|
+
]
|
|
531
|
+
].map(([files, parser, name]) => ({
|
|
532
|
+
files: [...files],
|
|
533
|
+
languageOptions: { parser: parserPlain },
|
|
534
|
+
name,
|
|
535
|
+
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser })] }
|
|
536
|
+
}));
|
|
537
|
+
}
|
|
538
|
+
function buildXmlLikeConfig(prettierOptions, prettierXmlOptions, files, name) {
|
|
539
|
+
return {
|
|
540
|
+
files,
|
|
541
|
+
languageOptions: { parser: parserPlain },
|
|
542
|
+
name,
|
|
543
|
+
rules: { "format/prettier": ["error", mergePrettierOptions({
|
|
544
|
+
...prettierXmlOptions,
|
|
545
|
+
...prettierOptions
|
|
546
|
+
}, {
|
|
547
|
+
parser: "xml",
|
|
548
|
+
plugins: ["@prettier/plugin-xml"]
|
|
549
|
+
})] }
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
function buildMarkdownConfigs(options, prettierOptions, dprintOptions) {
|
|
553
|
+
const formater = options.markdown === true ? "prettier" : options.markdown;
|
|
554
|
+
return [{
|
|
555
|
+
files: [GLOB_MARKDOWN],
|
|
556
|
+
ignores: [],
|
|
557
|
+
languageOptions: { parser: parserPlain },
|
|
558
|
+
name: "config/formatter/markdown",
|
|
559
|
+
rules: { [`format/${formater}`]: ["error", formater === "prettier" ? mergePrettierOptions(prettierOptions, {
|
|
560
|
+
embeddedLanguageFormatting: "off",
|
|
561
|
+
parser: "markdown"
|
|
562
|
+
}) : {
|
|
563
|
+
...dprintOptions,
|
|
564
|
+
language: "markdown"
|
|
565
|
+
}] }
|
|
566
|
+
}];
|
|
567
|
+
}
|
|
568
|
+
function buildAstroConfigs(prettierOptions) {
|
|
569
|
+
return [{
|
|
570
|
+
files: [GLOB_ASTRO],
|
|
571
|
+
languageOptions: { parser: parserPlain },
|
|
572
|
+
name: "config/formatter/astro",
|
|
573
|
+
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, {
|
|
574
|
+
parser: "astro",
|
|
575
|
+
plugins: ["prettier-plugin-astro"]
|
|
576
|
+
})] }
|
|
577
|
+
}, {
|
|
578
|
+
files: [GLOB_ASTRO, GLOB_ASTRO_TS],
|
|
579
|
+
name: "config/formatter/astro/disables",
|
|
580
|
+
rules: {
|
|
581
|
+
"style/arrow-parens": "off",
|
|
582
|
+
"style/block-spacing": "off",
|
|
583
|
+
"style/comma-dangle": "off",
|
|
584
|
+
"style/indent": "off",
|
|
585
|
+
"style/no-multi-spaces": "off",
|
|
586
|
+
"style/quotes": "off",
|
|
587
|
+
"style/semi": "off"
|
|
588
|
+
}
|
|
589
|
+
}];
|
|
590
|
+
}
|
|
591
|
+
function resolveFormattersOptions(options) {
|
|
592
|
+
if (options !== true) return options;
|
|
593
|
+
const isPrettierPluginXmlInScope = isPackageInScope("@prettier/plugin-xml");
|
|
594
|
+
return {
|
|
595
|
+
astro: isPackageInScope("prettier-plugin-astro"),
|
|
596
|
+
css: true,
|
|
597
|
+
graphql: true,
|
|
598
|
+
html: true,
|
|
599
|
+
markdown: true,
|
|
600
|
+
svg: isPrettierPluginXmlInScope,
|
|
601
|
+
xml: isPrettierPluginXmlInScope
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
function buildHtmlConfig(prettierOptions) {
|
|
605
|
+
return {
|
|
606
|
+
files: [GLOB_HTML],
|
|
607
|
+
languageOptions: { parser: parserPlain },
|
|
608
|
+
name: "config/formatter/html",
|
|
609
|
+
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "html" })] }
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
function buildGraphqlConfig(prettierOptions) {
|
|
613
|
+
return {
|
|
614
|
+
files: [GLOB_GRAPHQL],
|
|
615
|
+
languageOptions: { parser: parserPlain },
|
|
616
|
+
name: "config/formatter/graphql",
|
|
617
|
+
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "graphql" })] }
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
function getFormattersPackagesToEnsure(options) {
|
|
621
|
+
return [
|
|
622
|
+
"eslint-plugin-format",
|
|
623
|
+
options.astro ? "prettier-plugin-astro" : void 0,
|
|
624
|
+
options.xml || options.svg ? "@prettier/plugin-xml" : void 0
|
|
625
|
+
];
|
|
626
|
+
}
|
|
627
|
+
async function formatters(rawOptions = {}, stylistic = {}) {
|
|
628
|
+
const options = resolveFormattersOptions(rawOptions);
|
|
629
|
+
await ensurePackages(getFormattersPackagesToEnsure(options));
|
|
531
630
|
const { indent, quotes, semi } = {
|
|
532
631
|
...StylisticConfigDefaults,
|
|
533
632
|
...stylistic
|
|
@@ -554,100 +653,16 @@ async function formatters(options = {}, stylistic = {}) {
|
|
|
554
653
|
...options.dprintOptions || {}
|
|
555
654
|
};
|
|
556
655
|
const configs = [{
|
|
557
|
-
name: "config/
|
|
656
|
+
name: "config/formatter/setup",
|
|
558
657
|
plugins: { format: await interopDefault(import("eslint-plugin-format")) }
|
|
559
658
|
}];
|
|
560
|
-
if (options.css) configs.push(
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
languageOptions: { parser: parserPlain },
|
|
568
|
-
name: "config/formatter/scss",
|
|
569
|
-
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "scss" })] }
|
|
570
|
-
}, {
|
|
571
|
-
files: [GLOB_LESS],
|
|
572
|
-
languageOptions: { parser: parserPlain },
|
|
573
|
-
name: "config/formatter/less",
|
|
574
|
-
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "less" })] }
|
|
575
|
-
});
|
|
576
|
-
if (options.html) configs.push({
|
|
577
|
-
files: [GLOB_HTML],
|
|
578
|
-
languageOptions: { parser: parserPlain },
|
|
579
|
-
name: "config/formatter/html",
|
|
580
|
-
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "html" })] }
|
|
581
|
-
});
|
|
582
|
-
if (options.xml) configs.push({
|
|
583
|
-
files: [GLOB_XML],
|
|
584
|
-
languageOptions: { parser: parserPlain },
|
|
585
|
-
name: "config/formatter/xml",
|
|
586
|
-
rules: { "format/prettier": ["error", mergePrettierOptions({
|
|
587
|
-
...prettierXmlOptions,
|
|
588
|
-
...prettierOptions
|
|
589
|
-
}, {
|
|
590
|
-
parser: "xml",
|
|
591
|
-
plugins: ["@prettier/plugin-xml"]
|
|
592
|
-
})] }
|
|
593
|
-
});
|
|
594
|
-
if (options.svg) configs.push({
|
|
595
|
-
files: [GLOB_SVG],
|
|
596
|
-
languageOptions: { parser: parserPlain },
|
|
597
|
-
name: "config/formatter/svg",
|
|
598
|
-
rules: { "format/prettier": ["error", mergePrettierOptions({
|
|
599
|
-
...prettierXmlOptions,
|
|
600
|
-
...prettierOptions
|
|
601
|
-
}, {
|
|
602
|
-
parser: "xml",
|
|
603
|
-
plugins: ["@prettier/plugin-xml"]
|
|
604
|
-
})] }
|
|
605
|
-
});
|
|
606
|
-
if (options.markdown) {
|
|
607
|
-
const formater = options.markdown === true ? "prettier" : options.markdown;
|
|
608
|
-
configs.push({
|
|
609
|
-
files: [GLOB_MARKDOWN],
|
|
610
|
-
languageOptions: { parser: parserPlain },
|
|
611
|
-
name: "config/formatter/markdown",
|
|
612
|
-
rules: { [`format/${formater}`]: ["error", formater === "prettier" ? mergePrettierOptions(prettierOptions, {
|
|
613
|
-
embeddedLanguageFormatting: "off",
|
|
614
|
-
parser: "markdown"
|
|
615
|
-
}) : {
|
|
616
|
-
...dprintOptions,
|
|
617
|
-
language: "markdown"
|
|
618
|
-
}] }
|
|
619
|
-
});
|
|
620
|
-
}
|
|
621
|
-
if (options.astro) {
|
|
622
|
-
configs.push({
|
|
623
|
-
files: [GLOB_ASTRO],
|
|
624
|
-
languageOptions: { parser: parserPlain },
|
|
625
|
-
name: "config/formatter/astro",
|
|
626
|
-
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, {
|
|
627
|
-
parser: "astro",
|
|
628
|
-
plugins: ["prettier-plugin-astro"]
|
|
629
|
-
})] }
|
|
630
|
-
});
|
|
631
|
-
configs.push({
|
|
632
|
-
files: [GLOB_ASTRO, GLOB_ASTRO_TS],
|
|
633
|
-
name: "config/formatter/astro/disables",
|
|
634
|
-
rules: {
|
|
635
|
-
"style/arrow-parens": "off",
|
|
636
|
-
"style/block-spacing": "off",
|
|
637
|
-
"style/comma-dangle": "off",
|
|
638
|
-
"style/indent": "off",
|
|
639
|
-
"style/no-multi-spaces": "off",
|
|
640
|
-
"style/quotes": "off",
|
|
641
|
-
"style/semi": "off"
|
|
642
|
-
}
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
if (options.graphql) configs.push({
|
|
646
|
-
files: [GLOB_GRAPHQL],
|
|
647
|
-
languageOptions: { parser: parserPlain },
|
|
648
|
-
name: "config/formatter/graphql",
|
|
649
|
-
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "graphql" })] }
|
|
650
|
-
});
|
|
659
|
+
if (options.css) configs.push(...buildCssConfigs(prettierOptions));
|
|
660
|
+
if (options.html) configs.push(buildHtmlConfig(prettierOptions));
|
|
661
|
+
if (options.xml) configs.push(buildXmlLikeConfig(prettierOptions, prettierXmlOptions, [GLOB_XML], "config/formatter/xml"));
|
|
662
|
+
if (options.svg) configs.push(buildXmlLikeConfig(prettierOptions, prettierXmlOptions, [GLOB_SVG], "config/formatter/svg"));
|
|
663
|
+
if (options.markdown) configs.push(...buildMarkdownConfigs(options, prettierOptions, dprintOptions));
|
|
664
|
+
if (options.astro) configs.push(...buildAstroConfigs(prettierOptions));
|
|
665
|
+
if (options.graphql) configs.push(buildGraphqlConfig(prettierOptions));
|
|
651
666
|
return configs;
|
|
652
667
|
}
|
|
653
668
|
//#endregion
|
|
@@ -1230,7 +1245,7 @@ async function pnpm(options) {
|
|
|
1230
1245
|
interopDefault(import("eslint-plugin-yml")),
|
|
1231
1246
|
interopDefault(import("yaml-eslint-parser"))
|
|
1232
1247
|
]);
|
|
1233
|
-
const { catalogs = await detectCatalogUsage(), isInEditor = false, json = true, sort = true, yaml = true } = options;
|
|
1248
|
+
const { catalogs = await detectCatalogUsage(), isInEditor = false, json = true, sort = true, stylistic = true, yaml = true } = options;
|
|
1234
1249
|
const configs = [];
|
|
1235
1250
|
if (json) configs.push({
|
|
1236
1251
|
files: ["package.json", "**/package.json"],
|
|
@@ -1254,6 +1269,7 @@ async function pnpm(options) {
|
|
|
1254
1269
|
plugins: { pnpm: pluginPnpm },
|
|
1255
1270
|
rules: {
|
|
1256
1271
|
"pnpm/yaml-enforce-settings": ["error", { settings: {
|
|
1272
|
+
minimumReleaseAgeExcludePrune: true,
|
|
1257
1273
|
shellEmulator: true,
|
|
1258
1274
|
trustPolicy: "no-downgrade"
|
|
1259
1275
|
} }],
|
|
@@ -1261,6 +1277,13 @@ async function pnpm(options) {
|
|
|
1261
1277
|
"pnpm/yaml-no-unused-catalog-item": "error"
|
|
1262
1278
|
}
|
|
1263
1279
|
});
|
|
1280
|
+
if (stylistic) configs.push({
|
|
1281
|
+
files: ["pnpm-workspace.yaml"],
|
|
1282
|
+
languageOptions: { parser: yamlParser },
|
|
1283
|
+
name: "config/pnpm/pnpm-workspace-yaml-stylistic",
|
|
1284
|
+
plugins: { pnpm: pluginPnpm },
|
|
1285
|
+
rules: { "pnpm/yaml-blank-lines": "error" }
|
|
1286
|
+
});
|
|
1264
1287
|
if (sort) configs.push({
|
|
1265
1288
|
files: ["pnpm-workspace.yaml"],
|
|
1266
1289
|
languageOptions: { parser: yamlParser },
|
|
@@ -1271,65 +1294,190 @@ async function pnpm(options) {
|
|
|
1271
1294
|
{
|
|
1272
1295
|
order: [
|
|
1273
1296
|
...[
|
|
1274
|
-
"
|
|
1297
|
+
"dedupeInjectedDeps",
|
|
1298
|
+
"disallowWorkspaceCycles",
|
|
1299
|
+
"failIfNoMatch",
|
|
1300
|
+
"ignoreWorkspaceCycles",
|
|
1301
|
+
"ignoreWorkspaceRootCheck",
|
|
1302
|
+
"includeWorkspaceRoot",
|
|
1303
|
+
"injectWorkspacePackages",
|
|
1304
|
+
"legacyDirFiltering",
|
|
1305
|
+
"linkWorkspacePackages",
|
|
1306
|
+
"preferWorkspacePackages",
|
|
1307
|
+
"saveWorkspaceProtocol",
|
|
1308
|
+
"sharedWorkspaceLockfile",
|
|
1309
|
+
"syncInjectedDepsAfterScripts"
|
|
1310
|
+
],
|
|
1311
|
+
...[
|
|
1275
1312
|
"catalogMode",
|
|
1276
|
-
"
|
|
1277
|
-
"
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
"
|
|
1313
|
+
"catalogPrune",
|
|
1314
|
+
"cleanupUnusedCatalogs"
|
|
1315
|
+
],
|
|
1316
|
+
...[
|
|
1317
|
+
"allowedDeprecatedVersions",
|
|
1318
|
+
"blockExoticSubdeps",
|
|
1319
|
+
"ignoredOptionalDependencies",
|
|
1320
|
+
"minimumReleaseAge",
|
|
1321
|
+
"minimumReleaseAgeIgnoreMissingTime",
|
|
1322
|
+
"minimumReleaseAgeStrict",
|
|
1323
|
+
"minimumReleaseAgeExcludePrune",
|
|
1324
|
+
"minimumReleaseAgeExclude",
|
|
1325
|
+
"registrySupportsTimeField",
|
|
1326
|
+
"resolutionMode",
|
|
1327
|
+
"supportedArchitectures",
|
|
1328
|
+
"trustLockfile",
|
|
1329
|
+
"trustPolicy",
|
|
1330
|
+
"trustPolicyIgnoreAfter",
|
|
1331
|
+
"trustPolicyExclude",
|
|
1332
|
+
"update"
|
|
1333
|
+
],
|
|
1334
|
+
...[
|
|
1335
|
+
"autoInstallPeers",
|
|
1336
|
+
"dedupePeerDependents",
|
|
1337
|
+
"dedupePeers",
|
|
1338
|
+
"peerDependencyRules",
|
|
1339
|
+
"resolvePeersFromWorkspaceRoot",
|
|
1340
|
+
"strictPeerDependencies"
|
|
1341
|
+
],
|
|
1342
|
+
...[
|
|
1343
|
+
"fetchMinSpeedKiBps",
|
|
1344
|
+
"fetchRetries",
|
|
1345
|
+
"fetchRetryFactor",
|
|
1346
|
+
"fetchRetryMaxtimeout",
|
|
1347
|
+
"fetchRetryMintimeout",
|
|
1348
|
+
"fetchTimeout",
|
|
1349
|
+
"fetchWarnTimeoutMs",
|
|
1350
|
+
"gitShallowHosts",
|
|
1351
|
+
"httpProxy",
|
|
1352
|
+
"httpsProxy",
|
|
1353
|
+
"localAddress",
|
|
1354
|
+
"maxsockets",
|
|
1355
|
+
"namedRegistries",
|
|
1356
|
+
"networkConcurrency",
|
|
1357
|
+
"noProxy",
|
|
1358
|
+
"registries",
|
|
1359
|
+
"registry",
|
|
1360
|
+
"strictSsl"
|
|
1361
|
+
],
|
|
1362
|
+
...[
|
|
1363
|
+
"dlxCacheMaxAge",
|
|
1364
|
+
"enableGlobalVirtualStore",
|
|
1365
|
+
"enableModulesDir",
|
|
1281
1366
|
"extendNodePath",
|
|
1367
|
+
"modulesCacheMaxAge",
|
|
1368
|
+
"modulesDir",
|
|
1369
|
+
"nodeExperimentalPackageMap",
|
|
1370
|
+
"nodeLinker",
|
|
1371
|
+
"nodePackageMapType",
|
|
1372
|
+
"packageImportMethod",
|
|
1373
|
+
"preferSymlinkedExecutables",
|
|
1374
|
+
"symlink",
|
|
1375
|
+
"virtualStoreDir",
|
|
1376
|
+
"virtualStoreDirMaxLength",
|
|
1377
|
+
"virtualStoreOnly",
|
|
1378
|
+
"virtualStoreType"
|
|
1379
|
+
],
|
|
1380
|
+
...[
|
|
1282
1381
|
"hoist",
|
|
1382
|
+
"hoistingLimits",
|
|
1283
1383
|
"hoistPattern",
|
|
1284
1384
|
"hoistWorkspacePackages",
|
|
1285
|
-
"
|
|
1385
|
+
"publicHoistPattern",
|
|
1386
|
+
"shamefullyHoist"
|
|
1387
|
+
],
|
|
1388
|
+
...[
|
|
1389
|
+
"frozenStore",
|
|
1390
|
+
"storeDir",
|
|
1391
|
+
"strictStorePkgContentCheck",
|
|
1392
|
+
"useRunningStoreServer",
|
|
1393
|
+
"verifyStoreIntegrity"
|
|
1394
|
+
],
|
|
1395
|
+
...[
|
|
1396
|
+
"gitBranchLockfile",
|
|
1397
|
+
"lockfile",
|
|
1398
|
+
"lockfileIncludeTarballUrl",
|
|
1399
|
+
"mergeGitBranchLockfilesBranchPattern",
|
|
1400
|
+
"peersSuffixMaxLength",
|
|
1401
|
+
"preferFrozenLockfile"
|
|
1402
|
+
],
|
|
1403
|
+
...[
|
|
1404
|
+
"childConcurrency",
|
|
1405
|
+
"dangerouslyAllowAllBuilds",
|
|
1406
|
+
"enablePrePostScripts",
|
|
1286
1407
|
"ignoreDepScripts",
|
|
1287
1408
|
"ignoreScripts",
|
|
1288
|
-
"
|
|
1409
|
+
"nodeOptions",
|
|
1410
|
+
"requiredScripts",
|
|
1411
|
+
"scriptShell",
|
|
1412
|
+
"shellEmulator",
|
|
1413
|
+
"sideEffectsCache",
|
|
1414
|
+
"sideEffectsCacheReadonly",
|
|
1415
|
+
"strictDepBuilds",
|
|
1416
|
+
"unsafePerm",
|
|
1417
|
+
"verifyDepsBeforeRun"
|
|
1418
|
+
],
|
|
1419
|
+
...[
|
|
1289
1420
|
"managePackageManagerVersions",
|
|
1290
|
-
"
|
|
1291
|
-
"minimumReleaseAgeExclude",
|
|
1292
|
-
"modulesDir",
|
|
1293
|
-
"nodeLinker",
|
|
1421
|
+
"nodeDownloadMirrors",
|
|
1294
1422
|
"nodeVersion",
|
|
1295
|
-
"optimisticRepeatInstall",
|
|
1296
1423
|
"packageManagerStrict",
|
|
1297
1424
|
"packageManagerStrictVersion",
|
|
1298
|
-
"
|
|
1299
|
-
"
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
"
|
|
1303
|
-
"
|
|
1425
|
+
"pmOnFail",
|
|
1426
|
+
"runtimeOnFail"
|
|
1427
|
+
],
|
|
1428
|
+
...[
|
|
1429
|
+
"ci",
|
|
1430
|
+
"color",
|
|
1431
|
+
"engineStrict",
|
|
1432
|
+
"loglevel",
|
|
1433
|
+
"npmPath",
|
|
1434
|
+
"recursiveInstall",
|
|
1435
|
+
"updateNotifier",
|
|
1436
|
+
"useBetaCli",
|
|
1437
|
+
"useStderr"
|
|
1438
|
+
],
|
|
1439
|
+
...[
|
|
1440
|
+
"cacheDir",
|
|
1441
|
+
"globalBinDir",
|
|
1442
|
+
"globalDir",
|
|
1443
|
+
"globalPnpmfile",
|
|
1444
|
+
"globalShims",
|
|
1445
|
+
"ignorePnpmfile",
|
|
1446
|
+
"npmrcAuthFile",
|
|
1447
|
+
"pnpmfile",
|
|
1448
|
+
"stateDir"
|
|
1449
|
+
],
|
|
1450
|
+
...["audit", "versioning"],
|
|
1451
|
+
...[
|
|
1452
|
+
"allowNonAppliedPatches",
|
|
1453
|
+
"dedupeDirectDeps",
|
|
1454
|
+
"deployAllFiles",
|
|
1455
|
+
"ignoreCompatibilityDb",
|
|
1456
|
+
"initAuthorEmail",
|
|
1457
|
+
"initAuthorName",
|
|
1458
|
+
"initAuthorUrl",
|
|
1459
|
+
"initLicense",
|
|
1460
|
+
"initVersion",
|
|
1461
|
+
"optimisticRepeatInstall",
|
|
1462
|
+
"saveExact",
|
|
1304
1463
|
"savePrefix",
|
|
1305
|
-
"
|
|
1306
|
-
"shamefullyHoist",
|
|
1307
|
-
"shellEmulator",
|
|
1308
|
-
"stateDir",
|
|
1309
|
-
"supportedArchitectures",
|
|
1310
|
-
"symlink",
|
|
1311
|
-
"tag",
|
|
1312
|
-
"trustPolicy",
|
|
1313
|
-
"trustPolicyExclude",
|
|
1314
|
-
"updateNotifier"
|
|
1464
|
+
"tag"
|
|
1315
1465
|
],
|
|
1316
1466
|
"packages",
|
|
1467
|
+
"packageConfigs",
|
|
1317
1468
|
"overrides",
|
|
1469
|
+
"packageExtensions",
|
|
1318
1470
|
"patchedDependencies",
|
|
1319
|
-
"
|
|
1320
|
-
"
|
|
1471
|
+
"configDependencies",
|
|
1472
|
+
"allowBuilds",
|
|
1321
1473
|
...[
|
|
1322
|
-
"allowedDeprecatedVersions",
|
|
1323
|
-
"allowNonAppliedPatches",
|
|
1324
|
-
"configDependencies",
|
|
1325
1474
|
"ignoredBuiltDependencies",
|
|
1326
|
-
"ignoredOptionalDependencies",
|
|
1327
1475
|
"neverBuiltDependencies",
|
|
1328
1476
|
"onlyBuiltDependencies",
|
|
1329
|
-
"onlyBuiltDependenciesFile"
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1477
|
+
"onlyBuiltDependenciesFile"
|
|
1478
|
+
],
|
|
1479
|
+
"catalog",
|
|
1480
|
+
"catalogs"
|
|
1333
1481
|
],
|
|
1334
1482
|
pathPattern: "^$"
|
|
1335
1483
|
},
|
|
@@ -2042,6 +2190,7 @@ async function typescript(options = {}) {
|
|
|
2042
2190
|
plugins: { "erasable-syntax-only": await interopDefault(import("eslint-plugin-erasable-syntax-only")) },
|
|
2043
2191
|
rules: {
|
|
2044
2192
|
"erasable-syntax-only/enums": "error",
|
|
2193
|
+
"erasable-syntax-only/export-aliases": "error",
|
|
2045
2194
|
"erasable-syntax-only/import-aliases": "error",
|
|
2046
2195
|
"erasable-syntax-only/namespaces": "error",
|
|
2047
2196
|
"erasable-syntax-only/parameter-properties": "error"
|
|
@@ -2336,6 +2485,11 @@ async function yaml(options = {}) {
|
|
|
2336
2485
|
"yaml/flow-sequence-bracket-spacing": "error",
|
|
2337
2486
|
"yaml/indent": ["error", typeof indent === "number" ? indent : 2],
|
|
2338
2487
|
"yaml/key-spacing": "error",
|
|
2488
|
+
"yaml/no-multiple-empty-lines": ["error", {
|
|
2489
|
+
max: 1,
|
|
2490
|
+
maxBOF: 0,
|
|
2491
|
+
maxEOF: 0
|
|
2492
|
+
}],
|
|
2339
2493
|
"yaml/no-tab-indent": "error",
|
|
2340
2494
|
"yaml/quotes": ["error", {
|
|
2341
2495
|
avoidEscape: true,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pengzhanbo/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.9.
|
|
4
|
+
"version": "2.9.2",
|
|
5
5
|
"author": "pengzhanbo <q942450674@outlook.com> (https://github/pengzhanbo/)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/pengzhanbo/configs#readme",
|
|
@@ -22,27 +22,27 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@angular-eslint/eslint-plugin": "^22.
|
|
26
|
-
"@angular-eslint/eslint-plugin-template": "^22.
|
|
27
|
-
"@angular-eslint/template-parser": "^22.
|
|
28
|
-
"@eslint-react/eslint-plugin": "^5.18.
|
|
29
|
-
"@next/eslint-plugin-next": "^16.3.
|
|
25
|
+
"@angular-eslint/eslint-plugin": "^22.2.0",
|
|
26
|
+
"@angular-eslint/eslint-plugin-template": "^22.2.0",
|
|
27
|
+
"@angular-eslint/template-parser": "^22.2.0",
|
|
28
|
+
"@eslint-react/eslint-plugin": "^5.18.7",
|
|
29
|
+
"@next/eslint-plugin-next": "^16.3.4",
|
|
30
30
|
"@prettier/plugin-xml": "^3.4.2",
|
|
31
|
-
"@unocss/eslint-plugin": "^66.
|
|
32
|
-
"astro-eslint-parser": "^3.
|
|
33
|
-
"eslint": "^10.
|
|
31
|
+
"@unocss/eslint-plugin": "^66.9.2",
|
|
32
|
+
"astro-eslint-parser": "^3.1.0",
|
|
33
|
+
"eslint": "^10.9.1",
|
|
34
34
|
"eslint-plugin-astro": "^3.1.0",
|
|
35
35
|
"eslint-plugin-format": "^2.0.1",
|
|
36
|
-
"eslint-plugin-react-refresh": "^0.5.
|
|
37
|
-
"eslint-plugin-solid": "^0.
|
|
38
|
-
"eslint-plugin-svelte": "^3.
|
|
39
|
-
"eslint-plugin-tailwindcss": "^4.
|
|
36
|
+
"eslint-plugin-react-refresh": "^0.5.6",
|
|
37
|
+
"eslint-plugin-solid": "^0.17.0",
|
|
38
|
+
"eslint-plugin-svelte": "^3.23.0",
|
|
39
|
+
"eslint-plugin-tailwindcss": "^4.4.0",
|
|
40
40
|
"eslint-plugin-vue": "^10.10.0",
|
|
41
41
|
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
42
42
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
43
43
|
"prettier-plugin-astro": "^0.14.1",
|
|
44
44
|
"prettier-plugin-slidev": "^1.0.5",
|
|
45
|
-
"svelte-eslint-parser": "^1.8.
|
|
45
|
+
"svelte-eslint-parser": "^1.8.1",
|
|
46
46
|
"vue-eslint-parser": "^10.4.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
|
@@ -113,52 +113,52 @@
|
|
|
113
113
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
|
|
114
114
|
"@eslint/markdown": "^8.0.3",
|
|
115
115
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
116
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
117
|
-
"@typescript-eslint/parser": "^8.
|
|
116
|
+
"@typescript-eslint/eslint-plugin": "^8.69.0",
|
|
117
|
+
"@typescript-eslint/parser": "^8.69.0",
|
|
118
118
|
"@vitest/eslint-plugin": "^1.6.27",
|
|
119
|
-
"eslint-config-flat-gitignore": "^2.
|
|
119
|
+
"eslint-config-flat-gitignore": "^2.4.0",
|
|
120
120
|
"eslint-flat-config-utils": "^3.2.0",
|
|
121
121
|
"eslint-merge-processors": "^2.0.0",
|
|
122
122
|
"eslint-plugin-antfu": "^3.2.3",
|
|
123
123
|
"eslint-plugin-command": "^4.0.0",
|
|
124
|
-
"eslint-plugin-erasable-syntax-only": "^0.
|
|
124
|
+
"eslint-plugin-erasable-syntax-only": "^0.7.1",
|
|
125
125
|
"eslint-plugin-import-lite": "^0.6.0",
|
|
126
|
-
"eslint-plugin-jsdoc": "^64.
|
|
127
|
-
"eslint-plugin-jsonc": "^3.4.
|
|
126
|
+
"eslint-plugin-jsdoc": "^64.3.4",
|
|
127
|
+
"eslint-plugin-jsonc": "^3.4.2",
|
|
128
128
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
129
129
|
"eslint-plugin-n": "^18.3.0",
|
|
130
130
|
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
131
|
-
"eslint-plugin-perfectionist": "^5.
|
|
132
|
-
"eslint-plugin-pnpm": "^1.
|
|
133
|
-
"eslint-plugin-regexp": "^3.
|
|
131
|
+
"eslint-plugin-perfectionist": "^5.11.0",
|
|
132
|
+
"eslint-plugin-pnpm": "^1.9.1",
|
|
133
|
+
"eslint-plugin-regexp": "^3.2.0",
|
|
134
134
|
"eslint-plugin-toml": "^1.5.0",
|
|
135
|
-
"eslint-plugin-unicorn": "^
|
|
135
|
+
"eslint-plugin-unicorn": "^74.0.0",
|
|
136
136
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
137
137
|
"eslint-plugin-yml": "^3.8.1",
|
|
138
|
-
"globals": "^17.
|
|
138
|
+
"globals": "^17.12.0",
|
|
139
139
|
"local-pkg": "^1.2.1",
|
|
140
140
|
"parse-gitignore": "^2.0.0",
|
|
141
141
|
"toml-eslint-parser": "^1.0.3",
|
|
142
142
|
"yaml-eslint-parser": "^2.1.0"
|
|
143
143
|
},
|
|
144
144
|
"devDependencies": {
|
|
145
|
-
"@angular-eslint/eslint-plugin": "^22.
|
|
146
|
-
"@angular-eslint/eslint-plugin-template": "^22.
|
|
147
|
-
"@angular-eslint/template-parser": "^22.
|
|
148
|
-
"@angular/core": "^22.1.
|
|
149
|
-
"@eslint-react/eslint-plugin": "^5.18.
|
|
150
|
-
"@eslint/config-inspector": "^3.
|
|
151
|
-
"@next/eslint-plugin-next": "^16.3.
|
|
145
|
+
"@angular-eslint/eslint-plugin": "^22.2.0",
|
|
146
|
+
"@angular-eslint/eslint-plugin-template": "^22.2.0",
|
|
147
|
+
"@angular-eslint/template-parser": "^22.2.0",
|
|
148
|
+
"@angular/core": "^22.1.4",
|
|
149
|
+
"@eslint-react/eslint-plugin": "^5.18.7",
|
|
150
|
+
"@eslint/config-inspector": "^3.4.0",
|
|
151
|
+
"@next/eslint-plugin-next": "^16.3.4",
|
|
152
152
|
"@prettier/plugin-xml": "^3.4.2",
|
|
153
|
-
"@unocss/eslint-plugin": "^66.
|
|
154
|
-
"astro-eslint-parser": "^3.
|
|
155
|
-
"eslint": "^10.
|
|
153
|
+
"@unocss/eslint-plugin": "^66.9.2",
|
|
154
|
+
"astro-eslint-parser": "^3.1.0",
|
|
155
|
+
"eslint": "^10.9.1",
|
|
156
156
|
"eslint-plugin-astro": "^3.1.0",
|
|
157
157
|
"eslint-plugin-format": "^2.0.1",
|
|
158
|
-
"eslint-plugin-react-refresh": "^0.5.
|
|
159
|
-
"eslint-plugin-solid": "^0.
|
|
160
|
-
"eslint-plugin-svelte": "^3.
|
|
161
|
-
"eslint-plugin-tailwindcss": "^4.
|
|
158
|
+
"eslint-plugin-react-refresh": "^0.5.6",
|
|
159
|
+
"eslint-plugin-solid": "^0.17.0",
|
|
160
|
+
"eslint-plugin-svelte": "^3.23.0",
|
|
161
|
+
"eslint-plugin-tailwindcss": "^4.4.0",
|
|
162
162
|
"eslint-plugin-vue": "^10.10.0",
|
|
163
163
|
"eslint-plugin-vuejs-accessibility": "^2.6.0",
|
|
164
164
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
@@ -166,8 +166,8 @@
|
|
|
166
166
|
"find-up-simple": "^1.0.1",
|
|
167
167
|
"prettier-plugin-astro": "^0.14.1",
|
|
168
168
|
"prettier-plugin-slidev": "^1.0.5",
|
|
169
|
-
"svelte": "^5.
|
|
170
|
-
"svelte-eslint-parser": "^1.8.
|
|
169
|
+
"svelte": "^5.57.0",
|
|
170
|
+
"svelte-eslint-parser": "^1.8.1",
|
|
171
171
|
"vue-eslint-parser": "^10.4.1"
|
|
172
172
|
},
|
|
173
173
|
"inlinedDependencies": {
|