@ntnyq/eslint-config 3.8.0 → 3.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -36,25 +36,26 @@ var parserPlain = {
36
36
  import * as pluginRegexp from "eslint-plugin-regexp";
37
37
  import { default as default2 } from "eslint-plugin-n";
38
38
  import { default as default3 } from "eslint-plugin-vue";
39
- import { default as default4 } from "eslint-plugin-yml";
40
- import { default as default5 } from "eslint-plugin-toml";
41
- import { default as default6 } from "eslint-plugin-ntnyq";
42
- import { default as default7 } from "@eslint/markdown";
43
- import { default as default8 } from "eslint-plugin-antfu";
44
- import { default as default9 } from "eslint-plugin-jsdoc";
45
- import { default as default10 } from "eslint-plugin-jsonc";
39
+ import { default as default4 } from "eslint-plugin-es-x";
40
+ 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-ntnyq";
43
+ import { default as default8 } from "@eslint/markdown";
44
+ import { default as default9 } from "eslint-plugin-antfu";
45
+ import { default as default10 } from "eslint-plugin-jsdoc";
46
+ import { default as default11 } from "eslint-plugin-jsonc";
46
47
  import { plugin } from "typescript-eslint";
47
- import { default as default11 } from "eslint-plugin-format";
48
- import { default as default12 } from "@unocss/eslint-plugin";
49
- import { default as default13 } from "@vitest/eslint-plugin";
50
- import { default as default14 } from "eslint-plugin-unicorn";
51
- import { default as default15 } from "eslint-plugin-import-x";
52
- import { default as default16 } from "eslint-plugin-prettier";
53
- import { default as default17 } from "@stylistic/eslint-plugin";
54
- import { default as default18 } from "eslint-plugin-github-action";
55
- import { default as default19 } from "eslint-plugin-perfectionist";
56
- import { default as default20 } from "eslint-plugin-unused-imports";
57
- import { default as default21 } from "@eslint-community/eslint-plugin-eslint-comments";
48
+ import { default as default12 } from "eslint-plugin-format";
49
+ import { default as default13 } from "@unocss/eslint-plugin";
50
+ import { default as default14 } from "@vitest/eslint-plugin";
51
+ import { default as default15 } from "eslint-plugin-unicorn";
52
+ import { default as default16 } from "eslint-plugin-import-x";
53
+ import { default as default17 } from "eslint-plugin-prettier";
54
+ import { default as default18 } from "@stylistic/eslint-plugin";
55
+ import { default as default19 } from "eslint-plugin-github-action";
56
+ import { default as default20 } from "eslint-plugin-perfectionist";
57
+ import { default as default21 } from "eslint-plugin-unused-imports";
58
+ import { default as default22 } from "@eslint-community/eslint-plugin-eslint-comments";
58
59
 
59
60
  // src/eslint/configs.ts
60
61
  import { configs } from "typescript-eslint";
@@ -62,7 +63,7 @@ import { configs } from "typescript-eslint";
62
63
  // src/eslint/processors.ts
63
64
  import { mergeProcessors } from "eslint-merge-processors";
64
65
  import { processorPassThrough } from "eslint-merge-processors";
65
- import { default as default22 } from "eslint-processor-vue-blocks";
66
+ import { default as default23 } from "eslint-processor-vue-blocks";
66
67
 
67
68
  // src/globs.ts
68
69
  var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
@@ -260,7 +261,7 @@ var unCategorizedRules = {
260
261
  "vue/next-tick-style": ["error", "promise"],
261
262
  "vue/v-for-delimiter-style": ["error", "in"],
262
263
  "vue/no-restricted-v-bind": ["error", "/^v-/"],
263
- "vue/slot-name-casing": ["error", "camelCase"],
264
+ "vue/slot-name-casing": ["error", "kebab-case"],
264
265
  "vue/custom-event-name-casing": ["error", "camelCase"],
265
266
  "vue/define-props-declaration": ["error", "type-based"],
266
267
  "vue/define-emits-declaration": ["error", "type-literal"],
@@ -371,7 +372,7 @@ var vue = (options = {}) => {
371
372
  if (!sfcBlocks) return processorVueSFC;
372
373
  return mergeProcessors2([
373
374
  processorVueSFC,
374
- default22({
375
+ default23({
375
376
  ...sfcBlocks,
376
377
  blocks: {
377
378
  styles: true,
@@ -526,11 +527,11 @@ var yml = (options = {}) => [
526
527
  parser: parserYaml
527
528
  },
528
529
  plugins: {
529
- yml: default4
530
+ yml: default5
530
531
  },
531
532
  rules: {
532
- ...default4.configs.standard.rules,
533
- ...default4.configs.prettier.rules,
533
+ ...default5.configs.standard.rules,
534
+ ...default5.configs.prettier.rules,
534
535
  "yml/no-empty-mapping-value": "off",
535
536
  "yml/quotes": ["error", { avoidEscape: false, prefer: "single" }],
536
537
  // Overrides rules
@@ -539,6 +540,20 @@ var yml = (options = {}) => [
539
540
  }
540
541
  ];
541
542
 
543
+ // src/configs/esX.ts
544
+ var esX = (options = {}) => [
545
+ {
546
+ name: "ntnyq/es-x",
547
+ plugins: {
548
+ "es-x": default4
549
+ },
550
+ rules: {
551
+ // Overrides rules
552
+ ...options.overrides
553
+ }
554
+ }
555
+ ];
556
+
542
557
  // src/configs/node.ts
543
558
  var node = (options = {}) => [
544
559
  {
@@ -911,7 +926,7 @@ var toml = (options = {}) => [
911
926
  parser: parserToml
912
927
  },
913
928
  plugins: {
914
- toml: default5
929
+ toml: default6
915
930
  },
916
931
  rules: {
917
932
  "toml/keys-order": "error",
@@ -956,11 +971,11 @@ var vitest = (options = {}) => [
956
971
  {
957
972
  name: "ntnyq/vitest",
958
973
  plugins: {
959
- vitest: default13
974
+ vitest: default14
960
975
  },
961
976
  files: [...GLOB_TEST],
962
977
  rules: {
963
- ...default13.configs.recommended.rules,
978
+ ...default14.configs.recommended.rules,
964
979
  // Overrides rules
965
980
  ...options.overridesVitestRules
966
981
  }
@@ -972,7 +987,7 @@ var antfu = (options = {}) => [
972
987
  {
973
988
  name: "ntnyq/antfu",
974
989
  plugins: {
975
- antfu: default8
990
+ antfu: default9
976
991
  },
977
992
  rules: {
978
993
  // required `object-curly-newline` to be disabled
@@ -999,7 +1014,7 @@ var jsdoc = (options = {}) => [
999
1014
  {
1000
1015
  name: "ntnyq/jsdoc",
1001
1016
  plugins: {
1002
- jsdoc: default9
1017
+ jsdoc: default10
1003
1018
  },
1004
1019
  rules: {
1005
1020
  // Disabled rules
@@ -1221,13 +1236,13 @@ var jsonc = (options = {}) => [
1221
1236
  name: "ntnyq/jsonc",
1222
1237
  files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
1223
1238
  plugins: {
1224
- jsonc: default10
1239
+ jsonc: default11
1225
1240
  },
1226
1241
  languageOptions: {
1227
1242
  parser: parserJsonc
1228
1243
  },
1229
1244
  rules: {
1230
- ...default10.configs["recommended-with-jsonc"].rules,
1245
+ ...default11.configs["recommended-with-jsonc"].rules,
1231
1246
  "jsonc/no-octal-escape": "error",
1232
1247
  "jsonc/indent": ["error", 2],
1233
1248
  "jsonc/comma-style": ["error", "last"],
@@ -1265,7 +1280,7 @@ var ntnyq = (options = {}) => [
1265
1280
  {
1266
1281
  name: "ntnyq/ntnyq",
1267
1282
  plugins: {
1268
- ntnyq: default6
1283
+ ntnyq: default7
1269
1284
  },
1270
1285
  rules: {
1271
1286
  "ntnyq/no-member-accessibility": "error",
@@ -1306,7 +1321,7 @@ var unocss = (options = {}) => [
1306
1321
  {
1307
1322
  name: "ntnyq/unocss",
1308
1323
  plugins: {
1309
- unocss: default12
1324
+ unocss: default13
1310
1325
  },
1311
1326
  rules: {
1312
1327
  "unocss/order": "error",
@@ -1440,7 +1455,7 @@ var format = (options = {}) => {
1440
1455
  {
1441
1456
  name: "ntnyq/format/setup",
1442
1457
  plugins: {
1443
- format: default11
1458
+ format: default12
1444
1459
  }
1445
1460
  }
1446
1461
  ];
@@ -1539,7 +1554,7 @@ var importX = (options = {}) => [
1539
1554
  {
1540
1555
  name: "ntnyq/import-x",
1541
1556
  plugins: {
1542
- "import-x": default15
1557
+ "import-x": default16
1543
1558
  },
1544
1559
  settings: {
1545
1560
  "import-x/resolver": {
@@ -1580,7 +1595,7 @@ var unicorn = (options = {}) => [
1580
1595
  {
1581
1596
  name: "ntnyq/unicorn",
1582
1597
  plugins: {
1583
- unicorn: default14
1598
+ unicorn: default15
1584
1599
  },
1585
1600
  rules: {
1586
1601
  "unicorn/escape-case": "error",
@@ -1702,8 +1717,8 @@ var specials = (options = {}) => [
1702
1717
  name: "ntnyq/specials/config-file",
1703
1718
  files: [`**/*.config*.${GLOB_SRC_EXT}`],
1704
1719
  plugins: {
1705
- "import-x": default15,
1706
- perfectionist: default19
1720
+ "import-x": default16,
1721
+ perfectionist: default20
1707
1722
  },
1708
1723
  rules: {
1709
1724
  "no-console": "off",
@@ -1729,10 +1744,10 @@ var comments = (options = {}) => [
1729
1744
  {
1730
1745
  name: "ntnyq/eslint-comments",
1731
1746
  plugins: {
1732
- "@eslint-community/eslint-comments": default21
1747
+ "@eslint-community/eslint-comments": default22
1733
1748
  },
1734
1749
  rules: {
1735
- ...default21.configs.recommended.rules,
1750
+ ...default22.configs.recommended.rules,
1736
1751
  "@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
1737
1752
  // Overrides rules
1738
1753
  ...options.overrides
@@ -1742,10 +1757,10 @@ var comments = (options = {}) => [
1742
1757
 
1743
1758
  // src/configs/markdown.ts
1744
1759
  var markdown = (options = {}) => {
1745
- if (!Array.isArray(default7.configs?.processor)) return [];
1760
+ if (!Array.isArray(default8.configs?.processor)) return [];
1746
1761
  const { files = [`${GLOB_MARKDOWN}/${GLOB_SRC}`], extensions = [] } = options;
1747
1762
  return [
1748
- ...default7.configs.processor.map((config) => ({
1763
+ ...default8.configs.processor.map((config) => ({
1749
1764
  ...config,
1750
1765
  name: `ntnyq/${config.name}`
1751
1766
  })),
@@ -1754,7 +1769,7 @@ var markdown = (options = {}) => {
1754
1769
  files,
1755
1770
  ignores: [GLOB_MARKDOWN_NESTED],
1756
1771
  processor: mergeProcessors([
1757
- default7.processors.markdown,
1772
+ default8.processors.markdown,
1758
1773
  // Just pass through processor
1759
1774
  processorPassThrough
1760
1775
  ])
@@ -1819,7 +1834,7 @@ var prettier = (options = {}) => {
1819
1834
  {
1820
1835
  name: "ntnyq/prettier",
1821
1836
  plugins: {
1822
- prettier: default16
1837
+ prettier: default17
1823
1838
  },
1824
1839
  rules: {
1825
1840
  "vue/array-bracket-newline": "off",
@@ -1859,7 +1874,7 @@ var prettier = (options = {}) => {
1859
1874
  "vue/space-infix-ops": "off",
1860
1875
  "vue/space-unary-ops": "off",
1861
1876
  "vue/template-curly-spacing": "off",
1862
- ...default16.configs.recommended.rules,
1877
+ ...default17.configs.recommended.rules,
1863
1878
  "prettier/prettier": options.level || "warn",
1864
1879
  // Overrides rules
1865
1880
  ...options.overrides
@@ -1872,7 +1887,7 @@ var prettier = (options = {}) => {
1872
1887
  name: "ntnyq/prettier/disabled",
1873
1888
  files: [...disabledFiles, ...userDisabledFiles],
1874
1889
  plugins: {
1875
- prettier: default16
1890
+ prettier: default17
1876
1891
  },
1877
1892
  rules: {
1878
1893
  "prettier/prettier": "off"
@@ -1886,7 +1901,7 @@ var stylistic = (options = {}) => [
1886
1901
  {
1887
1902
  name: "ntnyq/stylistic",
1888
1903
  plugins: {
1889
- "@stylistic": default17
1904
+ "@stylistic": default18
1890
1905
  },
1891
1906
  rules: {
1892
1907
  // Only rules are not conflicted with Prettier
@@ -2220,7 +2235,7 @@ var typescript = (options = {}) => {
2220
2235
  name: "ntnyq/ts/setup",
2221
2236
  plugins: {
2222
2237
  "@typescript-eslint": plugin,
2223
- antfu: default8
2238
+ antfu: default9
2224
2239
  }
2225
2240
  },
2226
2241
  ...enableTypeAwareLint ? [
@@ -2367,7 +2382,7 @@ var githubAction = (options = {}) => {
2367
2382
  };
2368
2383
 
2369
2384
  // src/configs/perfectionist.ts
2370
- var sharedGroups = [
2385
+ var sharedGroupsForInterfaceOrObjectTypes = [
2371
2386
  "required-property",
2372
2387
  "optional-property",
2373
2388
  "required-method",
@@ -2380,9 +2395,7 @@ var sharedGroups = [
2380
2395
  "index-signature",
2381
2396
  "multiline-index-signature"
2382
2397
  ];
2383
- var defaultSortInterfacesGroups = [...sharedGroups];
2384
- var defaultSortObjectTypesGroups = [...sharedGroups];
2385
- var defaultSortIntersectionTypesGroups = [
2398
+ var sharedGroupsForIntersectionOrUnion = [
2386
2399
  /**
2387
2400
  * eg. 'foobar', 24, false
2388
2401
  */
@@ -2432,6 +2445,10 @@ var defaultSortIntersectionTypesGroups = [
2432
2445
  */
2433
2446
  "nullish"
2434
2447
  ];
2448
+ var defaultSortInterfacesGroups = [...sharedGroupsForInterfaceOrObjectTypes];
2449
+ var defaultSortObjectTypesGroups = [...sharedGroupsForInterfaceOrObjectTypes];
2450
+ var defaultSortIntersectionTypesGroups = [...sharedGroupsForIntersectionOrUnion];
2451
+ var defaultSortUnionTypesGroups = [...sharedGroupsForIntersectionOrUnion];
2435
2452
  var perfectionist = (options = {}) => {
2436
2453
  const {
2437
2454
  sortEnums: enableSortEnums = true,
@@ -2442,7 +2459,7 @@ var perfectionist = (options = {}) => {
2442
2459
  {
2443
2460
  name: "ntnyq/perfectionist/common",
2444
2461
  plugins: {
2445
- perfectionist: default19
2462
+ perfectionist: default20
2446
2463
  },
2447
2464
  rules: {
2448
2465
  "perfectionist/sort-imports": [
@@ -2527,7 +2544,7 @@ var perfectionist = (options = {}) => {
2527
2544
  name: "ntnyq/perfectionist/enums",
2528
2545
  files: [`**/enums/${GLOB_SRC}`, `**/enums.${GLOB_SRC_EXT}`],
2529
2546
  plugins: {
2530
- perfectionist: default19
2547
+ perfectionist: default20
2531
2548
  },
2532
2549
  rules: {
2533
2550
  "perfectionist/sort-enums": [
@@ -2556,7 +2573,7 @@ var perfectionist = (options = {}) => {
2556
2573
  name: "ntnyq/perfectionist/types",
2557
2574
  files: [...GLOB_TYPES],
2558
2575
  plugins: {
2559
- perfectionist: default19
2576
+ perfectionist: default20
2560
2577
  },
2561
2578
  rules: {
2562
2579
  "perfectionist/sort-heritage-clauses": [
@@ -2581,7 +2598,7 @@ var perfectionist = (options = {}) => {
2581
2598
  type: "alphabetical",
2582
2599
  order: "asc",
2583
2600
  partitionByComment: true,
2584
- groups: [...defaultSortIntersectionTypesGroups]
2601
+ groups: defaultSortIntersectionTypesGroups
2585
2602
  }
2586
2603
  ],
2587
2604
  "perfectionist/sort-modules": [
@@ -2598,7 +2615,7 @@ var perfectionist = (options = {}) => {
2598
2615
  type: "alphabetical",
2599
2616
  order: "asc",
2600
2617
  partitionByComment: true,
2601
- groups: []
2618
+ groups: defaultSortObjectTypesGroups
2602
2619
  }
2603
2620
  ],
2604
2621
  "perfectionist/sort-union-types": [
@@ -2606,7 +2623,8 @@ var perfectionist = (options = {}) => {
2606
2623
  {
2607
2624
  type: "alphabetical",
2608
2625
  order: "asc",
2609
- partitionByComment: true
2626
+ partitionByComment: true,
2627
+ groups: defaultSortUnionTypesGroups
2610
2628
  }
2611
2629
  ],
2612
2630
  // Overrides rules
@@ -2619,7 +2637,7 @@ var perfectionist = (options = {}) => {
2619
2637
  name: "ntnyq/perfectionist/constants",
2620
2638
  files: [`**/constants/${GLOB_SRC}`, `**/constants.${GLOB_SRC_EXT}`],
2621
2639
  plugins: {
2622
- perfectionist: default19
2640
+ perfectionist: default20
2623
2641
  },
2624
2642
  rules: {
2625
2643
  "perfectionist/sort-maps": [
@@ -2667,7 +2685,7 @@ var unusedImports = (options = {}) => [
2667
2685
  {
2668
2686
  name: "ntnyq/unused-imports",
2669
2687
  plugins: {
2670
- "unused-imports": default20
2688
+ "unused-imports": default21
2671
2689
  },
2672
2690
  rules: {
2673
2691
  "@typescript-eslint/no-unused-vars": "off",
@@ -2925,10 +2943,8 @@ export {
2925
2943
  antfu,
2926
2944
  command,
2927
2945
  comments,
2928
- defaultSortInterfacesGroups,
2929
- defaultSortIntersectionTypesGroups,
2930
- defaultSortObjectTypesGroups,
2931
2946
  defineESLintConfig,
2947
+ esX,
2932
2948
  format,
2933
2949
  getOverrides,
2934
2950
  githubAction,
@@ -2957,31 +2973,32 @@ export {
2957
2973
  parserVue,
2958
2974
  parserYaml,
2959
2975
  perfectionist,
2960
- default8 as pluginAntfu,
2961
- default21 as pluginComments,
2962
- default11 as pluginFormat,
2963
- default18 as pluginGitHubAction,
2964
- default15 as pluginImportX,
2965
- default9 as pluginJsdoc,
2966
- default10 as pluginJsonc,
2967
- default7 as pluginMarkdown,
2976
+ default9 as pluginAntfu,
2977
+ default22 as pluginComments,
2978
+ default4 as pluginEsX,
2979
+ default12 as pluginFormat,
2980
+ default19 as pluginGitHubAction,
2981
+ default16 as pluginImportX,
2982
+ default10 as pluginJsdoc,
2983
+ default11 as pluginJsonc,
2984
+ default8 as pluginMarkdown,
2968
2985
  default2 as pluginNode,
2969
- default6 as pluginNtnyq,
2970
- default19 as pluginPerfectionist,
2971
- default16 as pluginPrettier,
2986
+ default7 as pluginNtnyq,
2987
+ default20 as pluginPerfectionist,
2988
+ default17 as pluginPrettier,
2972
2989
  pluginRegexp,
2973
- default17 as pluginStylistic,
2974
- default5 as pluginToml,
2990
+ default18 as pluginStylistic,
2991
+ default6 as pluginToml,
2975
2992
  plugin as pluginTypeScript,
2976
- default14 as pluginUnicorn,
2977
- default12 as pluginUnoCSS,
2978
- default20 as pluginUnusedImports,
2979
- default13 as pluginVitest,
2993
+ default15 as pluginUnicorn,
2994
+ default13 as pluginUnoCSS,
2995
+ default21 as pluginUnusedImports,
2996
+ default14 as pluginVitest,
2980
2997
  default3 as pluginVue,
2981
- default4 as pluginYaml,
2998
+ default5 as pluginYaml,
2982
2999
  prettier,
2983
3000
  processorPassThrough,
2984
- default22 as processorVueBlocks,
3001
+ default23 as processorVueBlocks,
2985
3002
  regexp,
2986
3003
  resolveSubOptions,
2987
3004
  sort,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "3.8.0",
4
+ "version": "3.8.1",
5
5
  "packageManager": "pnpm@9.14.4",
6
6
  "description": "An opinionated ESLint config preset of ntnyq",
7
7
  "keywords": [
@@ -97,6 +97,7 @@
97
97
  "@types/node": "^22.10.1",
98
98
  "bumpp": "^9.8.1",
99
99
  "eslint": "^9.16.0",
100
+ "eslint-plugin-es-x": "^8.4.1",
100
101
  "eslint-typegen": "^0.3.2",
101
102
  "husky": "^9.1.7",
102
103
  "jiti": "^2.4.1",