@ghettoddos/eslint-config 3.2.1 → 4.1.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.mjs CHANGED
@@ -1,11 +1,12 @@
1
1
  import { FlatConfigComposer } from "eslint-flat-config-utils";
2
2
  import process from "node:process";
3
- import fsPromises from "node:fs/promises";
3
+ import fs from "node:fs/promises";
4
4
  import { fileURLToPath } from "node:url";
5
- import fs from "node:fs";
5
+ import fs$1 from "node:fs";
6
6
  import path from "node:path";
7
7
  import { isPackageExists } from "local-pkg";
8
8
  import createCommand from "eslint-plugin-command/config";
9
+ import pluginE18e from "@e18e/eslint-plugin";
9
10
  import pluginComments from "@eslint-community/eslint-plugin-eslint-comments";
10
11
  import pluginAntfu from "eslint-plugin-antfu";
11
12
  import pluginImportLite from "eslint-plugin-import-lite";
@@ -13,11 +14,9 @@ import pluginNode from "eslint-plugin-n";
13
14
  import pluginPerfectionist from "eslint-plugin-perfectionist";
14
15
  import pluginUnicorn from "eslint-plugin-unicorn";
15
16
  import pluginUnusedImports from "eslint-plugin-unused-imports";
16
- import { fixupPluginRules } from "@eslint/compat";
17
17
  import globals from "globals";
18
18
  import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
19
19
  import { configs } from "eslint-plugin-regexp";
20
-
21
20
  //#region node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
22
21
  const toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
23
22
  async function findUp(name, { cwd = process.cwd(), type = "file", stopAt } = {}) {
@@ -28,7 +27,7 @@ async function findUp(name, { cwd = process.cwd(), type = "file", stopAt } = {})
28
27
  while (directory) {
29
28
  const filePath = isAbsoluteName ? name : path.join(directory, name);
30
29
  try {
31
- const stats = await fsPromises.stat(filePath);
30
+ const stats = await fs.stat(filePath);
32
31
  if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) return filePath;
33
32
  } catch {}
34
33
  if (directory === stopAt || directory === root) break;
@@ -43,14 +42,13 @@ function findUpSync(name, { cwd = process.cwd(), type = "file", stopAt } = {}) {
43
42
  while (directory) {
44
43
  const filePath = isAbsoluteName ? name : path.join(directory, name);
45
44
  try {
46
- const stats = fs.statSync(filePath, { throwIfNoEntry: false });
45
+ const stats = fs$1.statSync(filePath, { throwIfNoEntry: false });
47
46
  if (type === "file" && stats?.isFile() || type === "directory" && stats?.isDirectory()) return filePath;
48
47
  } catch {}
49
48
  if (directory === stopAt || directory === root) break;
50
49
  directory = path.dirname(directory);
51
50
  }
52
51
  }
53
-
54
52
  //#endregion
55
53
  //#region src/configs/command.ts
56
54
  async function command() {
@@ -59,7 +57,6 @@ async function command() {
59
57
  name: "command/rules"
60
58
  }];
61
59
  }
62
-
63
60
  //#endregion
64
61
  //#region src/configs/comments.ts
65
62
  async function comments() {
@@ -74,7 +71,6 @@ async function comments() {
74
71
  }
75
72
  }];
76
73
  }
77
-
78
74
  //#endregion
79
75
  //#region src/globs.ts
80
76
  const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
@@ -149,7 +145,6 @@ const GLOB_EXCLUDE = [
149
145
  "**/auto-import?(s).d.ts",
150
146
  "**/components.d.ts"
151
147
  ];
152
-
153
148
  //#endregion
154
149
  //#region src/configs/disables.ts
155
150
  async function disables() {
@@ -179,39 +174,6 @@ async function disables() {
179
174
  }
180
175
  ];
181
176
  }
182
-
183
- //#endregion
184
- //#region src/constants.ts
185
- const ReactRefreshAllowConstantExportPackages = ["vite"];
186
- const RemixPackages = [
187
- "@remix-run/node",
188
- "@remix-run/react",
189
- "@remix-run/serve",
190
- "@remix-run/dev"
191
- ];
192
- const ReactRouterPackages = [
193
- "@react-router/node",
194
- "@react-router/react",
195
- "@react-router/serve",
196
- "@react-router/dev"
197
- ];
198
- const NextJsPackages = ["next"];
199
- const ReactNativePackages = ["react-native", "expo"];
200
- const ReactPackages = [
201
- ...RemixPackages,
202
- ...ReactRouterPackages,
203
- ...NextJsPackages,
204
- ...ReactNativePackages,
205
- "react"
206
- ];
207
- const ReactCompilerPackages = ["babel-plugin-react-compiler"];
208
- const VuePackages = [
209
- "vue",
210
- "nuxt",
211
- "vitepress",
212
- "@slidev/cli"
213
- ];
214
-
215
177
  //#endregion
216
178
  //#region src/utils.ts
217
179
  const scopeUrl = fileURLToPath(new URL(".", import.meta.url));
