@lincy/eslint-config 3.7.0 → 3.7.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.cjs CHANGED
@@ -76,11 +76,11 @@ __export(src_exports, {
76
76
  pluginNoOnlyTests: () => import_eslint_plugin_no_only_tests.default,
77
77
  pluginNode: () => import_eslint_plugin_n.default,
78
78
  pluginPerfectionist: () => import_eslint_plugin_perfectionist.default,
79
- pluginSortKeys: () => import_eslint_plugin_sort_keys.default,
80
79
  pluginStylistic: () => import_eslint_plugin.default,
81
80
  pluginTs: () => import_eslint_plugin2.default,
82
81
  pluginUnicorn: () => import_eslint_plugin_unicorn.default,
83
82
  pluginUnusedImports: () => import_eslint_plugin_unused_imports.default,
83
+ pluginVitest: () => import_eslint_plugin_vitest.default,
84
84
  pluginVue: () => import_eslint_plugin_vue.default,
85
85
  pluginYaml: () => pluginYaml,
86
86
  renameRules: () => renameRules,
@@ -117,7 +117,7 @@ var import_eslint_plugin_unused_imports = __toESM(require("eslint-plugin-unused-
117
117
  var import_eslint_plugin_vue = __toESM(require("eslint-plugin-vue"), 1);
118
118
  var pluginYaml = __toESM(require("eslint-plugin-yml"), 1);
119
119
  var import_eslint_plugin_no_only_tests = __toESM(require("eslint-plugin-no-only-tests"), 1);
120
- var import_eslint_plugin_sort_keys = __toESM(require("eslint-plugin-sort-keys"), 1);
120
+ var import_eslint_plugin_vitest = __toESM(require("eslint-plugin-vitest"), 1);
121
121
  var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
122
122
  var parserTs = __toESM(require("@typescript-eslint/parser"), 1);
123
123
  var import_vue_eslint_parser = __toESM(require("vue-eslint-parser"), 1);
@@ -128,6 +128,7 @@ var import_jsonc_eslint_parser = __toESM(require("jsonc-eslint-parser"), 1);
128
128
  function comments() {
129
129
  return [
130
130
  {
131
+ name: "eslint:comments",
131
132
  plugins: {
132
133
  "eslint-comments": import_eslint_plugin_eslint_comments.default
133
134
  },
@@ -183,7 +184,11 @@ var GLOB_EXCLUDE = [
183
184
  "**/pnpm-lock.yaml",
184
185
  "**/output",
185
186
  "**/coverage",
187
+ "**/tmp",
186
188
  "**/temp",
189
+ "**/.tmp",
190
+ "**/.temp",
191
+ "**/.history",
187
192
  "**/.vitepress/cache",
188
193
  "**/.nuxt",
189
194
  "**/.next",
@@ -222,6 +227,7 @@ function imports(options = {}) {
222
227
  } = options;
223
228
  return [
224
229
  {
230
+ name: "eslint:imports",
225
231
  plugins: {
226
232
  antfu: import_eslint_plugin_antfu.default,
227
233
  import: pluginImport
@@ -275,6 +281,7 @@ function javascript(options = {}) {
275
281
  linterOptions: {
276
282
  reportUnusedDisableDirectives: true
277
283
  },
284
+ name: "eslint:javascript",
278
285
  plugins: {
279
286
  "antfu": import_eslint_plugin_antfu.default,
280
287
  "unused-imports": import_eslint_plugin_unused_imports.default
@@ -458,6 +465,7 @@ function javascript(options = {}) {
458
465
  },
459
466
  {
460
467
  files: [`scripts/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
468
+ name: "eslint:scripts-overrides",
461
469
  rules: {
462
470
  "no-console": "off"
463
471
  }
@@ -472,6 +480,7 @@ function jsdoc(options = {}) {
472
480
  } = options;
473
481
  return [
474
482
  {
483
+ name: "eslint:jsdoc",
475
484
  plugins: {
476
485
  jsdoc: import_eslint_plugin_jsdoc.default
477
486
  },
@@ -508,6 +517,7 @@ function jsonc(options = {}) {
508
517
  } = options;
509
518
  return [
510
519
  {
520
+ name: "eslint:jsonc:setup",
511
521
  plugins: {
512
522
  jsonc: pluginJsonc
513
523
  }
@@ -517,6 +527,7 @@ function jsonc(options = {}) {
517
527
  languageOptions: {
518
528
  parser: import_jsonc_eslint_parser.default
519
529
  },
530
+ name: "eslint:jsonc:rules",
520
531
  rules: {
521
532
  "jsonc/no-bigint-literals": "error",
522
533
  "jsonc/no-binary-expression": "error",
@@ -570,12 +581,14 @@ function markdown(options = {}) {
570
581
  } = options;
571
582
  return [
572
583
  {
584
+ name: "eslint:markdown:setup",
573
585
  plugins: {
574
586
  markdown: import_eslint_plugin_markdown.default
575
587
  }
576
588
  },
577
589
  {
578
590
  files: [GLOB_MARKDOWN],
591
+ name: "eslint:markdown:processor",
579
592
  processor: "markdown/markdown"
580
593
  },
581
594
  {
@@ -590,13 +603,18 @@ function markdown(options = {}) {
590
603
  }
591
604
  }
592
605
  },
606
+ name: "eslint:markdown:rules",
593
607
  rules: {
594
- "antfu/no-cjs-exports": "off",
595
608
  "antfu/no-ts-export-equal": "off",
609
+ "import/newline-after-import": "off",
596
610
  "no-alert": "off",
597
611
  "no-console": "off",
612
+ "no-labels": "off",
613
+ "no-lone-blocks": "off",
614
+ "no-restricted-syntax": "off",
598
615
  "no-undef": "off",
599
616
  "no-unused-expressions": "off",
617
+ "no-unused-labels": "off",
600
618
  "no-unused-vars": "off",
601
619
  "node/prefer-global/process": "off",
602
620
  "style/comma-dangle": "off",
@@ -640,6 +658,7 @@ function markdown(options = {}) {
640
658
  function node() {
641
659
  return [
642
660
  {
661
+ name: "eslint:node",
643
662
  plugins: {
644
663
  node: import_eslint_plugin_n.default
645
664
  },
@@ -662,6 +681,7 @@ function sortPackageJson() {
662
681
  return [
663
682
  {
664
683
  files: ["**/package.json"],
684
+ name: "eslint:sort-package-json",
665
685
  rules: {
666
686
  "jsonc/sort-array-values": [
667
687
  "error",
@@ -750,6 +770,7 @@ function sortTsconfig() {
750
770
  return [
751
771
  {
752
772
  files: ["**/tsconfig.json", "**/tsconfig.*.json"],
773
+ name: "eslint:sort-tsconfig",
753
774
  rules: {
754
775
  "jsonc/sort-keys": [
755
776
  "error",
@@ -884,6 +905,7 @@ function stylistic(options = {}) {
884
905
  } = typeof stylistic2 === "boolean" ? {} : stylistic2;
885
906
  return [
886
907
  {
908
+ name: "eslint:stylistic",
887
909
  plugins: {
888
910
  antfu: import_eslint_plugin_antfu.default,
889
911
  style: import_eslint_plugin.default
@@ -891,6 +913,7 @@ function stylistic(options = {}) {
891
913
  rules: {
892
914
  "antfu/consistent-list-newline": "off",
893
915
  "antfu/if-newline": "error",
916
+ "antfu/indent-binary-ops": ["error", { indent }],
894
917
  "antfu/top-level-function": "error",
895
918
  "curly": ["error", "multi-or-nest", "consistent"],
896
919
  "style/array-bracket-spacing": ["error", "never"],
@@ -1082,6 +1105,7 @@ function typescript(options) {
1082
1105
  return [
1083
1106
  {
1084
1107
  // Install the plugins without globs, so they can be configured separately.
1108
+ name: "eslint:typescript:setup",
1085
1109
  plugins: {
1086
1110
  antfu: import_eslint_plugin_antfu.default,
1087
1111
  import: pluginImport,
@@ -1105,6 +1129,7 @@ function typescript(options) {
1105
1129
  ...parserOptions
1106
1130
  }
1107
1131
  },
1132
+ name: "eslint:typescript:rules",
1108
1133
  rules: {
1109
1134
  ...renameRules(
1110
1135
  import_eslint_plugin2.default.configs["eslint-recommended"].overrides[0].rules,
@@ -1118,9 +1143,6 @@ function typescript(options) {
1118
1143
  ),
1119
1144
  "antfu/generic-spacing": "error",
1120
1145
  "antfu/named-tuple-spacing": "error",
1121
- "antfu/no-cjs-exports": "error",
1122
- "antfu/no-const-enum": "error",
1123
- "antfu/no-ts-export-equal": "error",
1124
1146
  "no-dupe-class-members": "off",
1125
1147
  "no-invalid-this": "off",
1126
1148
  "no-loss-of-precision": "off",
@@ -1154,6 +1176,7 @@ function typescript(options) {
1154
1176
  },
1155
1177
  {
1156
1178
  files: ["**/*.d.ts"],
1179
+ name: "eslint:typescript:dts-overrides",
1157
1180
  rules: {
1158
1181
  "eslint-comments/no-unlimited-disable": "off",
1159
1182
  "import/no-duplicates": "off",
@@ -1163,12 +1186,14 @@ function typescript(options) {
1163
1186
  },
1164
1187
  {
1165
1188
  files: ["**/*.{test,spec}.ts?(x)"],
1189
+ name: "eslint:typescript:tests-overrides",
1166
1190
  rules: {
1167
1191
  "no-unused-expressions": "off"
1168
1192
  }
1169
1193
  },
1170
1194
  {
1171
1195
  files: ["**/*.js", "**/*.cjs"],
1196
+ name: "eslint:typescript:javascript-overrides",
1172
1197
  rules: {
1173
1198
  "ts/no-require-imports": "off",
1174
1199
  "ts/no-var-requires": "off"
@@ -1181,6 +1206,7 @@ function typescript(options) {
1181
1206
  function unicorn() {
1182
1207
  return [
1183
1208
  {
1209
+ name: "eslint:unicorn",
1184
1210
  plugins: {
1185
1211
  unicorn: import_eslint_plugin_unicorn.default
1186
1212
  },
@@ -1234,6 +1260,7 @@ function vue(options = {}) {
1234
1260
  } = typeof stylistic2 === "boolean" ? {} : stylistic2;
1235
1261
  return [
1236
1262
  {
1263
+ name: "eslint:vue:setup",
1237
1264
  plugins: {
1238
1265
  vue: import_eslint_plugin_vue.default
1239
1266
  }
@@ -1251,6 +1278,7 @@ function vue(options = {}) {
1251
1278
  sourceType: "module"
1252
1279
  }
1253
1280
  },
1281
+ name: "eslint:vue:rules",
1254
1282
  processor: import_eslint_plugin_vue.default.processors[".vue"],
1255
1283
  rules: {
1256
1284
  ...import_eslint_plugin_vue.default.configs.base.rules,
@@ -1362,6 +1390,7 @@ function yaml(options = {}) {
1362
1390
  } = options;
1363
1391
  return [
1364
1392
  {
1393
+ name: "eslint:yaml:setup",
1365
1394
  plugins: {
1366
1395
  yaml: pluginYaml
1367
1396
  }
@@ -1371,6 +1400,7 @@ function yaml(options = {}) {
1371
1400
  languageOptions: {
1372
1401
  parser: import_yaml_eslint_parser.default
1373
1402
  },
1403
+ name: "eslint:yaml:rules",
1374
1404
  rules: {
1375
1405
  "style/spaced-comment": "off",
1376
1406
  "yaml/block-mapping": "error",
@@ -1407,14 +1437,28 @@ function test(options = {}) {
1407
1437
  } = options;
1408
1438
  return [
1409
1439
  {
1440
+ name: "eslint:test:setup",
1410
1441
  plugins: {
1411
- "no-only-tests": import_eslint_plugin_no_only_tests.default
1442
+ test: {
1443
+ ...import_eslint_plugin_vitest.default,
1444
+ rules: {
1445
+ ...import_eslint_plugin_vitest.default.rules,
1446
+ // extend `test/no-only-tests` rule
1447
+ ...import_eslint_plugin_no_only_tests.default.rules
1448
+ }
1449
+ }
1412
1450
  }
1413
1451
  },
1414
1452
  {
1415
1453
  files: GLOB_TESTS,
1454
+ name: "eslint:test:rules",
1416
1455
  rules: {
1417
- "no-only-tests/no-only-tests": isInEditor ? "off" : "error",
1456
+ "node/prefer-global/process": "off",
1457
+ "test/consistent-test-it": ["error", { fn: "it", withinDescribe: "it" }],
1458
+ "test/no-identical-title": "error",
1459
+ "test/no-only-tests": isInEditor ? "off" : "error",
1460
+ "test/prefer-hooks-in-order": "error",
1461
+ "test/prefer-lowercase-title": "error",
1418
1462
  ...overrides
1419
1463
  }
1420
1464
  }
@@ -1425,6 +1469,7 @@ function test(options = {}) {
1425
1469
  function perfectionist() {
1426
1470
  return [
1427
1471
  {
1472
+ name: "eslint:perfectionist",
1428
1473
  plugins: {
1429
1474
  perfectionist: import_eslint_plugin_perfectionist.default
1430
1475
  }
@@ -1603,11 +1648,11 @@ var src_default = lincy;
1603
1648
  pluginNoOnlyTests,
1604
1649
  pluginNode,
1605
1650
  pluginPerfectionist,
1606
- pluginSortKeys,
1607
1651
  pluginStylistic,
1608
1652
  pluginTs,
1609
1653
  pluginUnicorn,
1610
1654
  pluginUnusedImports,
1655
+ pluginVitest,
1611
1656
  pluginVue,
1612
1657
  pluginYaml,
1613
1658
  renameRules,
package/dist/index.d.cts CHANGED
@@ -25,7 +25,7 @@ export { default as pluginVue } from 'eslint-plugin-vue';
25
25
  import * as eslintPluginYml from 'eslint-plugin-yml';
26
26
  export { eslintPluginYml as pluginYaml };
27
27
  export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
28
- export { default as pluginSortKeys } from 'eslint-plugin-sort-keys';
28
+ export { default as pluginVitest } from 'eslint-plugin-vitest';
29
29
  export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
30
30
  export { default as parserVue } from 'vue-eslint-parser';
31
31
  export { default as parserYaml } from 'yaml-eslint-parser';
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ export { default as pluginVue } from 'eslint-plugin-vue';
25
25
  import * as eslintPluginYml from 'eslint-plugin-yml';
26
26
  export { eslintPluginYml as pluginYaml };
27
27
  export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
28
- export { default as pluginSortKeys } from 'eslint-plugin-sort-keys';
28
+ export { default as pluginVitest } from 'eslint-plugin-vitest';
29
29
  export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
30
30
  export { default as parserVue } from 'vue-eslint-parser';
31
31
  export { default as parserYaml } from 'yaml-eslint-parser';
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ import { default as default10 } from "eslint-plugin-unused-imports";
19
19
  import { default as default11 } from "eslint-plugin-vue";
20
20
  import * as pluginYaml from "eslint-plugin-yml";
21
21
  import { default as default12 } from "eslint-plugin-no-only-tests";
22
- import { default as default13 } from "eslint-plugin-sort-keys";
22
+ import { default as default13 } from "eslint-plugin-vitest";
23
23
  import { default as default14 } from "eslint-plugin-perfectionist";
24
24
  import * as parserTs from "@typescript-eslint/parser";
25
25
  import { default as default15 } from "vue-eslint-parser";
@@ -30,6 +30,7 @@ import { default as default17 } from "jsonc-eslint-parser";
30
30
  function comments() {
31
31
  return [
32
32
  {
33
+ name: "eslint:comments",
33
34
  plugins: {
34
35
  "eslint-comments": default3
35
36
  },
@@ -85,7 +86,11 @@ var GLOB_EXCLUDE = [
85
86
  "**/pnpm-lock.yaml",
86
87
  "**/output",
87
88
  "**/coverage",
89
+ "**/tmp",
88
90
  "**/temp",
91
+ "**/.tmp",
92
+ "**/.temp",
93
+ "**/.history",
89
94
  "**/.vitepress/cache",
90
95
  "**/.nuxt",
91
96
  "**/.next",
@@ -124,6 +129,7 @@ function imports(options = {}) {
124
129
  } = options;
125
130
  return [
126
131
  {
132
+ name: "eslint:imports",
127
133
  plugins: {
128
134
  antfu: default2,
129
135
  import: pluginImport
@@ -177,6 +183,7 @@ function javascript(options = {}) {
177
183
  linterOptions: {
178
184
  reportUnusedDisableDirectives: true
179
185
  },
186
+ name: "eslint:javascript",
180
187
  plugins: {
181
188
  "antfu": default2,
182
189
  "unused-imports": default10
@@ -360,6 +367,7 @@ function javascript(options = {}) {
360
367
  },
361
368
  {
362
369
  files: [`scripts/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
370
+ name: "eslint:scripts-overrides",
363
371
  rules: {
364
372
  "no-console": "off"
365
373
  }
@@ -374,6 +382,7 @@ function jsdoc(options = {}) {
374
382
  } = options;
375
383
  return [
376
384
  {
385
+ name: "eslint:jsdoc",
377
386
  plugins: {
378
387
  jsdoc: default4
379
388
  },
@@ -410,6 +419,7 @@ function jsonc(options = {}) {
410
419
  } = options;
411
420
  return [
412
421
  {
422
+ name: "eslint:jsonc:setup",
413
423
  plugins: {
414
424
  jsonc: pluginJsonc
415
425
  }
@@ -419,6 +429,7 @@ function jsonc(options = {}) {
419
429
  languageOptions: {
420
430
  parser: default17
421
431
  },
432
+ name: "eslint:jsonc:rules",
422
433
  rules: {
423
434
  "jsonc/no-bigint-literals": "error",
424
435
  "jsonc/no-binary-expression": "error",
@@ -472,12 +483,14 @@ function markdown(options = {}) {
472
483
  } = options;
473
484
  return [
474
485
  {
486
+ name: "eslint:markdown:setup",
475
487
  plugins: {
476
488
  markdown: default5
477
489
  }
478
490
  },
479
491
  {
480
492
  files: [GLOB_MARKDOWN],
493
+ name: "eslint:markdown:processor",
481
494
  processor: "markdown/markdown"
482
495
  },
483
496
  {
@@ -492,13 +505,18 @@ function markdown(options = {}) {
492
505
  }
493
506
  }
494
507
  },
508
+ name: "eslint:markdown:rules",
495
509
  rules: {
496
- "antfu/no-cjs-exports": "off",
497
510
  "antfu/no-ts-export-equal": "off",
511
+ "import/newline-after-import": "off",
498
512
  "no-alert": "off",
499
513
  "no-console": "off",
514
+ "no-labels": "off",
515
+ "no-lone-blocks": "off",
516
+ "no-restricted-syntax": "off",
500
517
  "no-undef": "off",
501
518
  "no-unused-expressions": "off",
519
+ "no-unused-labels": "off",
502
520
  "no-unused-vars": "off",
503
521
  "node/prefer-global/process": "off",
504
522
  "style/comma-dangle": "off",
@@ -542,6 +560,7 @@ function markdown(options = {}) {
542
560
  function node() {
543
561
  return [
544
562
  {
563
+ name: "eslint:node",
545
564
  plugins: {
546
565
  node: default6
547
566
  },
@@ -564,6 +583,7 @@ function sortPackageJson() {
564
583
  return [
565
584
  {
566
585
  files: ["**/package.json"],
586
+ name: "eslint:sort-package-json",
567
587
  rules: {
568
588
  "jsonc/sort-array-values": [
569
589
  "error",
@@ -652,6 +672,7 @@ function sortTsconfig() {
652
672
  return [
653
673
  {
654
674
  files: ["**/tsconfig.json", "**/tsconfig.*.json"],
675
+ name: "eslint:sort-tsconfig",
655
676
  rules: {
656
677
  "jsonc/sort-keys": [
657
678
  "error",
@@ -786,6 +807,7 @@ function stylistic(options = {}) {
786
807
  } = typeof stylistic2 === "boolean" ? {} : stylistic2;
787
808
  return [
788
809
  {
810
+ name: "eslint:stylistic",
789
811
  plugins: {
790
812
  antfu: default2,
791
813
  style: default7
@@ -793,6 +815,7 @@ function stylistic(options = {}) {
793
815
  rules: {
794
816
  "antfu/consistent-list-newline": "off",
795
817
  "antfu/if-newline": "error",
818
+ "antfu/indent-binary-ops": ["error", { indent }],
796
819
  "antfu/top-level-function": "error",
797
820
  "curly": ["error", "multi-or-nest", "consistent"],
798
821
  "style/array-bracket-spacing": ["error", "never"],
@@ -984,6 +1007,7 @@ function typescript(options) {
984
1007
  return [
985
1008
  {
986
1009
  // Install the plugins without globs, so they can be configured separately.
1010
+ name: "eslint:typescript:setup",
987
1011
  plugins: {
988
1012
  antfu: default2,
989
1013
  import: pluginImport,
@@ -1007,6 +1031,7 @@ function typescript(options) {
1007
1031
  ...parserOptions
1008
1032
  }
1009
1033
  },
1034
+ name: "eslint:typescript:rules",
1010
1035
  rules: {
1011
1036
  ...renameRules(
1012
1037
  default8.configs["eslint-recommended"].overrides[0].rules,
@@ -1020,9 +1045,6 @@ function typescript(options) {
1020
1045
  ),
1021
1046
  "antfu/generic-spacing": "error",
1022
1047
  "antfu/named-tuple-spacing": "error",
1023
- "antfu/no-cjs-exports": "error",
1024
- "antfu/no-const-enum": "error",
1025
- "antfu/no-ts-export-equal": "error",
1026
1048
  "no-dupe-class-members": "off",
1027
1049
  "no-invalid-this": "off",
1028
1050
  "no-loss-of-precision": "off",
@@ -1056,6 +1078,7 @@ function typescript(options) {
1056
1078
  },
1057
1079
  {
1058
1080
  files: ["**/*.d.ts"],
1081
+ name: "eslint:typescript:dts-overrides",
1059
1082
  rules: {
1060
1083
  "eslint-comments/no-unlimited-disable": "off",
1061
1084
  "import/no-duplicates": "off",
@@ -1065,12 +1088,14 @@ function typescript(options) {
1065
1088
  },
1066
1089
  {
1067
1090
  files: ["**/*.{test,spec}.ts?(x)"],
1091
+ name: "eslint:typescript:tests-overrides",
1068
1092
  rules: {
1069
1093
  "no-unused-expressions": "off"
1070
1094
  }
1071
1095
  },
1072
1096
  {
1073
1097
  files: ["**/*.js", "**/*.cjs"],
1098
+ name: "eslint:typescript:javascript-overrides",
1074
1099
  rules: {
1075
1100
  "ts/no-require-imports": "off",
1076
1101
  "ts/no-var-requires": "off"
@@ -1083,6 +1108,7 @@ function typescript(options) {
1083
1108
  function unicorn() {
1084
1109
  return [
1085
1110
  {
1111
+ name: "eslint:unicorn",
1086
1112
  plugins: {
1087
1113
  unicorn: default9
1088
1114
  },
@@ -1136,6 +1162,7 @@ function vue(options = {}) {
1136
1162
  } = typeof stylistic2 === "boolean" ? {} : stylistic2;
1137
1163
  return [
1138
1164
  {
1165
+ name: "eslint:vue:setup",
1139
1166
  plugins: {
1140
1167
  vue: default11
1141
1168
  }
@@ -1153,6 +1180,7 @@ function vue(options = {}) {
1153
1180
  sourceType: "module"
1154
1181
  }
1155
1182
  },
1183
+ name: "eslint:vue:rules",
1156
1184
  processor: default11.processors[".vue"],
1157
1185
  rules: {
1158
1186
  ...default11.configs.base.rules,
@@ -1264,6 +1292,7 @@ function yaml(options = {}) {
1264
1292
  } = options;
1265
1293
  return [
1266
1294
  {
1295
+ name: "eslint:yaml:setup",
1267
1296
  plugins: {
1268
1297
  yaml: pluginYaml
1269
1298
  }
@@ -1273,6 +1302,7 @@ function yaml(options = {}) {
1273
1302
  languageOptions: {
1274
1303
  parser: default16
1275
1304
  },
1305
+ name: "eslint:yaml:rules",
1276
1306
  rules: {
1277
1307
  "style/spaced-comment": "off",
1278
1308
  "yaml/block-mapping": "error",
@@ -1309,14 +1339,28 @@ function test(options = {}) {
1309
1339
  } = options;
1310
1340
  return [
1311
1341
  {
1342
+ name: "eslint:test:setup",
1312
1343
  plugins: {
1313
- "no-only-tests": default12
1344
+ test: {
1345
+ ...default13,
1346
+ rules: {
1347
+ ...default13.rules,
1348
+ // extend `test/no-only-tests` rule
1349
+ ...default12.rules
1350
+ }
1351
+ }
1314
1352
  }
1315
1353
  },
1316
1354
  {
1317
1355
  files: GLOB_TESTS,
1356
+ name: "eslint:test:rules",
1318
1357
  rules: {
1319
- "no-only-tests/no-only-tests": isInEditor ? "off" : "error",
1358
+ "node/prefer-global/process": "off",
1359
+ "test/consistent-test-it": ["error", { fn: "it", withinDescribe: "it" }],
1360
+ "test/no-identical-title": "error",
1361
+ "test/no-only-tests": isInEditor ? "off" : "error",
1362
+ "test/prefer-hooks-in-order": "error",
1363
+ "test/prefer-lowercase-title": "error",
1320
1364
  ...overrides
1321
1365
  }
1322
1366
  }
@@ -1327,6 +1371,7 @@ function test(options = {}) {
1327
1371
  function perfectionist() {
1328
1372
  return [
1329
1373
  {
1374
+ name: "eslint:perfectionist",
1330
1375
  plugins: {
1331
1376
  perfectionist: default14
1332
1377
  }
@@ -1505,11 +1550,11 @@ export {
1505
1550
  default12 as pluginNoOnlyTests,
1506
1551
  default6 as pluginNode,
1507
1552
  default14 as pluginPerfectionist,
1508
- default13 as pluginSortKeys,
1509
1553
  default7 as pluginStylistic,
1510
1554
  default8 as pluginTs,
1511
1555
  default9 as pluginUnicorn,
1512
1556
  default10 as pluginUnusedImports,
1557
+ default13 as pluginVitest,
1513
1558
  default11 as pluginVue,
1514
1559
  pluginYaml,
1515
1560
  renameRules,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lincy/eslint-config",
3
3
  "type": "module",
4
- "version": "3.7.0",
4
+ "version": "3.7.1",
5
5
  "packageManager": "pnpm@8.7.6",
6
6
  "description": "LinCenYing's ESLint config",
7
7
  "author": "LinCenYing <lincenying@gmail.com> (https://github.com/lincenying/)",
@@ -44,7 +44,7 @@
44
44
  "@typescript-eslint/eslint-plugin": "^6.11.0",
45
45
  "@typescript-eslint/parser": "^6.11.0",
46
46
  "eslint-config-flat-gitignore": "^0.1.1",
47
- "eslint-plugin-antfu": "^1.0.2",
47
+ "eslint-plugin-antfu": "^1.0.6",
48
48
  "eslint-plugin-eslint-comments": "^3.2.0",
49
49
  "eslint-plugin-i": "^2.29.0",
50
50
  "eslint-plugin-jsdoc": "^46.9.0",
@@ -53,7 +53,6 @@
53
53
  "eslint-plugin-n": "^16.3.1",
54
54
  "eslint-plugin-no-only-tests": "^3.1.0",
55
55
  "eslint-plugin-perfectionist": "^2.3.0",
56
- "eslint-plugin-sort-keys": "^2.3.5",
57
56
  "eslint-plugin-unicorn": "^49.0.0",
58
57
  "eslint-plugin-unused-imports": "^3.0.0",
59
58
  "eslint-plugin-vitest": "^0.3.9",