@ntnyq/eslint-config 3.9.3 → 3.10.0

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.js CHANGED
@@ -34,29 +34,31 @@ var parserPlain = {
34
34
 
35
35
  // src/eslint/plugins.ts
36
36
  import * as pluginRegexp from "eslint-plugin-regexp";
37
+ import * as pluginDepend from "eslint-plugin-depend";
37
38
  import { default as default2 } from "eslint-plugin-n";
38
39
  import { default as default3 } from "eslint-plugin-vue";
39
40
  import { default as default4 } from "eslint-plugin-es-x";
40
41
  import { default as default5 } from "eslint-plugin-yml";
41
- import { default as default6 } from "eslint-plugin-toml";
42
- import { default as default7 } from "eslint-plugin-pinia";
43
- import { default as default8 } from "eslint-plugin-ntnyq";
44
- import { default as default9 } from "@eslint/markdown";
45
- import { default as default10 } from "eslint-plugin-antfu";
46
- import { default as default11 } from "eslint-plugin-jsdoc";
47
- import { default as default12 } from "eslint-plugin-jsonc";
42
+ import { default as default6 } from "eslint-plugin-svgo";
43
+ import { default as default7 } from "eslint-plugin-toml";
44
+ import { default as default8 } from "eslint-plugin-pinia";
45
+ import { default as default9 } from "eslint-plugin-ntnyq";
46
+ import { default as default10 } from "@eslint/markdown";
47
+ import { default as default11 } from "eslint-plugin-antfu";
48
+ import { default as default12 } from "eslint-plugin-jsdoc";
49
+ import { default as default13 } from "eslint-plugin-jsonc";
48
50
  import { plugin } from "typescript-eslint";
49
- import { default as default13 } from "eslint-plugin-format";
50
- import { default as default14 } from "@unocss/eslint-plugin";
51
- import { default as default15 } from "@vitest/eslint-plugin";
52
- import { default as default16 } from "eslint-plugin-unicorn";
53
- import { default as default17 } from "eslint-plugin-import-x";
54
- import { default as default18 } from "eslint-plugin-prettier";
55
- import { default as default19 } from "@stylistic/eslint-plugin";
56
- import { default as default20 } from "eslint-plugin-github-action";
57
- import { default as default21 } from "eslint-plugin-perfectionist";
58
- import { default as default22 } from "eslint-plugin-unused-imports";
59
- import { default as default23 } from "@eslint-community/eslint-plugin-eslint-comments";
51
+ import { default as default14 } from "eslint-plugin-format";
52
+ import { default as default15 } from "@unocss/eslint-plugin";
53
+ import { default as default16 } from "@vitest/eslint-plugin";
54
+ import { default as default17 } from "eslint-plugin-unicorn";
55
+ import { default as default18 } from "eslint-plugin-import-x";
56
+ import { default as default19 } from "eslint-plugin-prettier";
57
+ import { default as default20 } from "@stylistic/eslint-plugin";
58
+ import { default as default21 } from "eslint-plugin-github-action";
59
+ import { default as default22 } from "eslint-plugin-perfectionist";
60
+ import { default as default23 } from "eslint-plugin-unused-imports";
61
+ import { default as default24 } from "@eslint-community/eslint-plugin-eslint-comments";
60
62
 
61
63
  // src/eslint/configs.ts
62
64
  import { configs } from "typescript-eslint";
@@ -64,7 +66,7 @@ import { configs } from "typescript-eslint";
64
66
  // src/eslint/processors.ts
65
67
  import { mergeProcessors } from "eslint-merge-processors";
66
68
  import { processorPassThrough } from "eslint-merge-processors";
67
- import { default as default24 } from "eslint-processor-vue-blocks";
69
+ import { default as default25 } from "eslint-processor-vue-blocks";
68
70
 
69
71
  // src/globs.ts
70
72
  var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
@@ -89,6 +91,7 @@ var GLOB_POSTCSS = "**/*.{p,post}css";
89
91
  var GLOB_JSON = "**/*.json";
90
92
  var GLOB_JSON5 = "**/*.json5";
91
93
  var GLOB_JSONC = "**/*.jsonc";
94
+ var GLOB_PACKAGE_JSON = "**/package.json";
92
95
  var GLOB_VUE = "**/*.vue";
93
96
  var GLOB_YAML = "**/*.y?(a)ml";
94
97
  var GLOB_TOML = "**/*.toml";
@@ -374,7 +377,7 @@ var vue = (options = {}) => {
374
377
  if (!sfcBlocks) return processorVueSFC;
375
378
  return mergeProcessors2([
376
379
  processorVueSFC,
377
- default24({
380
+ default25({
378
381
  ...sfcBlocks,
379
382
  blocks: {
380
383
  styles: true,
@@ -928,7 +931,7 @@ var toml = (options = {}) => [
928
931
  parser: parserToml
929
932
  },
930
933
  plugins: {
931
- toml: default6
934
+ toml: default7
932
935
  },
933
936
  rules: {
934
937
  "toml/keys-order": "error",
@@ -973,23 +976,34 @@ var vitest = (options = {}) => [
973
976
  {
974
977
  name: "ntnyq/vitest",
975
978
  plugins: {
976
- vitest: default15
979
+ vitest: default16
977
980
  },
978
981
  files: [...GLOB_TEST],
979
982
  rules: {
980
- ...default15.configs.recommended.rules,
983
+ ...default16.configs.recommended.rules,
981
984
  // Overrides rules
982
985
  ...options.overridesVitestRules
983
986
  }
984
987
  }
985
988
  ];
986
989
 
990
+ // src/configs/svgo.ts
991
+ import { config as createSVGOConfig } from "eslint-plugin-svgo";
992
+ var svgo = (options = {}) => [
993
+ // TODO: remove after fix type
994
+ // @ts-expect-error type
995
+ {
996
+ ...createSVGOConfig(options),
997
+ name: "ntnyq/svgo"
998
+ }
999
+ ];
1000
+
987
1001
  // src/configs/antfu.ts
988
1002
  var antfu = (options = {}) => [
989
1003
  {
990
1004
  name: "ntnyq/antfu",
991
1005
  plugins: {
992
- antfu: default10
1006
+ antfu: default11
993
1007
  },
994
1008
  rules: {
995
1009
  // required `object-curly-newline` to be disabled
@@ -1016,7 +1030,7 @@ var jsdoc = (options = {}) => [
1016
1030
  {
1017
1031
  name: "ntnyq/jsdoc",
1018
1032
  plugins: {
1019
- jsdoc: default11
1033
+ jsdoc: default12
1020
1034
  },
1021
1035
  rules: {
1022
1036
  // Disabled rules
@@ -1046,6 +1060,8 @@ var jsdoc = (options = {}) => [
1046
1060
  // magic-comments
1047
1061
  "vite-ignore",
1048
1062
  "unocss-include",
1063
+ // eslint-plugin-command (block comment only)
1064
+ "regex101",
1049
1065
  // non-standard, but common used
1050
1066
  "compatibility",
1051
1067
  "category",
@@ -1243,13 +1259,13 @@ var jsonc = (options = {}) => [
1243
1259
  name: "ntnyq/jsonc",
1244
1260
  files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
1245
1261
  plugins: {
1246
- jsonc: default12
1262
+ jsonc: default13
1247
1263
  },
1248
1264
  languageOptions: {
1249
1265
  parser: parserJsonc
1250
1266
  },
1251
1267
  rules: {
1252
- ...default12.configs["recommended-with-jsonc"].rules,
1268
+ ...default13.configs["recommended-with-jsonc"].rules,
1253
1269
  "jsonc/no-octal-escape": "error",
1254
1270
  "jsonc/indent": ["error", 2],
1255
1271
  "jsonc/comma-style": ["error", "last"],
@@ -1290,7 +1306,7 @@ var pinia = (options = {}) => {
1290
1306
  name: "ntnyq/pinia",
1291
1307
  files,
1292
1308
  plugins: {
1293
- pinia: default7
1309
+ pinia: default8
1294
1310
  },
1295
1311
  rules: {
1296
1312
  "pinia/prefer-single-store-per-file": "error",
@@ -1318,7 +1334,7 @@ var ntnyq = (options = {}) => [
1318
1334
  {
1319
1335
  name: "ntnyq/ntnyq",
1320
1336
  plugins: {
1321
- ntnyq: default8
1337
+ ntnyq: default9
1322
1338
  },
1323
1339
  rules: {
1324
1340
  "ntnyq/no-member-accessibility": "error",
@@ -1328,6 +1344,47 @@ var ntnyq = (options = {}) => [
1328
1344
  }
1329
1345
  ];
1330
1346
 
1347
+ // src/configs/depend.ts
1348
+ var depend = (options = {}) => {
1349
+ const {
1350
+ files = [GLOB_SRC],
1351
+ // check package.json file
1352
+ packageJson: enableCheckPackageJson = true
1353
+ } = options;
1354
+ const configs2 = [
1355
+ {
1356
+ name: "ntnyq/depend",
1357
+ files,
1358
+ plugins: {
1359
+ depend: pluginDepend
1360
+ },
1361
+ rules: {
1362
+ "depend/ban-dependencies": "error",
1363
+ // Overrides rules
1364
+ ...options.overrides
1365
+ }
1366
+ }
1367
+ ];
1368
+ if (enableCheckPackageJson) {
1369
+ configs2.push({
1370
+ name: "ntnyq/depend/package-json",
1371
+ files: [GLOB_PACKAGE_JSON],
1372
+ plugins: {
1373
+ depend: pluginDepend
1374
+ },
1375
+ languageOptions: {
1376
+ parser: parserJsonc
1377
+ },
1378
+ rules: {
1379
+ "depend/ban-dependencies": "error",
1380
+ // Overrides rules
1381
+ ...options.overrides
1382
+ }
1383
+ });
1384
+ }
1385
+ return configs2;
1386
+ };
1387
+
1331
1388
  // src/configs/regexp.ts
1332
1389
  var regexp = (options = {}) => {
1333
1390
  const recommendedConfig = pluginRegexp.configs["flat/recommended"];
@@ -1359,7 +1416,7 @@ var unocss = (options = {}) => [
1359
1416
  {
1360
1417
  name: "ntnyq/unocss",
1361
1418
  plugins: {
1362
- unocss: default14
1419
+ unocss: default15
1363
1420
  },
1364
1421
  rules: {
1365
1422
  "unocss/order": "error",
@@ -1494,7 +1551,7 @@ var format = (options = {}) => {
1494
1551
  {
1495
1552
  name: "ntnyq/format/setup",
1496
1553
  plugins: {
1497
- format: default13
1554
+ format: default14
1498
1555
  }
1499
1556
  }
1500
1557
  ];
@@ -1568,10 +1625,60 @@ var format = (options = {}) => {
1568
1625
  };
1569
1626
 
1570
1627
  // src/configs/command.ts
1628
+ import { builtinCommands } from "eslint-plugin-command/commands";
1571
1629
  import createCommandConfig from "eslint-plugin-command/config";
1630
+
1631
+ // src/commands/regexper.ts
1632
+ import { defineCommand } from "eslint-plugin-command/commands";
1633
+ var regexper = defineCommand({
1634
+ name: "regexper",
1635
+ // @regexper https://regexper.com/#(%5Cb%7C%5Cs%7C%5E)(%40regexper)(%5Cs%5CS%2B)%3F(%5Cb%7C%5Cs%7C%24)
1636
+ match: /(\b|\s|^)(@regexper)(\s\S+)?(\b|\s|$)/,
1637
+ action(ctx) {
1638
+ const literal = ctx.findNodeBelow((node2) => {
1639
+ return node2.type === "Literal" && "regex" in node2;
1640
+ });
1641
+ if (!literal) {
1642
+ return ctx.reportError("Unable to find a regexp literal to generate");
1643
+ }
1644
+ const [_fullStr = "", spaceBefore = "", commandStr = "", existingUrl = "", _spaceAfter = ""] = ctx.matches;
1645
+ const url = `https://regexper.com/#${encodeURIComponent(literal.regex.pattern)}`;
1646
+ if (existingUrl.trim() === url.trim()) {
1647
+ return;
1648
+ }
1649
+ const indexStart = ctx.comment.range[0] + ctx.matches.index + spaceBefore.length + 2;
1650
+ const indexEnd = indexStart + commandStr.length + existingUrl.length;
1651
+ ctx.report({
1652
+ loc: {
1653
+ start: ctx.source.getLocFromIndex(indexStart),
1654
+ end: ctx.source.getLocFromIndex(indexEnd)
1655
+ },
1656
+ removeComment: false,
1657
+ message: "Update the regexper link",
1658
+ fix(fixer) {
1659
+ return fixer.replaceTextRange([indexStart, indexEnd], `@regexper ${url}`);
1660
+ }
1661
+ });
1662
+ }
1663
+ });
1664
+
1665
+ // src/commands/index.ts
1666
+ var commands = [regexper];
1667
+
1668
+ // src/configs/command.ts
1572
1669
  var command = (options = {}) => [
1573
1670
  {
1574
- ...createCommandConfig(options),
1671
+ ...createCommandConfig({
1672
+ ...options,
1673
+ commands: [
1674
+ // built-in commands
1675
+ ...builtinCommands,
1676
+ // config internal commands
1677
+ ...commands,
1678
+ // user custom commands
1679
+ ...options.commands || []
1680
+ ]
1681
+ }),
1575
1682
  name: "ntnyq/command"
1576
1683
  }
1577
1684
  ];
@@ -1589,16 +1696,19 @@ var ignores = (customIgnores = []) => [
1589
1696
  ];
1590
1697
 
1591
1698
  // src/configs/importX.ts
1699
+ var { createNodeResolver } = default18;
1592
1700
  var importX = (options = {}) => [
1593
1701
  {
1594
1702
  name: "ntnyq/import-x",
1595
1703
  plugins: {
1596
- "import-x": default17
1704
+ "import-x": default18
1597
1705
  },
1598
1706
  settings: {
1599
- "import-x/resolver": {
1600
- node: { extensions: [".js", ".mjs", ".ts", ".mts", ".d.ts"] }
1601
- }
1707
+ "import-x/resolver-next": [
1708
+ createNodeResolver({
1709
+ extensions: [".js", ".mjs", ".ts", ".mts", ".d.ts", ".json"]
1710
+ })
1711
+ ]
1602
1712
  },
1603
1713
  rules: {
1604
1714
  "import-x/no-unresolved": "off",
@@ -1634,7 +1744,7 @@ var unicorn = (options = {}) => [
1634
1744
  {
1635
1745
  name: "ntnyq/unicorn",
1636
1746
  plugins: {
1637
- unicorn: default16
1747
+ unicorn: default17
1638
1748
  },
1639
1749
  rules: {
1640
1750
  "unicorn/escape-case": "error",
@@ -1756,8 +1866,8 @@ var specials = (options = {}) => [
1756
1866
  name: "ntnyq/specials/config-file",
1757
1867
  files: [`**/*.config*.${GLOB_SRC_EXT}`],
1758
1868
  plugins: {
1759
- "import-x": default17,
1760
- perfectionist: default21
1869
+ "import-x": default18,
1870
+ perfectionist: default22
1761
1871
  },
1762
1872
  rules: {
1763
1873
  "no-console": "off",
@@ -1785,10 +1895,10 @@ var comments = (options = {}) => [
1785
1895
  {
1786
1896
  name: "ntnyq/eslint-comments",
1787
1897
  plugins: {
1788
- "@eslint-community/eslint-comments": default23
1898
+ "@eslint-community/eslint-comments": default24
1789
1899
  },
1790
1900
  rules: {
1791
- ...default23.configs.recommended.rules,
1901
+ ...default24.configs.recommended.rules,
1792
1902
  "@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
1793
1903
  // Overrides rules
1794
1904
  ...options.overrides
@@ -1798,10 +1908,10 @@ var comments = (options = {}) => [
1798
1908
 
1799
1909
  // src/configs/markdown.ts
1800
1910
  var markdown = (options = {}) => {
1801
- if (!Array.isArray(default9.configs?.processor)) return [];
1911
+ if (!Array.isArray(default10.configs?.processor)) return [];
1802
1912
  const { files = [`${GLOB_MARKDOWN}/${GLOB_SRC}`], extensions = [] } = options;
1803
1913
  return [
1804
- ...default9.configs.processor.map((config) => ({
1914
+ ...default10.configs.processor.map((config) => ({
1805
1915
  ...config,
1806
1916
  name: `ntnyq/${config.name}`
1807
1917
  })),
@@ -1810,7 +1920,7 @@ var markdown = (options = {}) => {
1810
1920
  files,
1811
1921
  ignores: [GLOB_MARKDOWN_NESTED],
1812
1922
  processor: mergeProcessors([
1813
- default9.processors.markdown,
1923
+ default10.processors.markdown,
1814
1924
  // Just pass through processor
1815
1925
  processorPassThrough
1816
1926
  ])
@@ -1875,7 +1985,7 @@ var prettier = (options = {}) => {
1875
1985
  {
1876
1986
  name: "ntnyq/prettier",
1877
1987
  plugins: {
1878
- prettier: default18
1988
+ prettier: default19
1879
1989
  },
1880
1990
  rules: {
1881
1991
  "vue/array-bracket-newline": "off",
@@ -1915,7 +2025,7 @@ var prettier = (options = {}) => {
1915
2025
  "vue/space-infix-ops": "off",
1916
2026
  "vue/space-unary-ops": "off",
1917
2027
  "vue/template-curly-spacing": "off",
1918
- ...default18.configs.recommended.rules,
2028
+ ...default19.configs.recommended.rules,
1919
2029
  "prettier/prettier": options.severity || options.level || "warn",
1920
2030
  // Overrides rules
1921
2031
  ...options.overrides
@@ -1928,7 +2038,7 @@ var prettier = (options = {}) => {
1928
2038
  name: "ntnyq/prettier/disabled",
1929
2039
  files: [...disabledFiles, ...userDisabledFiles],
1930
2040
  plugins: {
1931
- prettier: default18
2041
+ prettier: default19
1932
2042
  },
1933
2043
  rules: {
1934
2044
  "prettier/prettier": "off"
@@ -1942,7 +2052,7 @@ var stylistic = (options = {}) => [
1942
2052
  {
1943
2053
  name: "ntnyq/stylistic",
1944
2054
  plugins: {
1945
- "@stylistic": default19
2055
+ "@stylistic": default20
1946
2056
  },
1947
2057
  rules: {
1948
2058
  // Only rules are not conflicted with Prettier
@@ -2276,7 +2386,7 @@ var typescript = (options = {}) => {
2276
2386
  name: "ntnyq/ts/setup",
2277
2387
  plugins: {
2278
2388
  "@typescript-eslint": plugin,
2279
- antfu: default10
2389
+ antfu: default11
2280
2390
  }
2281
2391
  },
2282
2392
  ...enableTypeAwareLint ? [
@@ -2500,7 +2610,7 @@ var perfectionist = (options = {}) => {
2500
2610
  {
2501
2611
  name: "ntnyq/perfectionist/common",
2502
2612
  plugins: {
2503
- perfectionist: default21
2613
+ perfectionist: default22
2504
2614
  },
2505
2615
  rules: {
2506
2616
  "perfectionist/sort-imports": [
@@ -2546,14 +2656,17 @@ var perfectionist = (options = {}) => {
2546
2656
  type: "natural",
2547
2657
  ignoreCase: true,
2548
2658
  internalPattern: ["^~/.+", "^@/.+", "^#.+"],
2549
- newlinesBetween: "ignore"
2659
+ newlinesBetween: "ignore",
2660
+ partitionByComment: true
2550
2661
  }
2551
2662
  ],
2552
2663
  "perfectionist/sort-exports": [
2553
2664
  "error",
2554
2665
  {
2555
2666
  order: "asc",
2556
- type: "line-length"
2667
+ type: "line-length",
2668
+ groupKind: "values-first",
2669
+ partitionByComment: true
2557
2670
  }
2558
2671
  ],
2559
2672
  "perfectionist/sort-named-exports": [
@@ -2562,7 +2675,8 @@ var perfectionist = (options = {}) => {
2562
2675
  type: "alphabetical",
2563
2676
  order: "asc",
2564
2677
  ignoreCase: true,
2565
- groupKind: "values-first"
2678
+ groupKind: "values-first",
2679
+ partitionByComment: true
2566
2680
  }
2567
2681
  ],
2568
2682
  "perfectionist/sort-named-imports": [
@@ -2572,7 +2686,8 @@ var perfectionist = (options = {}) => {
2572
2686
  order: "asc",
2573
2687
  ignoreCase: true,
2574
2688
  ignoreAlias: false,
2575
- groupKind: "values-first"
2689
+ groupKind: "values-first",
2690
+ partitionByComment: true
2576
2691
  }
2577
2692
  ],
2578
2693
  // Overrides rules
@@ -2585,7 +2700,7 @@ var perfectionist = (options = {}) => {
2585
2700
  name: "ntnyq/perfectionist/enums",
2586
2701
  files: [`**/enums/${GLOB_SRC}`, `**/enums.${GLOB_SRC_EXT}`],
2587
2702
  plugins: {
2588
- perfectionist: default21
2703
+ perfectionist: default22
2589
2704
  },
2590
2705
  rules: {
2591
2706
  "perfectionist/sort-enums": [
@@ -2614,7 +2729,7 @@ var perfectionist = (options = {}) => {
2614
2729
  name: "ntnyq/perfectionist/types",
2615
2730
  files: [...GLOB_TYPES],
2616
2731
  plugins: {
2617
- perfectionist: default21
2732
+ perfectionist: default22
2618
2733
  },
2619
2734
  rules: {
2620
2735
  "perfectionist/sort-heritage-clauses": [
@@ -2678,7 +2793,7 @@ var perfectionist = (options = {}) => {
2678
2793
  name: "ntnyq/perfectionist/constants",
2679
2794
  files: [`**/constants/${GLOB_SRC}`, `**/constants.${GLOB_SRC_EXT}`],
2680
2795
  plugins: {
2681
- perfectionist: default21
2796
+ perfectionist: default22
2682
2797
  },
2683
2798
  rules: {
2684
2799
  "perfectionist/sort-maps": [
@@ -2727,7 +2842,7 @@ var unusedImports = (options = {}) => [
2727
2842
  {
2728
2843
  name: "ntnyq/unused-imports",
2729
2844
  plugins: {
2730
- "unused-imports": default22
2845
+ "unused-imports": default23
2731
2846
  },
2732
2847
  rules: {
2733
2848
  "@typescript-eslint/no-unused-vars": "off",
@@ -2774,6 +2889,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
2774
2889
  toml: enableTOML = true,
2775
2890
  jsonc: enableJSONC = true,
2776
2891
  antfu: enableAntfu = true,
2892
+ depend: enableDepend = true,
2777
2893
  regexp: enableRegexp = true,
2778
2894
  unicorn: enableUnicorn = true,
2779
2895
  prettier: enablePrettier = true,
@@ -2781,7 +2897,9 @@ function defineESLintConfig(options = {}, ...userConfigs) {
2781
2897
  stylistic: enableStylistic = true,
2782
2898
  gitignore: enableGitIgnore = true,
2783
2899
  githubAction: enableGitHubAction = true,
2784
- perfectionist: enablePerfectionist = true
2900
+ perfectionist: enablePerfectionist = true,
2901
+ // disabled by default
2902
+ svgo: enableSVGO = false
2785
2903
  } = options;
2786
2904
  const configs2 = [];
2787
2905
  if (enableVue) {
@@ -2934,6 +3052,14 @@ function defineESLintConfig(options = {}, ...userConfigs) {
2934
3052
  })
2935
3053
  );
2936
3054
  }
3055
+ if (enableDepend) {
3056
+ configs2.push(
3057
+ ...depend({
3058
+ ...resolveSubOptions(options, "depend"),
3059
+ overrides: getOverrides(options, "depend")
3060
+ })
3061
+ );
3062
+ }
2937
3063
  if (enableGitHubAction) {
2938
3064
  configs2.push(
2939
3065
  ...githubAction({
@@ -2941,6 +3067,13 @@ function defineESLintConfig(options = {}, ...userConfigs) {
2941
3067
  })
2942
3068
  );
2943
3069
  }
3070
+ if (enableSVGO) {
3071
+ configs2.push(
3072
+ ...svgo({
3073
+ ...resolveSubOptions(options, "svgo")
3074
+ })
3075
+ );
3076
+ }
2944
3077
  const configSpecials = specials({
2945
3078
  ...resolveSubOptions(options, "specials")
2946
3079
  });
@@ -2978,6 +3111,7 @@ export {
2978
3111
  GLOB_MARKDOWN_CODE,
2979
3112
  GLOB_MARKDOWN_NESTED,
2980
3113
  GLOB_NODE_MODULES,
3114
+ GLOB_PACKAGE_JSON,
2981
3115
  GLOB_PINIA_STORE,
2982
3116
  GLOB_POSTCSS,
2983
3117
  GLOB_SCSS,
@@ -2996,6 +3130,7 @@ export {
2996
3130
  command,
2997
3131
  comments,
2998
3132
  defineESLintConfig,
3133
+ depend,
2999
3134
  esX,
3000
3135
  format,
3001
3136
  getOverrides,
@@ -3027,38 +3162,41 @@ export {
3027
3162
  parserYaml,
3028
3163
  perfectionist,
3029
3164
  pinia,
3030
- default10 as pluginAntfu,
3031
- default23 as pluginComments,
3165
+ default11 as pluginAntfu,
3166
+ default24 as pluginComments,
3167
+ pluginDepend,
3032
3168
  default4 as pluginEsX,
3033
- default13 as pluginFormat,
3034
- default20 as pluginGitHubAction,
3035
- default17 as pluginImportX,
3036
- default11 as pluginJsdoc,
3037
- default12 as pluginJsonc,
3038
- default9 as pluginMarkdown,
3169
+ default14 as pluginFormat,
3170
+ default21 as pluginGitHubAction,
3171
+ default18 as pluginImportX,
3172
+ default12 as pluginJsdoc,
3173
+ default13 as pluginJsonc,
3174
+ default10 as pluginMarkdown,
3039
3175
  default2 as pluginNode,
3040
- default8 as pluginNtnyq,
3041
- default21 as pluginPerfectionist,
3042
- default7 as pluginPinia,
3043
- default18 as pluginPrettier,
3176
+ default9 as pluginNtnyq,
3177
+ default22 as pluginPerfectionist,
3178
+ default8 as pluginPinia,
3179
+ default19 as pluginPrettier,
3044
3180
  pluginRegexp,
3045
- default19 as pluginStylistic,
3046
- default6 as pluginToml,
3181
+ default20 as pluginStylistic,
3182
+ default6 as pluginSvgo,
3183
+ default7 as pluginToml,
3047
3184
  plugin as pluginTypeScript,
3048
- default16 as pluginUnicorn,
3049
- default14 as pluginUnoCSS,
3050
- default22 as pluginUnusedImports,
3051
- default15 as pluginVitest,
3185
+ default17 as pluginUnicorn,
3186
+ default15 as pluginUnoCSS,
3187
+ default23 as pluginUnusedImports,
3188
+ default16 as pluginVitest,
3052
3189
  default3 as pluginVue,
3053
3190
  default5 as pluginYaml,
3054
3191
  prettier,
3055
3192
  processorPassThrough,
3056
- default24 as processorVueBlocks,
3193
+ default25 as processorVueBlocks,
3057
3194
  regexp,
3058
3195
  resolveSubOptions,
3059
3196
  sort,
3060
3197
  specials,
3061
3198
  stylistic,
3199
+ svgo,
3062
3200
  test,
3063
3201
  toArray,
3064
3202
  toml,
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "3.9.3",
5
- "packageManager": "pnpm@9.15.0",
4
+ "version": "3.10.0",
5
+ "packageManager": "pnpm@9.15.1",
6
6
  "description": "An opinionated ESLint config preset of ntnyq",
7
7
  "keywords": [
8
8
  "eslint",
@@ -40,14 +40,13 @@
40
40
  },
41
41
  "scripts": {
42
42
  "build": "pnpm run generate:type && tsup",
43
- "clean": "rimraf dist",
44
43
  "dev": "tsup --watch src",
45
44
  "generate:site": "tsx scripts/generateSite.ts",
46
45
  "generate:type": "tsx scripts/generateType.ts",
47
46
  "lint": "eslint --flag unstable_ts_config .",
48
47
  "prepare": "husky",
49
48
  "release": "run-s release:check release:version",
50
- "release:check": "run-s clean build lint typecheck",
49
+ "release:check": "run-s build lint typecheck",
51
50
  "release:version": "bumpp && npm publish",
52
51
  "test": "vitest",
53
52
  "typecheck": "tsc --noEmit"
@@ -60,25 +59,27 @@
60
59
  "@eslint/js": "^9.17.0",
61
60
  "@eslint/markdown": "^6.2.1",
62
61
  "@stylistic/eslint-plugin": "^2.12.1",
63
- "@unocss/eslint-plugin": "^0.65.1",
64
- "@vitest/eslint-plugin": "^1.1.18",
62
+ "@unocss/eslint-plugin": "^0.65.2",
63
+ "@vitest/eslint-plugin": "^1.1.20",
65
64
  "eslint-config-flat-gitignore": "^0.3.0",
66
65
  "eslint-flat-config-utils": "^0.4.0",
67
66
  "eslint-merge-processors": "^0.1.0",
68
67
  "eslint-plugin-antfu": "^2.7.0",
69
68
  "eslint-plugin-command": "^0.2.7",
69
+ "eslint-plugin-depend": "^0.12.0",
70
70
  "eslint-plugin-es-x": "^8.4.1",
71
71
  "eslint-plugin-format": "^0.1.3",
72
72
  "eslint-plugin-github-action": "^0.0.12",
73
- "eslint-plugin-import-x": "^4.5.1",
73
+ "eslint-plugin-import-x": "^4.6.1",
74
74
  "eslint-plugin-jsdoc": "^50.6.1",
75
75
  "eslint-plugin-jsonc": "^2.18.2",
76
- "eslint-plugin-n": "^17.15.0",
76
+ "eslint-plugin-n": "^17.15.1",
77
77
  "eslint-plugin-ntnyq": "^0.7.1",
78
- "eslint-plugin-perfectionist": "^4.3.0",
78
+ "eslint-plugin-perfectionist": "^4.4.0",
79
79
  "eslint-plugin-pinia": "^0.4.1",
80
80
  "eslint-plugin-prettier": "^5.2.1",
81
81
  "eslint-plugin-regexp": "^2.7.0",
82
+ "eslint-plugin-svgo": "^0.1.1",
82
83
  "eslint-plugin-toml": "^0.12.0",
83
84
  "eslint-plugin-unicorn": "^56.0.1",
84
85
  "eslint-plugin-unused-imports": "^4.1.4",
@@ -104,11 +105,10 @@
104
105
  "jiti": "^2.4.2",
105
106
  "nano-staged": "^0.8.0",
106
107
  "npm-run-all2": "^7.0.2",
107
- "rimraf": "^6.0.1",
108
108
  "tsup": "^8.3.5",
109
109
  "tsx": "^4.19.2",
110
110
  "typescript": "^5.7.2",
111
- "vitest": "^3.0.0-beta.2",
111
+ "vitest": "^3.0.0-beta.3",
112
112
  "zx": "^8.2.4"
113
113
  },
114
114
  "engines": {