@@ -238,8 +200,8 @@ const parserPlain = {
238
200
  /**
239
201
  * Combine array and non-array configs into a single array.
240
202
  */
241
- async function combine(...configs$1) {
242
- return (await Promise.all(configs$1)).flat();
203
+ async function combine(...configs) {
204
+ return (await Promise.all(configs)).flat();
243
205
  }
244
206
  /**
245
207
  * Rename plugin prefixes in a rule object.
@@ -281,7 +243,7 @@ async function ensurePackages(packages) {
281
243
  function isInEditorEnv() {
282
244
  if (process.env.CI) return false;
283
245
  if (isInGitHooksOrLintStaged()) return false;
284
- return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM);
246
+ return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM || process.env.ZED_ENVIRONMENT);
285
247
  }
286
248
  function isInGitHooksOrLintStaged() {
287
249
  return !!(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged"));
@@ -296,50 +258,6 @@ function getOverrides(options, key) {
296
258
  ..."overrides" in sub ? sub.overrides : {}
297
259
  };
298
260
  }
299
-
300
- //#endregion
301
- //#region src/configs/effector.ts
302
- async function effector(options = {}) {
303
- const { future = false, overrides = {}, patronum = isPackageExists("patronum"), react: react$1 = ReactPackages.some((i) => isPackageExists(i)), scope = false } = options;
304
- await ensurePackages(["eslint-plugin-effector"]);
305
- const [pluginEffector] = await Promise.all([interopDefault(import("eslint-plugin-effector"))]);
306
- return [{
307
- name: "effector/setup",
308
- plugins: { effector: fixupPluginRules(pluginEffector) }
309
- }, {
310
- name: "effector/rules",
311
- rules: {
312
- "effector/enforce-effect-naming-convention": "error",
313
- "effector/enforce-store-naming-convention": "error",
314
- "effector/keep-options-order": "warn",
315
- "effector/no-ambiguity-target": "warn",
316
- "effector/no-duplicate-on": "error",
317
- "effector/no-getState": "error",
318
- "effector/no-unnecessary-combination": "warn",
319
- "effector/no-unnecessary-duplication": "warn",
320
- "effector/no-useless-methods": "error",
321
- "effector/no-watch": "warn",
322
- "effector/prefer-sample-over-forward-with-mapping": "warn",
323
- ...react$1 ? {
324
- "effector/enforce-gate-naming-convention": "error",
325
- "effector/mandatory-scope-binding": "error",
326
- "effector/prefer-useUnit": "warn"
327
- } : {},
328
- ...patronum ? { "effector/no-patronum-debug": "error" } : {},
329
- ...scope ? {
330
- "effector/require-pickup-in-persist": "error",
331
- "effector/strict-effect-handlers": "error"
332
- } : {},
333
- ...future ? {
334
- "effector/no-forward": "warn",
335
- "effector/no-guard": "warn",
336
- "effector/prefer-sample-over-forward-with-mapping": "off"
337
- } : {},
338
- ...overrides
339
- }
340
- }];
341
- }
342
-
343
261
  //#endregion
344
262
  //#region src/configs/stylistic.ts
345
263
  const StylisticConfigDefaults = {
@@ -350,15 +268,15 @@ const StylisticConfigDefaults = {
350
268
  semi: false
351
269
  };
352
270
  async function stylistic(options = {}) {
353
- const { experimental, indent, jsx: jsx$1, overrides = {}, quotes, semi } = {
271
+ const { experimental, indent, jsx, overrides = {}, quotes, semi } = {
354
272
  ...StylisticConfigDefaults,
355
273
  ...options
356
274
  };
357
275
  const pluginStylistic = await interopDefault(import("@stylistic/eslint-plugin"));
358
- const config$1 = pluginStylistic.configs.customize({
276
+ const config = pluginStylistic.configs.customize({
359
277
  experimental,
360
278
  indent,
361
- jsx: jsx$1,
279
+ jsx,
362
280
  pluginName: "style",
363
281
  quotes,
364
282
  semi
@@ -370,7 +288,7 @@ async function stylistic(options = {}) {
370
288
  style: pluginStylistic
371
289
  },
372
290
  rules: {
373
- ...config$1.rules,
291
+ ...config.rules,
374
292
  ...experimental ? {} : { "antfu/consistent-list-newline": "error" },
375
293
  "antfu/consistent-chaining": "error",
376
294
  "antfu/curly": "error",
@@ -388,17 +306,16 @@ async function stylistic(options = {}) {
388
306
  }
389
307
  }];
390
308
  }
391
-
392
309
  //#endregion
393
310
  //#region src/configs/formatters.ts
394
- function mergePrettierOptions(options, overrides = {}) {
311
+ function mergePrettierOptions(options, overrides) {
395
312
  return {
396
313
  ...options,
397
314
  ...overrides,
398
315
  plugins: [...overrides.plugins || [], ...options.plugins || []]
399
316
  };
400
317
  }
401
- async function formatters(options = {}, stylistic$1 = {}) {
318
+ async function formatters(options = {}, stylistic = {}) {
402
319
  if (options === true) {
403
320
  const isPrettierPluginXmlInScope = isPackageInScope("@prettier/plugin-xml");
404
321
  options = {
@@ -412,7 +329,7 @@ async function formatters(options = {}, stylistic$1 = {}) {
412
329
  await ensurePackages(["eslint-plugin-format", options.xml || options.svg ? "@prettier/plugin-xml" : void 0]);
413
330
  const { indent, quotes, semi } = {
414
331
  ...StylisticConfigDefaults,
415
- ...stylistic$1
332
+ ...stylistic
416
333
  };
417
334
  const prettierOptions = Object.assign({
418
335
  endOfLine: "auto",
@@ -429,11 +346,11 @@ async function formatters(options = {}, stylistic$1 = {}) {
429
346
  xmlSortAttributesByKey: false,
430
347
  xmlWhitespaceSensitivity: "ignore"
431
348
  };
432
- const configs$1 = [{
349
+ const configs = [{
433
350
  name: "formatter/setup",
434
351
  plugins: { format: await interopDefault(import("eslint-plugin-format")) }
435
352
  }];
436
- if (options.css) configs$1.push({
353
+ if (options.css) configs.push({
437
354
  files: [GLOB_CSS, GLOB_POSTCSS],
438
355
  languageOptions: { parser: parserPlain },
439
356
  name: "formatter/css",
@@ -444,13 +361,13 @@ async function formatters(options = {}, stylistic$1 = {}) {
444
361
  name: "formatter/scss",
445
362
  rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "scss" })] }
446
363
  });
447
- if (options.html) configs$1.push({
364
+ if (options.html) configs.push({
448
365
  files: [GLOB_HTML],
449
366
  languageOptions: { parser: parserPlain },
450
367
  name: "formatter/html",
451
368
  rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "html" })] }
452
369
  });
453
- if (options.xml) configs$1.push({
370
+ if (options.xml) configs.push({
454
371
  files: [GLOB_XML],
455
372
  languageOptions: { parser: parserPlain },
456
373
  name: "formatter/xml",
@@ -462,7 +379,7 @@ async function formatters(options = {}, stylistic$1 = {}) {
462
379
  plugins: ["@prettier/plugin-xml"]
463
380
  })] }
464
381
  });
465
- if (options.svg) configs$1.push({
382
+ if (options.svg) configs.push({
466
383
  files: [GLOB_SVG],
467
384
  languageOptions: { parser: parserPlain },
468
385
  name: "formatter/svg",
@@ -474,7 +391,7 @@ async function formatters(options = {}, stylistic$1 = {}) {
474
391
  plugins: ["@prettier/plugin-xml"]
475
392
  })] }
476
393
  });
477
- if (options.markdown) configs$1.push({
394
+ if (options.markdown) configs.push({
478
395
  files: [GLOB_MARKDOWN],
479
396
  languageOptions: { parser: parserPlain },
480
397
  name: "formatter/markdown",
@@ -483,25 +400,24 @@ async function formatters(options = {}, stylistic$1 = {}) {
483
400
  parser: "markdown"
484
401
  })] }
485
402
  });
486
- return configs$1;
403
+ return configs;
487
404
  }
488
-
489
405
  //#endregion
490
406
  //#region src/configs/ignores.ts
491
- async function ignores(userIgnores = []) {
492
- let ignores$1 = [...GLOB_EXCLUDE];
493
- if (typeof userIgnores === "function") ignores$1 = userIgnores(ignores$1);
494
- else ignores$1 = [...ignores$1, ...userIgnores];
407
+ async function ignores(userIgnores = [], ignoreTypeScript = false) {
408
+ let ignores = [...GLOB_EXCLUDE];
409
+ if (ignoreTypeScript) ignores.push(GLOB_TS, GLOB_TSX);
410
+ if (typeof userIgnores === "function") ignores = userIgnores(ignores);
411
+ else ignores = [...ignores, ...userIgnores];
495
412
  return [{
496
- ignores: ignores$1,
413
+ ignores,
497
414
  name: "ignores"
498
415
  }];
499
416
  }
500
-
501
417
  //#endregion
502
418
  //#region src/configs/imports.ts
503
419
  async function imports(options = {}) {
504
- const { overrides = {}, stylistic: stylistic$1 = true } = options;
420
+ const { overrides = {}, stylistic = true } = options;
505
421
  return [{
506
422
  name: "imports/rules",
507
423
  plugins: {
@@ -517,12 +433,11 @@ async function imports(options = {}) {
517
433
  "import/no-duplicates": "error",
518
434
  "import/no-mutable-exports": "error",
519
435
  "import/no-named-default": "error",
520
- ...stylistic$1 ? { "import/newline-after-import": ["error", { count: 1 }] } : {},
436
+ ...stylistic ? { "import/newline-after-import": ["error", { count: 1 }] } : {},
521
437
  ...overrides
522
438
  }
523
439
  }];
524
440
  }
525
-
526
441
  //#endregion
527
442
  //#region src/configs/javascript.ts
528
443
  async function javascript(options = {}) {
@@ -747,14 +662,16 @@ async function javascript(options = {}) {
747
662
  }
748
663
  }];
749
664
  }
750
-
751
665
  //#endregion
752
666
  //#region src/configs/jsdoc.ts
753
667
  async function jsdoc(options = {}) {
754
- const { stylistic: stylistic$1 = true } = options;
668
+ const { stylistic = true } = options;
755
669
  return [{
670
+ name: "jsdoc/setup",
671
+ plugins: { jsdoc: await interopDefault(import("eslint-plugin-jsdoc")) }
672
+ }, {
673
+ files: [GLOB_SRC],
756
674
  name: "jsdoc/rules",
757
- plugins: { jsdoc: await interopDefault(import("eslint-plugin-jsdoc")) },
758
675
  rules: {
759
676
  "jsdoc/check-access": "warn",
760
677
  "jsdoc/check-param-names": "warn",
@@ -771,14 +688,13 @@ async function jsdoc(options = {}) {
771
688
  "jsdoc/require-returns-check": "warn",
772
689
  "jsdoc/require-returns-description": "warn",
773
690
  "jsdoc/require-yields-check": "warn",
774
- ...stylistic$1 ? {
691
+ ...stylistic ? {
775
692
  "jsdoc/check-alignment": "warn",
776
693
  "jsdoc/multiline-blocks": "warn"
777
694
  } : {}
778
695
  }
779
696
  }];
780
697
  }
781
-
782
698
  //#endregion
783
699
  //#region src/configs/jsonc.ts
784
700
  async function jsonc(options = {}) {
@@ -786,15 +702,14 @@ async function jsonc(options = {}) {
786
702
  GLOB_JSON,
787
703
  GLOB_JSON5,
788
704
  GLOB_JSONC
789
- ], overrides = {}, stylistic: stylistic$1 = true } = options;
790
- const { indent = 2 } = typeof stylistic$1 === "boolean" ? {} : stylistic$1;
791
- const [pluginJsonc, parserJsonc] = await Promise.all([interopDefault(import("eslint-plugin-jsonc")), interopDefault(import("jsonc-eslint-parser"))]);
705
+ ], overrides = {}, stylistic = true } = options;
706
+ const { indent = 2 } = typeof stylistic === "boolean" ? {} : stylistic;
792
707
  return [{
793
708
  name: "jsonc/setup",
794
- plugins: { jsonc: pluginJsonc }
709
+ plugins: { jsonc: await interopDefault(import("eslint-plugin-jsonc")) }
795
710
  }, {
796
711
  files,
797
- languageOptions: { parser: parserJsonc },
712
+ language: "jsonc/x",
798
713
  name: "jsonc/rules",
799
714
  rules: {
800
715
  "jsonc/no-bigint-literals": "error",
@@ -823,11 +738,11 @@ async function jsonc(options = {}) {
823
738
  "jsonc/space-unary-ops": "error",
824
739
  "jsonc/valid-json-number": "error",
825
740
  "jsonc/vue-custom-block/no-parsing-error": "error",
826
- ...stylistic$1 ? {
741
+ ...stylistic ? {
827
742
  "jsonc/array-bracket-spacing": ["error", "never"],
828
743
  "jsonc/comma-dangle": ["error", "never"],
829
744
  "jsonc/comma-style": ["error", "last"],
830
- "jsonc/indent": ["error", indent],
745
+ "jsonc/indent": ["error", typeof indent === "number" ? indent : indent === "tab" ? "tab" : 2],
831
746
  "jsonc/key-spacing": ["error", {
832
747
  afterColon: true,
833
748
  beforeColon: false
@@ -845,7 +760,37 @@ async function jsonc(options = {}) {
845
760
  }
846
761
  }];
847
762
  }
848
-
763
+ //#endregion
764
+ //#region src/constants.ts
765
+ const ReactRefreshAllowConstantExportPackages = ["vite"];
766
+ const RemixPackages = [
767
+ "@remix-run/node",
768
+ "@remix-run/react",
769
+ "@remix-run/serve",
770
+ "@remix-run/dev"
771
+ ];
772
+ const ReactRouterPackages = [
773
+ "@react-router/node",
774
+ "@react-router/react",
775
+ "@react-router/serve",
776
+ "@react-router/dev"
777
+ ];
778
+ const NextJsPackages = ["next"];
779
+ const ReactNativePackages = ["react-native", "expo"];
780
+ const ReactPackages = [
781
+ ...RemixPackages,
782
+ ...ReactRouterPackages,
783
+ ...NextJsPackages,
784
+ ...ReactNativePackages,
785
+ "react"
786
+ ];
787
+ const ReactCompilerPackages = ["babel-plugin-react-compiler"];
788
+ const VuePackages = [
789
+ "vue",
790
+ "nuxt",
791
+ "vitepress",
792
+ "@slidev/cli"
793
+ ];
849
794
  //#endregion
850
795
  //#region src/configs/jsx.ts
851
796
  async function jsx(options = {}) {
@@ -889,32 +834,56 @@ async function jsx(options = {}) {
889
834
  }
890
835
  }];
891
836
  }
892
-
893
837
  //#endregion
894
838
  //#region src/configs/markdown.ts
895
839
  async function markdown(options = {}) {
896
- const { componentExts = [], files = [GLOB_MARKDOWN], overrides = {} } = options;
897
- const markdown$1 = await interopDefault(import("@eslint/markdown"));
840
+ const { componentExts = [], files = [GLOB_MARKDOWN], gfm = true, overrides = {}, overridesMarkdown = {} } = options;
841
+ const markdown = await interopDefault(import("@eslint/markdown"));
898
842
  return [
899
843
  {
900
844
  name: "markdown/setup",
901
- plugins: { markdown: markdown$1 }
845
+ plugins: { markdown }
902
846
  },
903
847
  {
904
848
  files,
905
849
  ignores: [GLOB_MARKDOWN_IN_MARKDOWN],
906
850
  name: "markdown/processor",
907
- processor: mergeProcessors([markdown$1.processors.markdown, processorPassThrough])
851
+ processor: mergeProcessors([markdown.processors.markdown, processorPassThrough])
908
852
  },
909
853
  {
910
854
  files,
911
- languageOptions: { parser: parserPlain },
855
+ language: gfm ? "markdown/gfm" : "markdown/commonmark",
912
856
  name: "markdown/parser"
913
857
  },
858
+ {
859
+ files,
860
+ name: "markdown/rules",
861
+ rules: {
862
+ ...markdown.configs.recommended.at(0)?.rules,
863
+ "markdown/fenced-code-language": "off",
864
+ "markdown/no-missing-label-refs": "off",
865
+ ...overridesMarkdown
866
+ }
867
+ },
868
+ {
869
+ files,
870
+ name: "markdown/disables/markdown",
871
+ rules: {
872
+ "command/command": "off",
873
+ "no-irregular-whitespace": "off",
874
+ "perfectionist/sort-exports": "off",
875
+ "perfectionist/sort-imports": "off",
876
+ "regexp/no-legacy-features": "off",
877
+ "regexp/no-missing-g-flag": "off",
878
+ "regexp/no-useless-dollar-replacements": "off",
879
+ "regexp/no-useless-flag": "off",
880
+ "style/indent": "off"
881
+ }
882
+ },
914
883
  {
915
884
  files: [GLOB_MARKDOWN_CODE, ...componentExts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)],
916
885
  languageOptions: { parserOptions: { ecmaFeatures: { impliedStrict: true } } },
917
- name: "markdown/disables",
886
+ name: "markdown/disables/code",
918
887
  rules: {
919
888
  "antfu/no-top-level-await": "off",
920
889
  "no-alert": "off",
@@ -946,7 +915,6 @@ async function markdown(options = {}) {
946
915
  }
947
916
  ];
948
917
  }
949
-
950
918
  //#endregion
951
919
  //#region src/configs/nextjs.ts
952
920
  async function nextjs(options = {}) {
@@ -989,13 +957,15 @@ async function nextjs(options = {}) {
989
957
  settings: { react: { version: "detect" } }
990
958
  }];
991
959
  }
992
-
993
960
  //#endregion
994
961
  //#region src/configs/node.ts
995
962
  async function node() {
996
963
  return [{
964
+ name: "node/setup",
965
+ plugins: { node: pluginNode }
966
+ }, {
967
+ files: [GLOB_SRC],
997
968
  name: "node/rules",
998
- plugins: { node: pluginNode },
999
969
  rules: {
1000
970
  "node/handle-callback-err": ["error", "^(err|error)$"],
1001
971
  "node/no-deprecated-api": "error",
@@ -1008,7 +978,6 @@ async function node() {
1008
978
  }
1009
979
  }];
1010
980
  }
1011
-
1012
981
  //#endregion
1013
982
  //#region src/configs/perfectionist.ts
1014
983
  /**
@@ -1027,25 +996,27 @@ async function perfectionist() {
1027
996
  }],
1028
997
  "perfectionist/sort-imports": ["error", {
1029
998
  groups: [
1030
- "type-external",
999
+ "type-import",
1031
1000
  [
1032
1001
  "type-parent",
1033
1002
  "type-sibling",
1034
1003
  "type-index",
1035
1004
  "type-internal"
1036
1005
  ],
1037
- "builtin",
1038
- "external",
1039
- "internal",
1006
+ "value-builtin",
1007
+ "value-external",
1008
+ "value-internal",
1040
1009
  [
1041
- "parent",
1042
- "sibling",
1043
- "index"
1010
+ "value-parent",
1011
+ "value-sibling",
1012
+ "value-index"
1044
1013
  ],
1045
1014
  "side-effect",
1015
+ "ts-equals-import",
1046
1016
  "unknown"
1047
1017
  ],
1048
- newlinesBetween: 1,
1018
+ newlinesBetween: "ignore",
1019
+ newlinesInside: "ignore",
1049
1020
  order: "asc",
1050
1021
  type: "natural"
1051
1022
  }],
@@ -1060,27 +1031,25 @@ async function perfectionist() {
1060
1031
  }
1061
1032
  }];
1062
1033
  }
1063
-
1064
1034
  //#endregion
1065
1035
  //#region src/configs/pnpm.ts
1066
1036
  async function detectCatalogUsage() {
1067
1037
  const workspaceFile = await findUp("pnpm-workspace.yaml");
1068
1038
  if (!workspaceFile) return false;
1069
- const yaml$1 = await fsPromises.readFile(workspaceFile, "utf-8");
1070
- return yaml$1.includes("catalog:") || yaml$1.includes("catalogs:");
1039
+ const yaml = await fs.readFile(workspaceFile, "utf-8");
1040
+ return yaml.includes("catalog:") || yaml.includes("catalogs:");
1071
1041
  }
1072
1042
  async function pnpm(options) {
1073
- const [pluginPnpm, pluginYaml, yamlParser, jsoncParser] = await Promise.all([
1043
+ const [pluginPnpm, pluginYaml, yamlParser] = await Promise.all([
1074
1044
  interopDefault(import("eslint-plugin-pnpm")),
1075
1045
  interopDefault(import("eslint-plugin-yml")),
1076
- interopDefault(import("yaml-eslint-parser")),
1077
- interopDefault(import("jsonc-eslint-parser"))
1046
+ interopDefault(import("yaml-eslint-parser"))
1078
1047
  ]);
1079
- const { catalogs = await detectCatalogUsage(), isInEditor = false, json = true, sort = true, yaml: yaml$1 = true } = options;
1080
- const configs$1 = [];
1081
- if (json) configs$1.push({
1048
+ const { catalogs = await detectCatalogUsage(), isInEditor = false, json = true, sort = true, yaml = true } = options;
1049
+ const configs = [];
1050
+ if (json) configs.push({
1082
1051
  files: ["package.json", "**/package.json"],
1083
- languageOptions: { parser: jsoncParser },
1052
+ language: "jsonc/x",
1084
1053
  name: "pnpm/package-json",
1085
1054
  plugins: { pnpm: pluginPnpm },
1086
1055
  rules: {
@@ -1092,8 +1061,8 @@ async function pnpm(options) {
1092
1061
  "pnpm/json-valid-catalog": ["error", { autofix: !isInEditor }]
1093
1062
  }
1094
1063
  });
1095
- if (yaml$1) {
1096
- configs$1.push({
1064
+ if (yaml) {
1065
+ configs.push({
1097
1066
  files: ["pnpm-workspace.yaml"],
1098
1067
  languageOptions: { parser: yamlParser },
1099
1068
  name: "pnpm/pnpm-workspace-yaml",
@@ -1107,7 +1076,7 @@ async function pnpm(options) {
1107
1076
  "pnpm/yaml-no-unused-catalog-item": "error"
1108
1077
  }
1109
1078
  });
1110
- if (sort) configs$1.push({
1079
+ if (sort) configs.push({
1111
1080
  files: ["pnpm-workspace.yaml"],
1112
1081
  languageOptions: { parser: yamlParser },
1113
1082
  name: "pnpm/pnpm-workspace-yaml-sort",
@@ -1186,9 +1155,8 @@ async function pnpm(options) {
1186
1155
  ] }
1187
1156
  });
1188
1157
  }
1189
- return configs$1;
1158
+ return configs;
1190
1159
  }
1191
-
1192
1160
  //#endregion
1193
1161
  //#region src/configs/react.ts
1194
1162
  async function react(options = {}) {
@@ -1199,7 +1167,10 @@ async function react(options = {}) {
1199
1167
  "eslint-plugin-react-refresh"
1200
1168
  ]);
1201
1169
  const isTypeAware = !!tsconfigPath;
1202
- const typeAwareRules = { "react/no-leaked-conditional-rendering": "warn" };
1170
+ const typeAwareRules = {
1171
+ "react/no-leaked-conditional-rendering": "warn",
1172
+ "react/no-implicit-key": "error"
1173
+ };
1203
1174
  const [pluginReact, pluginReactHooks, pluginReactRefresh] = await Promise.all([
1204
1175
  interopDefault(import("@eslint-react/eslint-plugin")),
1205
1176
  interopDefault(import("eslint-plugin-react-hooks")),
@@ -1220,6 +1191,7 @@ async function react(options = {}) {
1220
1191
  "react-hooks-extra": plugins["@eslint-react/hooks-extra"],
1221
1192
  "react-naming-convention": plugins["@eslint-react/naming-convention"],
1222
1193
  "react-refresh": pluginReactRefresh,
1194
+ "react-rsc": plugins["@eslint-react/rsc"],
1223
1195
  "react-web-api": plugins["@eslint-react/web-api"]
1224
1196
  }
1225
1197
  },
@@ -1251,9 +1223,7 @@ async function react(options = {}) {
1251
1223
  "react/no-create-ref": "error",
1252
1224
  "react/no-default-props": "error",
1253
1225
  "react/no-direct-mutation-state": "error",
1254
- "react/no-duplicate-key": "error",
1255
1226
  "react/no-forward-ref": "warn",
1256
- "react/no-implicit-key": "warn",
1257
1227
  "react/no-missing-key": "error",
1258
1228
  "react/no-nested-component-definitions": "error",
1259
1229
  "react/no-nested-lazy-component-declarations": "error",
@@ -1267,13 +1237,16 @@ async function react(options = {}) {
1267
1237
  "react/no-unsafe-component-will-mount": "warn",
1268
1238
  "react/no-unsafe-component-will-receive-props": "warn",
1269
1239
  "react/no-unsafe-component-will-update": "warn",
1240
+ "react/no-unused-class-component-members": "warn",
1270
1241
  "react/no-use-context": "warn",
1271
1242
  "react/no-useless-forward-ref": "warn",
1272
1243
  "react/prefer-use-state-lazy-initialization": "warn",
1244
+ "react/prefer-namespace-import": "error",
1273
1245
  "react/jsx-shorthand-boolean": "warn",
1274
1246
  "react/prefer-destructuring-assignment": "warn",
1275
1247
  "react/no-missing-context-display-name": "warn",
1276
1248
  "react/no-missing-component-display-name": "warn",
1249
+ "react-rsc/function-definition": "error",
1277
1250
  "react-dom/no-dangerously-set-innerhtml": "warn",
1278
1251
  "react-dom/no-dangerously-set-innerhtml-with-children": "error",
1279
1252
  "react-dom/no-find-dom-node": "error",
@@ -1286,6 +1259,14 @@ async function react(options = {}) {
1286
1259
  "react-dom/no-unsafe-iframe-sandbox": "warn",
1287
1260
  "react-dom/no-use-form-state": "error",
1288
1261
  "react-dom/no-void-elements-with-children": "error",
1262
+ "react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
1263
+ "react-naming-convention/context-name": "warn",
1264
+ "react-naming-convention/ref-name": "warn",
1265
+ "react-naming-convention/use-state": "warn",
1266
+ "react-web-api/no-leaked-event-listener": "warn",
1267
+ "react-web-api/no-leaked-interval": "warn",
1268
+ "react-web-api/no-leaked-resize-observer": "warn",
1269
+ "react-web-api/no-leaked-timeout": "warn",
1289
1270
  "react-hooks/rules-of-hooks": "error",
1290
1271
  "react-hooks/exhaustive-deps": "warn",
1291
1272
  ...reactCompiler ? {
@@ -1305,14 +1286,7 @@ async function react(options = {}) {
1305
1286
  "react-hooks/use-memo": "error",
1306
1287
  "react-hooks/incompatible-library": "warn"
1307
1288
  } : {},
1308
- "react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
1309
- "react-web-api/no-leaked-event-listener": "warn",
1310
- "react-web-api/no-leaked-interval": "warn",
1311
- "react-web-api/no-leaked-resize-observer": "warn",
1312
- "react-web-api/no-leaked-timeout": "warn",
1313
- "react-naming-convention/context-name": "warn",
1314
- "react-naming-convention/use-state": "warn",
1315
- "react-refresh/only-export-components": ["warn", {
1289
+ "react-refresh/only-export-components": ["error", {
1316
1290
  allowConstantExport: isAllowConstantExport,
1317
1291
  allowExportNames: [...isUsingNext ? [
1318
1292
  "dynamic",
@@ -1322,12 +1296,13 @@ async function react(options = {}) {
1322
1296
  "runtime",
1323
1297
  "preferredRegion",
1324
1298
  "maxDuration",
1325
- "config",
1326
1299
  "generateStaticParams",
1327
1300
  "metadata",
1328
1301
  "generateMetadata",
1329
1302
  "viewport",
1330
- "generateViewport"
1303
+ "generateViewport",
1304
+ "generateImageMetadata",
1305
+ "generateSitemaps"
1331
1306
  ] : [], ...isUsingRemix || isUsingReactRouter ? [
1332
1307
  "meta",
1333
1308
  "links",
@@ -1343,6 +1318,18 @@ async function react(options = {}) {
1343
1318
  ...overrides
1344
1319
  }
1345
1320
  },
1321
+ {
1322
+ files: filesTypeAware,
1323
+ name: "react/typescript",
1324
+ rules: {
1325
+ "react-dom/no-string-style-prop": "off",
1326
+ "react-dom/no-unknown-property": "off",
1327
+ "react/jsx-no-duplicate-props": "off",
1328
+ "react/jsx-no-undef": "off",
1329
+ "react/jsx-uses-react": "off",
1330
+ "react/jsx-uses-vars": "off"
1331
+ }
1332
+ },
1346
1333
  ...isTypeAware ? [{
1347
1334
  files: filesTypeAware,
1348
1335
  ignores: ignoresTypeAware,
@@ -1351,7 +1338,6 @@ async function react(options = {}) {
1351
1338
  }] : []
1352
1339
  ];
1353
1340
  }
1354
-
1355
1341
  //#endregion
1356
1342
  //#region src/configs/react-native.ts
1357
1343
  async function reactNative(options = {}) {
@@ -1406,7 +1392,7 @@ async function reactNative(options = {}) {
1406
1392
  "react-native-community/no-single-element-style-arrays": "warn",
1407
1393
  "react-native-community/no-unused-styles": "warn",
1408
1394
  "react-native/no-deep-imports": "error",
1409
- "ts/no-require-imports": "off",
1395
+ "ts/no-require-imports": ["warn", { allow: ["\\.(aac|aiff|avif|bmp|caf|db|gif|heic|html|jpeg|jpg|json|m4a|m4v|mov|mp3|mp4|mpeg|mpg|otf|pdf|png|psd|svg|ttf|wav|webm|webp|xml|yaml|yml|zip)$"] }],
1410
1396
  ...expo ? {
1411
1397
  "expo/no-dynamic-env-var": "error",
1412
1398
  "expo/no-env-var-destructuring": "error",
@@ -1417,17 +1403,16 @@ async function reactNative(options = {}) {
1417
1403
  settings: { react: { version: "detect" } }
1418
1404
  }];
1419
1405
  }
1420
-
1421
1406
  //#endregion
1422
1407
  //#region src/configs/regexp.ts
1423
1408
  async function regexp(options = {}) {
1424
- const config$1 = configs["flat/recommended"];
1425
- const rules = { ...config$1.rules };
1409
+ const config = configs["flat/recommended"];
1410
+ const rules = { ...config.rules };
1426
1411
  if (options.level === "warn") {
1427
1412
  for (const key in rules) if (rules[key] === "error") rules[key] = "warn";
1428
1413
  }
1429
1414
  return [{
1430
- ...config$1,
1415
+ ...config,
1431
1416
  name: "regexp/rules",
1432
1417
  rules: {
1433
1418
  ...rules,
@@ -1435,7 +1420,6 @@ async function regexp(options = {}) {
1435
1420
  }
1436
1421
  }];
1437
1422
  }
1438
-
1439
1423
  //#endregion
1440
1424
  //#region src/configs/sort.ts
1441
1425
  /**
@@ -1669,26 +1653,27 @@ function sortTsconfig() {
1669
1653
  ] }
1670
1654
  }];
1671
1655
  }
1672
-
1673
1656
  //#endregion
1674
1657
  //#region src/configs/tailwindcss.ts
1675
1658
  async function tailwindcss(options = {}) {
1676
- const { entryPoint, overrides = {}, stylistic: stylistic$1 = true, tsconfigPath } = options;
1659
+ const { entryPoint, overrides = {}, stylistic = true, tsconfigPath } = options;
1677
1660
  await ensurePackages(["eslint-plugin-better-tailwindcss"]);
1678
1661
  const [pluginTailwindCSS] = await Promise.all([interopDefault(import("eslint-plugin-better-tailwindcss"))]);
1679
- const { indent = 2 } = typeof stylistic$1 === "boolean" ? {} : stylistic$1;
1662
+ const { indent = 2 } = typeof stylistic === "boolean" ? {} : stylistic;
1680
1663
  return [{
1681
1664
  name: "tailwindcss",
1682
1665
  plugins: { tailwindcss: pluginTailwindCSS },
1683
1666
  rules: {
1684
- ...stylistic$1 ? {
1667
+ ...stylistic ? {
1668
+ "tailwindcss/enforce-canonical-classes": "warn",
1685
1669
  "tailwindcss/enforce-consistent-class-order": "warn",
1686
- "tailwindcss/enforce-consistent-line-wrapping": ["warn", { indent }],
1670
+ "tailwindcss/enforce-consistent-line-wrapping": ["warn", { indent: typeof indent === "number" ? indent : indent === "tab" ? "tab" : 2 }],
1671
+ "tailwindcss/no-deprecated-classes": "warn",
1687
1672
  "tailwindcss/no-duplicate-classes": "warn",
1688
1673
  "tailwindcss/no-unnecessary-whitespace": "warn"
1689
1674
  } : {},
1690
1675
  "tailwindcss/no-conflicting-classes": "error",
1691
- "tailwindcss/no-unregistered-classes": "error",
1676
+ "tailwindcss/no-unknown-classes": "error",
1692
1677
  ...overrides
1693
1678
  },
1694
1679
  settings: { "better-tailwindcss": {
@@ -1697,7 +1682,6 @@ async function tailwindcss(options = {}) {
1697
1682
  } }
1698
1683
  }];
1699
1684
  }
1700
-
1701
1685
  //#endregion
1702
1686
  //#region src/configs/test.ts
1703
1687
  let _pluginTest;
@@ -1735,12 +1719,11 @@ async function test(options = {}) {
1735
1719
  }
1736
1720
  }];
1737
1721
  }
1738
-
1739
1722
  //#endregion
1740
1723
  //#region src/configs/toml.ts
1741
1724
  async function toml(options = {}) {
1742
- const { files = [GLOB_TOML], overrides = {}, stylistic: stylistic$1 = true } = options;
1743
- const { indent = 2 } = typeof stylistic$1 === "boolean" ? {} : stylistic$1;
1725
+ const { files = [GLOB_TOML], overrides = {}, stylistic = true } = options;
1726
+ const { indent = 2 } = typeof stylistic === "boolean" ? {} : stylistic;
1744
1727
  const [pluginToml, parserToml] = await Promise.all([interopDefault(import("eslint-plugin-toml")), interopDefault(import("toml-eslint-parser"))]);
1745
1728
  return [{
1746
1729
  name: "toml/setup",
@@ -1759,11 +1742,11 @@ async function toml(options = {}) {
1759
1742
  "toml/precision-of-integer": "error",
1760
1743
  "toml/tables-order": "error",
1761
1744
  "toml/vue-custom-block/no-parsing-error": "error",
1762
- ...stylistic$1 ? {
1745
+ ...stylistic ? {
1763
1746
  "toml/array-bracket-newline": "error",
1764
1747
  "toml/array-bracket-spacing": "error",
1765
1748
  "toml/array-element-newline": "error",
1766
- "toml/indent": ["error", indent === "tab" ? 2 : indent],
1749
+ "toml/indent": ["error", typeof indent === "number" ? indent : indent === "tab" ? "tab" : 2],
1767
1750
  "toml/inline-table-curly-spacing": "error",
1768
1751
  "toml/key-spacing": "error",
1769
1752
  "toml/padding-line-between-pairs": "error",
@@ -1776,18 +1759,17 @@ async function toml(options = {}) {
1776
1759
  }
1777
1760
  }];
1778
1761
  }
1779
-
1780
1762
  //#endregion
1781
1763
  //#region src/configs/typescript.ts
1782
1764
  async function typescript(options = {}) {
1783
1765
  const { componentExts = [], erasableOnly = false, overrides = {}, overridesTypeAware = {}, parserOptions = {}, type = "app" } = options;
1784
1766
  const files = options.files ?? [
1785
- GLOB_TS,
1786
- GLOB_TSX,
1767
+ "**/*.?([cm])ts",
1768
+ "**/*.?([cm])tsx",
1787
1769
  ...componentExts.map((ext) => `**/*.${ext}`)
1788
1770
  ];
1789
- const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX];
1790
- const ignoresTypeAware = options.ignoresTypeAware ?? [`${GLOB_MARKDOWN}/**`];
1771
+ const filesTypeAware = options.filesTypeAware ?? ["**/*.?([cm])ts", "**/*.?([cm])tsx"];
1772
+ const ignoresTypeAware = options.ignoresTypeAware ?? [`**/*.md/**`];
1791
1773
  const tsconfigPath = options?.tsconfigPath ? options.tsconfigPath : void 0;
1792
1774
  const isTypeAware = !!tsconfigPath;
1793
1775
  const typeAwareRules = {
@@ -1817,10 +1799,10 @@ async function typescript(options = {}) {
1817
1799
  "ts/unbound-method": "error"
1818
1800
  };
1819
1801
  const [pluginTs, parserTs] = await Promise.all([interopDefault(import("@typescript-eslint/eslint-plugin")), interopDefault(import("@typescript-eslint/parser"))]);
1820
- function makeParser(typeAware, files$1, ignores$1) {
1802
+ function makeParser(typeAware, files, ignores) {
1821
1803
  return {
1822
- files: files$1,
1823
- ...ignores$1 ? { ignores: ignores$1 } : {},
1804
+ files,
1805
+ ...ignores ? { ignores } : {},
1824
1806
  languageOptions: {
1825
1807
  parser: parserTs,
1826
1808
  parserOptions: {
@@ -1910,7 +1892,7 @@ async function typescript(options = {}) {
1910
1892
  }] : [],
1911
1893
  ...erasableOnly ? [{
1912
1894
  name: "antfu/typescript/erasable-syntax-only",
1913
- plugins: { "erasable-syntax-only": await interopDefault(import("./lib-iPqdw0x2.mjs")) },
1895
+ plugins: { "erasable-syntax-only": await interopDefault(import("./lib-C63e_zBF.mjs")) },
1914
1896
  rules: {
1915
1897
  "erasable-syntax-only/enums": "error",
1916
1898
  "erasable-syntax-only/import-aliases": "error",
@@ -1920,7 +1902,6 @@ async function typescript(options = {}) {
1920
1902
  }] : []
1921
1903
  ];
1922
1904
  }
1923
-
1924
1905
  //#endregion
1925
1906
  //#region src/configs/unicorn.ts
1926
1907
  async function unicorn(options = {}) {
@@ -1950,7 +1931,6 @@ async function unicorn(options = {}) {
1950
1931
  }
1951
1932
  }];
1952
1933
  }
1953
-
1954
1934
  //#endregion
1955
1935
  //#region src/configs/unocss.ts
1956
1936
  async function unocss(options = {}) {
@@ -1968,13 +1948,12 @@ async function unocss(options = {}) {
1968
1948
  }
1969
1949
  }];
1970
1950
  }
1971
-
1972
1951
  //#endregion
1973
1952
  //#region src/configs/vue.ts
1974
1953
  async function vue(options = {}) {
1975
- const { a11y = false, files = [GLOB_VUE], overrides = {}, stylistic: stylistic$1 = true, vueVersion = 3 } = options;
1954
+ const { a11y = false, files = [GLOB_VUE], overrides = {}, stylistic = true, vueVersion = 3 } = options;
1976
1955
  const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
1977
- const { indent = 2 } = typeof stylistic$1 === "boolean" ? {} : stylistic$1;
1956
+ const { indent = 2 } = typeof stylistic === "boolean" ? {} : stylistic;
1978
1957
  await ensurePackages([
1979
1958
  "eslint-plugin-vue",
1980
1959
  "vue-eslint-parser",
@@ -2107,7 +2086,7 @@ async function vue(options = {}) {
2107
2086
  nonwords: false,
2108
2087
  words: true
2109
2088
  }],
2110
- ...stylistic$1 ? {
2089
+ ...stylistic ? {
2111
2090
  "vue/array-bracket-spacing": ["error", "never"],
2112
2091
  "vue/arrow-spacing": ["error", {
2113
2092
  after: true,
@@ -2179,12 +2158,11 @@ async function vue(options = {}) {
2179
2158
  }
2180
2159
  }];
2181
2160
  }
2182
-
2183
2161
  //#endregion
2184
2162
  //#region src/configs/yaml.ts
2185
2163
  async function yaml(options = {}) {
2186
- const { files = [GLOB_YAML], overrides = {}, stylistic: stylistic$1 = true } = options;
2187
- const { indent = 2, quotes = "single" } = typeof stylistic$1 === "boolean" ? {} : stylistic$1;
2164
+ const { files = [GLOB_YAML], overrides = {}, stylistic = true } = options;
2165
+ const { indent = 2, quotes = "single" } = typeof stylistic === "boolean" ? {} : stylistic;
2188
2166
  const [pluginYaml, parserYaml] = await Promise.all([interopDefault(import("eslint-plugin-yml")), interopDefault(import("yaml-eslint-parser"))]);
2189
2167
  return [{
2190
2168
  name: "yaml/setup",
@@ -2202,14 +2180,14 @@ async function yaml(options = {}) {
2202
2180
  "yaml/no-irregular-whitespace": "error",
2203
2181
  "yaml/plain-scalar": "error",
2204
2182
  "yaml/vue-custom-block/no-parsing-error": "error",
2205
- ...stylistic$1 ? {
2183
+ ...stylistic ? {
2206
2184
  "yaml/block-mapping-question-indicator-newline": "error",
2207
2185
  "yaml/block-sequence-hyphen-indicator-newline": "error",
2208
2186
  "yaml/flow-mapping-curly-newline": "error",
2209
2187
  "yaml/flow-mapping-curly-spacing": "error",
2210
2188
  "yaml/flow-sequence-bracket-newline": "error",
2211
2189
  "yaml/flow-sequence-bracket-spacing": "error",
2212
- "yaml/indent": ["error", indent === "tab" ? 2 : indent],
2190
+ "yaml/indent": ["error", typeof indent === "number" ? indent : 2],
2213
2191
  "yaml/key-spacing": "error",
2214
2192
  "yaml/no-tab-indent": "error",
2215
2193
  "yaml/quotes": ["error", {
@@ -2222,7 +2200,22 @@ async function yaml(options = {}) {
2222
2200
  }
2223
2201
  }];
2224
2202
  }
2225
-
2203
+ //#endregion
2204
+ //#region src/configs/e18e.ts
2205
+ async function e18e(options = {}) {
2206
+ const { isInEditor = false, modernization = true, moduleReplacements = isInEditor, overrides = {}, performanceImprovements = true } = options;
2207
+ const configs = pluginE18e.configs;
2208
+ return [{
2209
+ name: "antfu/e18e/rules",
2210
+ plugins: { e18e: pluginE18e },
2211
+ rules: {
2212
+ ...modernization ? { ...configs.modernization.rules } : {},
2213
+ ...moduleReplacements ? { ...configs.moduleReplacements.rules } : {},
2214
+ ...performanceImprovements ? { ...configs.performanceImprovements.rules } : {},
2215
+ ...overrides
2216
+ }
2217
+ }];
2218
+ }
2226
2219
  //#endregion
2227
2220
  //#region src/factory.ts
2228
2221
  const flatConfigProps = [
@@ -2259,7 +2252,7 @@ const defaultPluginRenaming = {
2259
2252
  * The merged ESLint configurations.
2260
2253
  */
2261
2254
  function config(options = {}, ...userConfigs) {
2262
- const { autoRenamePlugins = true, componentExts = [], effector: enableEffector = isPackageExists("effector"), gitignore: enableGitignore = true, ignores: userIgnores = [], imports: enableImports = true, jsdoc: enableJsdoc = true, jsx: enableJsx = true, nextjs: enableNext = NextJsPackages.some((i) => isPackageExists(i)), node: enableNode = true, pnpm: enableCatalogs = !!findUpSync("pnpm-workspace.yaml"), react: enableReact = ReactPackages.some((i) => isPackageExists(i)), reactNative: enableReactNative = ReactNativePackages.some((i) => isPackageExists(i)), regexp: enableRegexp = true, tailwindcss: enableTailwindCSS = isPackageExists("tailwindcss"), typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, unocss: enableUnoCSS = isPackageExists("unocss"), vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
2255
+ const { autoRenamePlugins = true, componentExts = [], e18e: enableE18e = true, gitignore: enableGitignore = true, ignores: userIgnores = [], imports: enableImports = true, jsdoc: enableJsdoc = true, jsx: enableJsx = true, nextjs: enableNext = NextJsPackages.some((i) => isPackageExists(i)), node: enableNode = true, pnpm: enableCatalogs = !!findUpSync("pnpm-workspace.yaml"), react: enableReact = ReactPackages.some((i) => isPackageExists(i)), reactNative: enableReactNative = ReactNativePackages.some((i) => isPackageExists(i)), regexp: enableRegexp = true, tailwindcss: enableTailwindCSS = isPackageExists("tailwindcss"), typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, unocss: enableUnoCSS = isPackageExists("unocss"), vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
2263
2256
  let isInEditor = options.isInEditor;
2264
2257
  if (isInEditor == null) {
2265
2258
  isInEditor = isInEditorEnv();
@@ -2267,111 +2260,111 @@ function config(options = {}, ...userConfigs) {
2267
2260
  }
2268
2261
  const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? options.stylistic : {};
2269
2262
  if (stylisticOptions && !("jsx" in stylisticOptions)) stylisticOptions.jsx = typeof enableJsx === "object" ? true : enableJsx;
2270
- const configs$1 = [];
2271
- if (enableGitignore) if (typeof enableGitignore !== "boolean") configs$1.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({
2263
+ const configs = [];
2264
+ if (enableGitignore) if (typeof enableGitignore !== "boolean") configs.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({
2272
2265
  name: "gitignore",
2273
2266
  ...enableGitignore
2274
2267
  })]));
2275
- else configs$1.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({
2268
+ else configs.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({
2276
2269
  name: "gitignore",
2277
2270
  strict: false
2278
2271
  })]));
2279
2272
  const typescriptOptions = resolveSubOptions(options, "typescript");
2280
2273
  const tsconfigPath = "tsconfigPath" in typescriptOptions ? typescriptOptions.tsconfigPath : void 0;
2281
- configs$1.push(ignores(userIgnores), javascript({
2274
+ configs.push(ignores(userIgnores, !enableTypeScript), javascript({
2282
2275
  isInEditor,
2283
2276
  overrides: getOverrides(options, "javascript")
2284
2277
  }), comments(), command(), perfectionist());
2285
- if (enableNode) configs$1.push(node());
2286
- if (enableJsdoc) configs$1.push(jsdoc({ stylistic: stylisticOptions }));
2287
- if (enableImports) configs$1.push(imports({
2278
+ if (enableNode) configs.push(node());
2279
+ if (enableJsdoc) configs.push(jsdoc({ stylistic: stylisticOptions }));
2280
+ if (enableImports) configs.push(imports({
2288
2281
  stylistic: stylisticOptions,
2289
2282
  ...resolveSubOptions(options, "imports")
2290
2283
  }));
2291
- if (enableUnicorn) configs$1.push(unicorn(enableUnicorn === true ? {} : enableUnicorn));
2284
+ if (enableE18e) configs.push(e18e({
2285
+ isInEditor,
2286
+ ...enableE18e === true ? {} : enableE18e
2287
+ }));
2288
+ if (enableUnicorn) configs.push(unicorn(enableUnicorn === true ? {} : enableUnicorn));
2292
2289
  if (enableVue) componentExts.push("vue");
2293
- if (enableJsx) configs$1.push(jsx(enableJsx === true ? {} : enableJsx));
2294
- if (enableTypeScript) configs$1.push(typescript({
2290
+ if (enableJsx) configs.push(jsx(enableJsx === true ? {} : enableJsx));
2291
+ if (enableTypeScript) configs.push(typescript({
2295
2292
  ...typescriptOptions,
2296
2293
  componentExts,
2297
2294
  overrides: getOverrides(options, "typescript"),
2298
2295
  type: options.type
2299
2296
  }));
2300
- if (stylisticOptions) configs$1.push(stylistic({
2297
+ if (stylisticOptions) configs.push(stylistic({
2301
2298
  ...stylisticOptions,
2302
2299
  overrides: getOverrides(options, "stylistic")
2303
2300
  }));
2304
- if (enableRegexp) configs$1.push(regexp(typeof enableRegexp === "boolean" ? {} : enableRegexp));
2305
- if (options.test ?? true) configs$1.push(test({
2301
+ if (enableRegexp) configs.push(regexp(typeof enableRegexp === "boolean" ? {} : enableRegexp));
2302
+ if (options.test ?? true) configs.push(test({
2306
2303
  isInEditor,
2307
2304
  overrides: getOverrides(options, "test")
2308
2305
  }));
2309
- if (enableVue) configs$1.push(vue({
2306
+ if (enableVue) configs.push(vue({
2310
2307
  ...resolveSubOptions(options, "vue"),
2311
2308
  overrides: getOverrides(options, "vue"),
2312
2309
  stylistic: stylisticOptions,
2313
2310
  typescript: !!enableTypeScript
2314
2311
  }));
2315
- if (enableReact) configs$1.push(react({
2312
+ if (enableReact) configs.push(react({
2316
2313
  ...typescriptOptions,
2317
2314
  ...resolveSubOptions(options, "react"),
2318
2315
  overrides: getOverrides(options, "react"),
2319
2316
  tsconfigPath
2320
2317
  }));
2321
- if (enableReactNative) configs$1.push(reactNative({
2318
+ if (enableReactNative) configs.push(reactNative({
2322
2319
  ...resolveSubOptions(options, "reactNative"),
2323
2320
  overrides: getOverrides(options, "reactNative")
2324
2321
  }));
2325
- if (enableNext) configs$1.push(nextjs({ overrides: getOverrides(options, "nextjs") }));
2326
- if (enableEffector) configs$1.push(effector({
2327
- ...resolveSubOptions(options, "effector"),
2328
- overrides: getOverrides(options, "effector")
2329
- }));
2330
- if (enableUnoCSS) configs$1.push(unocss({
2322
+ if (enableNext) configs.push(nextjs({ overrides: getOverrides(options, "nextjs") }));
2323
+ if (enableUnoCSS) configs.push(unocss({
2331
2324
  ...resolveSubOptions(options, "unocss"),
2332
2325
  overrides: getOverrides(options, "unocss")
2333
2326
  }));
2334
- if (enableTailwindCSS) configs$1.push(tailwindcss({
2327
+ if (enableTailwindCSS) configs.push(tailwindcss({
2335
2328
  ...typescriptOptions,
2336
2329
  ...resolveSubOptions(options, "tailwindcss"),
2337
2330
  overrides: getOverrides(options, "tailwindcss"),
2338
2331
  stylistic: stylisticOptions
2339
2332
  }));
2340
- if (options.jsonc ?? true) configs$1.push(jsonc({
2333
+ if (options.jsonc ?? true) configs.push(jsonc({
2341
2334
  overrides: getOverrides(options, "jsonc"),
2342
2335
  stylistic: stylisticOptions
2343
2336
  }), sortPackageJson(), sortTsconfig());
2344
2337
  if (enableCatalogs) {
2345
2338
  const optionsPnpm = resolveSubOptions(options, "pnpm");
2346
- configs$1.push(pnpm({
2339
+ configs.push(pnpm({
2347
2340
  isInEditor,
2348
2341
  json: options.jsonc !== false,
2349
2342
  yaml: options.yaml !== false,
2350
2343
  ...optionsPnpm
2351
2344
  }));
2352
2345
  }
2353
- if (options.yaml ?? true) configs$1.push(yaml({
2346
+ if (options.yaml ?? true) configs.push(yaml({
2354
2347
  overrides: getOverrides(options, "yaml"),
2355
2348
  stylistic: stylisticOptions
2356
2349
  }));
2357
- if (options.toml ?? true) configs$1.push(toml({
2350
+ if (options.toml ?? true) configs.push(toml({
2358
2351
  overrides: getOverrides(options, "toml"),
2359
2352
  stylistic: stylisticOptions
2360
2353
  }));
2361
- if (options.markdown ?? true) configs$1.push(markdown({
2354
+ if (options.markdown ?? true) configs.push(markdown({
2362
2355
  componentExts,
2363
2356
  overrides: getOverrides(options, "markdown")
2364
2357
  }));
2365
- if (options.formatters) configs$1.push(formatters(options.formatters, typeof stylisticOptions === "boolean" ? {} : stylisticOptions));
2366
- configs$1.push(disables());
2358
+ if (options.formatters) configs.push(formatters(options.formatters, typeof stylisticOptions === "boolean" ? {} : stylisticOptions));
2359
+ configs.push(disables());
2367
2360
  if ("files" in options) throw new Error("[@ghettoddos/eslint-config] The first argument should not contain the \"files\" property as the options are supposed to be global. Place it in the second or later config instead.");
2368
2361
  const fusedConfig = flatConfigProps.reduce((acc, key) => {
2369
2362
  if (key in options) acc[key] = options[key];
2370
2363
  return acc;
2371
2364
  }, {});
2372
- if (Object.keys(fusedConfig).length) configs$1.push([fusedConfig]);
2365
+ if (Object.keys(fusedConfig).length) configs.push([fusedConfig]);
2373
2366
  let composer = new FlatConfigComposer();
2374
- composer = composer.append(...configs$1, ...userConfigs);
2367
+ composer = composer.append(...configs, ...userConfigs);
2375
2368
  if (autoRenamePlugins) composer = composer.renamePlugins(defaultPluginRenaming);
2376
2369
  if (isInEditor) composer = composer.disableRulesFix([
2377
2370
  "unused-imports/no-unused-imports",
@@ -2380,16 +2373,9 @@ function config(options = {}, ...userConfigs) {
2380
2373
  ], { builtinRules: () => import(["eslint", "use-at-your-own-risk"].join("/")).then((r) => r.builtinRules) });
2381
2374
  return composer;
2382
2375
  }
2383
-
2384
2376
  //#endregion
2385
2377
  //#region src/config-presets.ts
2386
2378
  const CONFIG_PRESET_FULL_ON = {
2387
- effector: {
2388
- future: true,
2389
- patronum: true,
2390
- react: true,
2391
- scope: true
2392
- },
2393
2379
  formatters: true,
2394
2380
  gitignore: true,
2395
2381
  imports: true,
@@ -2417,7 +2403,6 @@ const CONFIG_PRESET_FULL_ON = {
2417
2403
  yaml: true
2418
2404
  };
2419
2405
  const CONFIG_PRESET_FULL_OFF = {
2420
- effector: false,
2421
2406
  formatters: false,
2422
2407
  gitignore: false,
2423
2408
  imports: false,
@@ -2441,10 +2426,8 @@ const CONFIG_PRESET_FULL_OFF = {
2441
2426
  vue: false,
2442
2427
  yaml: false
2443
2428
  };
2444
-
2445
2429
  //#endregion
2446
2430
  //#region src/index.ts
2447
2431
  var src_default = config;
2448
-
2449
2432
  //#endregion
2450
- export { CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, combine, command, comments, config, src_default as default, defaultPluginRenaming, disables, effector, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, reactNative, regexp, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, tailwindcss, test, toml, typescript, unicorn, unocss, vue, yaml };
2433
+ export { CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, combine, command, comments, config, src_default as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, reactNative, regexp, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, tailwindcss, test, toml, typescript, unicorn, unocss, vue, yaml };