@luxass/eslint-config 4.2.6 → 4.2.7

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.
Files changed (134) hide show
  1. package/README.md +4 -5
  2. package/dist/index.cjs +145 -446
  3. package/dist/index.d.cts +733 -12
  4. package/dist/index.d.ts +733 -12
  5. package/dist/{configs/index.cjs → index.js} +288 -516
  6. package/package.json +51 -85
  7. package/dist/chunk-2IR43M6N.mjs +0 -48
  8. package/dist/chunk-47ISSTHW.mjs +0 -291
  9. package/dist/chunk-4YBQZLPS.mjs +0 -68
  10. package/dist/chunk-4YT54JFZ.mjs +0 -48
  11. package/dist/chunk-5NK24IKQ.mjs +0 -26
  12. package/dist/chunk-AJS3TMZE.mjs +0 -63
  13. package/dist/chunk-C6FE5KXJ.mjs +0 -104
  14. package/dist/chunk-DAJA5AV3.mjs +0 -29
  15. package/dist/chunk-DCOLHWHC.mjs +0 -269
  16. package/dist/chunk-E4RVBKZB.mjs +0 -207
  17. package/dist/chunk-HZNHG5PB.mjs +0 -45
  18. package/dist/chunk-KOXCJL3C.mjs +0 -109
  19. package/dist/chunk-PFCAWBCD.mjs +0 -93
  20. package/dist/chunk-PFYV2TWZ.mjs +0 -117
  21. package/dist/chunk-QT6FHTFU.mjs +0 -92
  22. package/dist/chunk-RDZJT36Z.mjs +0 -57
  23. package/dist/chunk-RVSUTDCE.mjs +0 -57
  24. package/dist/chunk-TWAETZPX.mjs +0 -149
  25. package/dist/chunk-WSQOWO67.mjs +0 -16
  26. package/dist/chunk-XBASVDU6.mjs +0 -215
  27. package/dist/chunk-XD3UVRU7.mjs +0 -274
  28. package/dist/chunk-XGI647GZ.mjs +0 -81
  29. package/dist/chunk-XMXYE5WC.mjs +0 -183
  30. package/dist/chunk-YNMFVYL6.mjs +0 -69
  31. package/dist/chunk-YO3IYQ2L.mjs +0 -220
  32. package/dist/chunk-YZCJUX6Z.mjs +0 -0
  33. package/dist/configs/comments.cjs +0 -63
  34. package/dist/configs/comments.d.cts +0 -15
  35. package/dist/configs/comments.d.ts +0 -15
  36. package/dist/configs/comments.mjs +0 -6
  37. package/dist/configs/css/tailwindcss.cjs +0 -148
  38. package/dist/configs/css/tailwindcss.d.cts +0 -11
  39. package/dist/configs/css/tailwindcss.d.ts +0 -11
  40. package/dist/configs/css/tailwindcss.mjs +0 -8
  41. package/dist/configs/css/unocss.cjs +0 -133
  42. package/dist/configs/css/unocss.d.cts +0 -11
  43. package/dist/configs/css/unocss.d.ts +0 -11
  44. package/dist/configs/css/unocss.mjs +0 -8
  45. package/dist/configs/data/json.cjs +0 -155
  46. package/dist/configs/data/json.d.cts +0 -11
  47. package/dist/configs/data/json.d.ts +0 -11
  48. package/dist/configs/data/json.mjs +0 -8
  49. package/dist/configs/data/toml.cjs +0 -131
  50. package/dist/configs/data/toml.d.cts +0 -11
  51. package/dist/configs/data/toml.d.ts +0 -11
  52. package/dist/configs/data/toml.mjs +0 -8
  53. package/dist/configs/data/yaml.cjs +0 -143
  54. package/dist/configs/data/yaml.d.cts +0 -11
  55. package/dist/configs/data/yaml.d.ts +0 -11
  56. package/dist/configs/data/yaml.mjs +0 -8
  57. package/dist/configs/docs/jsdoc.cjs +0 -85
  58. package/dist/configs/docs/jsdoc.d.cts +0 -27
  59. package/dist/configs/docs/jsdoc.d.ts +0 -27
  60. package/dist/configs/docs/jsdoc.mjs +0 -7
  61. package/dist/configs/docs/markdown.cjs +0 -164
  62. package/dist/configs/docs/markdown.d.cts +0 -35
  63. package/dist/configs/docs/markdown.d.ts +0 -35
  64. package/dist/configs/docs/markdown.mjs +0 -8
  65. package/dist/configs/formatters.cjs +0 -274
  66. package/dist/configs/formatters.d.cts +0 -11
  67. package/dist/configs/formatters.d.ts +0 -11
  68. package/dist/configs/formatters.mjs +0 -9
  69. package/dist/configs/frameworks/astro.cjs +0 -179
  70. package/dist/configs/frameworks/astro.d.cts +0 -11
  71. package/dist/configs/frameworks/astro.d.ts +0 -11
  72. package/dist/configs/frameworks/astro.mjs +0 -8
  73. package/dist/configs/frameworks/nextjs.cjs +0 -180
  74. package/dist/configs/frameworks/nextjs.d.cts +0 -11
  75. package/dist/configs/frameworks/nextjs.d.ts +0 -11
  76. package/dist/configs/frameworks/nextjs.mjs +0 -8
  77. package/dist/configs/frameworks/react.cjs +0 -377
  78. package/dist/configs/frameworks/react.d.cts +0 -11
  79. package/dist/configs/frameworks/react.d.ts +0 -11
  80. package/dist/configs/frameworks/react.mjs +0 -8
  81. package/dist/configs/frameworks/solid.cjs +0 -360
  82. package/dist/configs/frameworks/solid.d.cts +0 -11
  83. package/dist/configs/frameworks/solid.d.ts +0 -11
  84. package/dist/configs/frameworks/solid.mjs +0 -8
  85. package/dist/configs/frameworks/vue.cjs +0 -293
  86. package/dist/configs/frameworks/vue.d.cts +0 -11
  87. package/dist/configs/frameworks/vue.d.ts +0 -11
  88. package/dist/configs/frameworks/vue.mjs +0 -8
  89. package/dist/configs/ignores.cjs +0 -96
  90. package/dist/configs/ignores.d.cts +0 -15
  91. package/dist/configs/ignores.d.ts +0 -15
  92. package/dist/configs/ignores.mjs +0 -7
  93. package/dist/configs/imports.cjs +0 -104
  94. package/dist/configs/imports.d.cts +0 -23
  95. package/dist/configs/imports.d.ts +0 -23
  96. package/dist/configs/imports.mjs +0 -7
  97. package/dist/configs/index.d.cts +0 -19
  98. package/dist/configs/index.d.ts +0 -19
  99. package/dist/configs/index.mjs +0 -99
  100. package/dist/configs/javascript.cjs +0 -324
  101. package/dist/configs/javascript.d.cts +0 -11
  102. package/dist/configs/javascript.d.ts +0 -11
  103. package/dist/configs/javascript.mjs +0 -7
  104. package/dist/configs/node.cjs +0 -60
  105. package/dist/configs/node.d.cts +0 -15
  106. package/dist/configs/node.d.ts +0 -15
  107. package/dist/configs/node.mjs +0 -6
  108. package/dist/configs/sort.cjs +0 -240
  109. package/dist/configs/sort.d.cts +0 -26
  110. package/dist/configs/sort.d.ts +0 -26
  111. package/dist/configs/sort.mjs +0 -8
  112. package/dist/configs/stylistic.cjs +0 -98
  113. package/dist/configs/stylistic.d.cts +0 -11
  114. package/dist/configs/stylistic.d.ts +0 -11
  115. package/dist/configs/stylistic.mjs +0 -9
  116. package/dist/configs/test.cjs +0 -210
  117. package/dist/configs/test.d.cts +0 -11
  118. package/dist/configs/test.d.ts +0 -11
  119. package/dist/configs/test.mjs +0 -8
  120. package/dist/configs/typescript.cjs +0 -291
  121. package/dist/configs/typescript.d.cts +0 -11
  122. package/dist/configs/typescript.d.ts +0 -11
  123. package/dist/configs/typescript.mjs +0 -8
  124. package/dist/configs/unicorn.cjs +0 -91
  125. package/dist/configs/unicorn.d.cts +0 -15
  126. package/dist/configs/unicorn.d.ts +0 -15
  127. package/dist/configs/unicorn.mjs +0 -6
  128. package/dist/globs.cjs +0 -158
  129. package/dist/globs.d.cts +0 -28
  130. package/dist/globs.d.ts +0 -28
  131. package/dist/globs.mjs +0 -56
  132. package/dist/index.mjs +0 -278
  133. package/dist/types-HqEzZfQU.d.cts +0 -668
  134. package/dist/types-HqEzZfQU.d.ts +0 -668
@@ -1,70 +1,16 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/configs/index.ts
31
- var configs_exports = {};
32
- __export(configs_exports, {
33
- astro: () => astro,
34
- comments: () => comments,
35
- formatters: () => formatters,
36
- ignores: () => ignores,
37
- imports: () => imports,
38
- javascript: () => javascript,
39
- jsdoc: () => jsdoc,
40
- jsonc: () => jsonc,
41
- markdown: () => markdown,
42
- nextjs: () => nextjs,
43
- node: () => node,
44
- react: () => react,
45
- solid: () => solid,
46
- sortPackageJson: () => sortPackageJson,
47
- sortTsconfig: () => sortTsconfig,
48
- stylistic: () => stylistic,
49
- tailwindcss: () => tailwindcss,
50
- test: () => test,
51
- toml: () => toml,
52
- typescript: () => typescript,
53
- unicorn: () => unicorn,
54
- unocss: () => unocss,
55
- vue: () => vue,
56
- yaml: () => yaml
57
- });
58
- module.exports = __toCommonJS(configs_exports);
1
+ // src/factory.ts
2
+ import process3 from "node:process";
3
+ import { existsSync } from "node:fs";
4
+ import { isPackageExists as isPackageExists3 } from "local-pkg";
59
5
 
60
6
  // src/configs/comments.ts
61
- var import_eslint_plugin_eslint_comments = __toESM(require("@eslint-community/eslint-plugin-eslint-comments"), 1);
7
+ import eslintCommentsPlugin from "@eslint-community/eslint-plugin-eslint-comments";
62
8
  async function comments() {
63
9
  return [
64
10
  {
65
11
  name: "luxass:eslint-comments",
66
12
  plugins: {
67
- "eslint-comments": import_eslint_plugin_eslint_comments.default
13
+ "eslint-comments": eslintCommentsPlugin
68
14
  },
69
15
  rules: {
70
16
  // https://github.com/eslint-community/eslint-plugin-eslint-comments/blob/main/docs/rules/disable-enable-pair.md
@@ -84,13 +30,13 @@ async function comments() {
84
30
  }
85
31
 
86
32
  // src/configs/unicorn.ts
87
- var import_eslint_plugin_unicorn = __toESM(require("eslint-plugin-unicorn"), 1);
33
+ import pluginUnicorn from "eslint-plugin-unicorn";
88
34
  function unicorn() {
89
35
  return [
90
36
  {
91
37
  name: "luxass:unicorn",
92
38
  plugins: {
93
- unicorn: import_eslint_plugin_unicorn.default
39
+ unicorn: pluginUnicorn
94
40
  },
95
41
  rules: {
96
42
  // Pass error message when throwing errors
@@ -140,9 +86,11 @@ function unicorn() {
140
86
  // src/globs.ts
141
87
  var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
142
88
  var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
89
+ var GLOB_JS = "**/*.?([cm])js";
143
90
  var GLOB_JSX = "**/*.?([cm])jsx";
144
91
  var GLOB_TS = "**/*.?([cm])ts";
145
92
  var GLOB_TSX = "**/*.?([cm])tsx";
93
+ var GLOB_STYLE = "**/*.{c,le,sc}ss";
146
94
  var GLOB_CSS = "**/*.css";
147
95
  var GLOB_POSTCSS = "**/*.{p,post}css";
148
96
  var GLOB_LESS = "**/*.less";
@@ -155,6 +103,7 @@ var GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
155
103
  var GLOB_VUE = "**/*.vue";
156
104
  var GLOB_YAML = "**/*.y?(a)ml";
157
105
  var GLOB_TOML = "**/*.toml";
106
+ var GLOB_HTML = "**/*.htm?(l)";
158
107
  var GLOB_ASTRO = "**/*.astro";
159
108
  var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
160
109
  var GLOB_TESTS = [
@@ -225,13 +174,13 @@ function ignores() {
225
174
  }
226
175
 
227
176
  // src/configs/node.ts
228
- var import_eslint_plugin_n = __toESM(require("eslint-plugin-n"), 1);
177
+ import pluginNode from "eslint-plugin-n";
229
178
  function node() {
230
179
  return [
231
180
  {
232
181
  name: "luxass:node",
233
182
  plugins: {
234
- node: import_eslint_plugin_n.default
183
+ node: pluginNode
235
184
  },
236
185
  rules: {
237
186
  "node/handle-callback-err": ["error", "^(err|error)$"],
@@ -459,8 +408,8 @@ function sortTsconfig() {
459
408
  }
460
409
 
461
410
  // src/configs/imports.ts
462
- var import_eslint_plugin_i = __toESM(require("eslint-plugin-i"), 1);
463
- var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
411
+ import pluginImport from "eslint-plugin-i";
412
+ import pluginAntfu from "eslint-plugin-antfu";
464
413
  async function imports(options = {}) {
465
414
  const {
466
415
  stylistic: stylistic2 = true
@@ -469,8 +418,8 @@ async function imports(options = {}) {
469
418
  {
470
419
  name: "luxass:imports",
471
420
  plugins: {
472
- antfu: import_eslint_plugin_antfu.default,
473
- import: import_eslint_plugin_i.default
421
+ antfu: pluginAntfu,
422
+ import: pluginImport
474
423
  },
475
424
  rules: {
476
425
  "antfu/import-dedupe": "error",
@@ -500,9 +449,9 @@ async function imports(options = {}) {
500
449
  }
501
450
 
502
451
  // src/configs/javascript.ts
503
- var import_globals = __toESM(require("globals"), 1);
504
- var import_eslint_plugin_unused_imports = __toESM(require("eslint-plugin-unused-imports"), 1);
505
- var import_eslint_plugin_antfu2 = __toESM(require("eslint-plugin-antfu"), 1);
452
+ import globals from "globals";
453
+ import pluginUnusedImports from "eslint-plugin-unused-imports";
454
+ import pluginAntfu2 from "eslint-plugin-antfu";
506
455
  async function javascript(options = {}) {
507
456
  const { editor = false, overrides = {} } = options;
508
457
  return [
@@ -511,9 +460,9 @@ async function javascript(options = {}) {
511
460
  languageOptions: {
512
461
  ecmaVersion: 2022,
513
462
  globals: {
514
- ...import_globals.default.browser,
515
- ...import_globals.default.es2021,
516
- ...import_globals.default.node,
463
+ ...globals.browser,
464
+ ...globals.es2021,
465
+ ...globals.node,
517
466
  document: "readonly",
518
467
  navigator: "readonly",
519
468
  window: "readonly"
@@ -531,8 +480,8 @@ async function javascript(options = {}) {
531
480
  reportUnusedDisableDirectives: true
532
481
  },
533
482
  plugins: {
534
- "antfu": import_eslint_plugin_antfu2.default,
535
- "unused-imports": import_eslint_plugin_unused_imports.default
483
+ "antfu": pluginAntfu2,
484
+ "unused-imports": pluginUnusedImports
536
485
  },
537
486
  rules: {
538
487
  "accessor-pairs": [
@@ -761,8 +710,12 @@ async function javascript(options = {}) {
761
710
  }
762
711
 
763
712
  // src/utils.ts
764
- var import_node_process = __toESM(require("process"), 1);
765
- var import_local_pkg = require("local-pkg");
713
+ import process from "node:process";
714
+ import { isPackageExists } from "local-pkg";
715
+ async function combine(...configs) {
716
+ const resolved = await Promise.all(configs);
717
+ return resolved.flat();
718
+ }
766
719
  function renameRules(rules, from, to) {
767
720
  return Object.fromEntries(
768
721
  Object.entries(rules).map(([key, value]) => {
@@ -781,11 +734,11 @@ async function interop(m) {
781
734
  return resolved.default || resolved;
782
735
  }
783
736
  async function ensure(packages) {
784
- if (import_node_process.default.env.CI || import_node_process.default.stdout.isTTY === false) {
737
+ if (process.env.CI || process.stdout.isTTY === false) {
785
738
  return;
786
739
  }
787
740
  ;
788
- const nonExistingPackages = packages.filter((i) => !(0, import_local_pkg.isPackageExists)(i));
741
+ const nonExistingPackages = packages.filter((i) => !isPackageExists(i));
789
742
  if (nonExistingPackages.length === 0) {
790
743
  return;
791
744
  }
@@ -805,6 +758,15 @@ async function ensure(packages) {
805
758
  }
806
759
  ;
807
760
  }
761
+ function resolveSubOptions(options, key) {
762
+ return typeof options[key] === "boolean" ? {} : options[key] || {};
763
+ }
764
+ function getOverrides(options, key) {
765
+ const sub = resolveSubOptions(options, key);
766
+ return {
767
+ ..."overrides" in sub ? sub.overrides : {}
768
+ };
769
+ }
808
770
 
809
771
  // src/configs/docs/jsdoc.ts
810
772
  async function jsdoc(options = {}) {
@@ -926,8 +888,8 @@ async function jsonc(options = {}) {
926
888
  }
927
889
 
928
890
  // src/configs/docs/markdown.ts
929
- var parserPlain = __toESM(require("eslint-parser-plain"), 1);
930
- var import_eslint_merge_processors = require("eslint-merge-processors");
891
+ import * as parserPlain from "eslint-parser-plain";
892
+ import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
931
893
  async function markdown(options = {}) {
932
894
  const {
933
895
  exts = [],
@@ -949,9 +911,9 @@ async function markdown(options = {}) {
949
911
  // `eslint-plugin-markdown` only creates virtual files for code blocks,
950
912
  // but not the markdown file itself. We use `eslint-merge-processors` to
951
913
  // add a pass-through processor for the markdown file itself.
952
- processor: (0, import_eslint_merge_processors.mergeProcessors)([
914
+ processor: mergeProcessors([
953
915
  markdown2.processors.markdown,
954
- import_eslint_merge_processors.processorPassThrough
916
+ processorPassThrough
955
917
  ])
956
918
  },
957
919
  {
@@ -1018,7 +980,7 @@ async function markdown(options = {}) {
1018
980
  }
1019
981
 
1020
982
  // src/configs/stylistic.ts
1021
- var import_eslint_plugin_antfu3 = __toESM(require("eslint-plugin-antfu"), 1);
983
+ import pluginAntfu3 from "eslint-plugin-antfu";
1022
984
  var StylisticConfigDefaults = {
1023
985
  indent: 2,
1024
986
  jsx: true,
@@ -1049,7 +1011,7 @@ async function stylistic(options = {}) {
1049
1011
  {
1050
1012
  name: "luxass:stylistic",
1051
1013
  plugins: {
1052
- antfu: import_eslint_plugin_antfu3.default,
1014
+ antfu: pluginAntfu3,
1053
1015
  style: pluginStylistic
1054
1016
  },
1055
1017
  rules: {
@@ -1067,8 +1029,8 @@ async function stylistic(options = {}) {
1067
1029
  }
1068
1030
 
1069
1031
  // src/configs/typescript.ts
1070
- var import_node_process2 = __toESM(require("process"), 1);
1071
- var import_eslint_plugin_antfu4 = __toESM(require("eslint-plugin-antfu"), 1);
1032
+ import process2 from "node:process";
1033
+ import pluginAntfu4 from "eslint-plugin-antfu";
1072
1034
  async function typescript(options = {}) {
1073
1035
  const {
1074
1036
  exts = [],
@@ -1122,7 +1084,7 @@ async function typescript(options = {}) {
1122
1084
  sourceType: "module",
1123
1085
  ...typeAware ? {
1124
1086
  project: tsconfigPath,
1125
- tsconfigRootDir: import_node_process2.default.cwd()
1087
+ tsconfigRootDir: process2.cwd()
1126
1088
  } : {},
1127
1089
  ...parserOptions
1128
1090
  }
@@ -1134,7 +1096,7 @@ async function typescript(options = {}) {
1134
1096
  // Install the plugins without globs, so they can be configured separately.
1135
1097
  name: "luxass:typescript:setup",
1136
1098
  plugins: {
1137
- antfu: import_eslint_plugin_antfu4.default,
1099
+ antfu: pluginAntfu4,
1138
1100
  ts: pluginTs
1139
1101
  }
1140
1102
  },
@@ -1272,27 +1234,21 @@ async function typescript(options = {}) {
1272
1234
  }
1273
1235
 
1274
1236
  // src/configs/frameworks/vue.ts
1275
- var import_eslint_merge_processors2 = require("eslint-merge-processors");
1237
+ import { mergeProcessors as mergeProcessors2 } from "eslint-merge-processors";
1276
1238
  async function vue(options = {}) {
1277
1239
  const {
1278
- a11y = false,
1279
1240
  files = [GLOB_VUE],
1280
1241
  overrides = {},
1281
1242
  stylistic: stylistic2 = true
1282
1243
  } = options;
1283
- if (a11y) {
1284
- await ensure(["eslint-plugin-vuejs-accessibility"]);
1285
- }
1286
1244
  const [
1287
1245
  pluginVue,
1288
1246
  parserVue,
1289
- processorVueBlocks,
1290
- pluginA11y
1247
+ processorVueBlocks
1291
1248
  ] = await Promise.all([
1292
1249
  interop(import("eslint-plugin-vue")),
1293
1250
  interop(import("vue-eslint-parser")),
1294
- interop(import("eslint-processor-vue-blocks")),
1295
- ...a11y ? [interop(import("eslint-plugin-vuejs-accessibility"))] : []
1251
+ interop(import("eslint-processor-vue-blocks"))
1296
1252
  ]);
1297
1253
  const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
1298
1254
  const {
@@ -1302,8 +1258,7 @@ async function vue(options = {}) {
1302
1258
  {
1303
1259
  name: "luxass:vue:setup",
1304
1260
  plugins: {
1305
- vue: pluginVue,
1306
- ...a11y ? { "vue-a11y": pluginA11y } : {}
1261
+ vue: pluginVue
1307
1262
  }
1308
1263
  },
1309
1264
  {
@@ -1320,7 +1275,7 @@ async function vue(options = {}) {
1320
1275
  sourceType: "module"
1321
1276
  }
1322
1277
  },
1323
- processor: sfcBlocks === false ? pluginVue.processors[".vue"] : (0, import_eslint_merge_processors2.mergeProcessors)([
1278
+ processor: sfcBlocks === false ? pluginVue.processors[".vue"] : mergeProcessors2([
1324
1279
  pluginVue.processors[".vue"],
1325
1280
  processorVueBlocks({
1326
1281
  ...sfcBlocks,
@@ -1439,28 +1394,6 @@ async function vue(options = {}) {
1439
1394
  "vue/space-in-parens": ["error", "never"],
1440
1395
  "vue/template-curly-spacing": "error"
1441
1396
  } : {},
1442
- ...a11y ? {
1443
- "vue-a11y/alt-text": "error",
1444
- "vue-a11y/anchor-has-content": "error",
1445
- "vue-a11y/aria-props": "error",
1446
- "vue-a11y/aria-role": "error",
1447
- "vue-a11y/aria-unsupported-elements": "error",
1448
- "vue-a11y/click-events-have-key-events": "error",
1449
- "vue-a11y/form-control-has-label": "error",
1450
- "vue-a11y/heading-has-content": "error",
1451
- "vue-a11y/iframe-has-title": "error",
1452
- "vue-a11y/interactive-supports-focus": "error",
1453
- "vue-a11y/label-has-for": "error",
1454
- "vue-a11y/media-has-caption": "error",
1455
- "vue-a11y/mouse-events-have-key-events": "error",
1456
- "vue-a11y/no-access-key": "error",
1457
- "vue-a11y/no-autofocus": "error",
1458
- "vue-a11y/no-distracting-elements": "error",
1459
- "vue-a11y/no-redundant-roles": "error",
1460
- "vue-a11y/no-static-element-interactions": "error",
1461
- "vue-a11y/role-has-required-aria-props": "error",
1462
- "vue-a11y/tabindex-no-positive": "error"
1463
- } : {},
1464
1397
  ...overrides
1465
1398
  }
1466
1399
  }
@@ -1538,102 +1471,6 @@ async function yaml(options = {}) {
1538
1471
  ];
1539
1472
  }
1540
1473
 
1541
- // src/custom-rules/utils.ts
1542
- var import_utils8 = require("@typescript-eslint/utils");
1543
- var createRule = import_utils8.ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
1544
-
1545
- // src/custom-rules/no-only-tests/index.ts
1546
- var RULE_NAME = "no-only-tests";
1547
- var DEFAULT_OPTIONS = {
1548
- blocks: ["describe", "it", "test"],
1549
- focus: ["only"]
1550
- };
1551
- function getPath(node2, path = []) {
1552
- if (node2) {
1553
- const nodeName = node2.name || node2.property && node2.property.name;
1554
- if (node2.object) {
1555
- return getPath(
1556
- node2.object,
1557
- [nodeName, ...path]
1558
- );
1559
- }
1560
- if (node2.callee)
1561
- return getPath(node2.callee, path);
1562
- return [nodeName, ...path];
1563
- }
1564
- return path;
1565
- }
1566
- var noOnlyTests = createRule({
1567
- name: RULE_NAME,
1568
- create: (context, [options]) => {
1569
- const {
1570
- blocks = DEFAULT_OPTIONS.blocks,
1571
- focus = DEFAULT_OPTIONS.focus
1572
- } = options;
1573
- return {
1574
- Identifier(node2) {
1575
- const parent = node2.parent?.object;
1576
- if (!parent)
1577
- return;
1578
- if (!focus.includes(node2.name))
1579
- return;
1580
- const callPath = getPath(node2.parent).join(".");
1581
- const found = blocks.find((block) => {
1582
- if (block.endsWith("*")) {
1583
- return callPath.startsWith(block.replace(/\*$/, ""));
1584
- }
1585
- return callPath.startsWith(`${block}.`);
1586
- });
1587
- if (found) {
1588
- context.report({
1589
- data: { block: callPath.split(".")[0], focus: node2.name },
1590
- messageId: "not-permitted",
1591
- node: node2
1592
- });
1593
- }
1594
- }
1595
- };
1596
- },
1597
- defaultOptions: [
1598
- {
1599
- blocks: ["describe", "it", "test"],
1600
- focus: ["only"]
1601
- }
1602
- ],
1603
- meta: {
1604
- docs: {
1605
- description: "disallow .only blocks in tests",
1606
- recommended: "recommended"
1607
- },
1608
- messages: {
1609
- "not-permitted": "{{ block }}.{{ focus }} not permitted"
1610
- },
1611
- schema: [
1612
- {
1613
- additionalProperties: false,
1614
- properties: {
1615
- blocks: {
1616
- items: {
1617
- type: "string"
1618
- },
1619
- type: "array",
1620
- uniqueItems: true
1621
- },
1622
- focus: {
1623
- items: {
1624
- type: "string"
1625
- },
1626
- type: "array",
1627
- uniqueItems: true
1628
- }
1629
- },
1630
- type: "object"
1631
- }
1632
- ],
1633
- type: "layout"
1634
- }
1635
- });
1636
-
1637
1474
  // src/configs/test.ts
1638
1475
  async function test(options = {}) {
1639
1476
  const {
@@ -1653,8 +1490,7 @@ async function test(options = {}) {
1653
1490
  test: {
1654
1491
  ...pluginVitest,
1655
1492
  rules: {
1656
- ...pluginVitest.rules,
1657
- "no-only-tests": noOnlyTests
1493
+ ...pluginVitest.rules
1658
1494
  }
1659
1495
  }
1660
1496
  }
@@ -1668,7 +1504,7 @@ async function test(options = {}) {
1668
1504
  { fn: "it", withinDescribe: "it" }
1669
1505
  ],
1670
1506
  "test/no-identical-title": "error",
1671
- "test/no-only-tests": editor ? "off" : "error",
1507
+ "test/no-focused-tests": editor ? "off" : "error",
1672
1508
  "test/prefer-hooks-in-order": "error",
1673
1509
  "test/prefer-lowercase-title": "error",
1674
1510
  ...overrides
@@ -1794,7 +1630,7 @@ async function nextjs(options = {}) {
1794
1630
  }
1795
1631
 
1796
1632
  // src/configs/frameworks/react.ts
1797
- var import_local_pkg2 = require("local-pkg");
1633
+ import { isPackageExists as isPackageExists2 } from "local-pkg";
1798
1634
  async function react(options = {}) {
1799
1635
  const {
1800
1636
  a11y = false,
@@ -1819,7 +1655,7 @@ async function react(options = {}) {
1819
1655
  interop(import("eslint-plugin-react-refresh")),
1820
1656
  ...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
1821
1657
  ]);
1822
- const isAllowConstantExport = (0, import_local_pkg2.isPackageExists)("vite");
1658
+ const isAllowConstantExport = isPackageExists2("vite");
1823
1659
  return [
1824
1660
  {
1825
1661
  name: "luxass:react:setup",
@@ -2078,15 +1914,18 @@ async function astro(options) {
2078
1914
  a11y = false,
2079
1915
  files = [GLOB_ASTRO],
2080
1916
  overrides = {},
2081
- typescript: typescript2 = true
1917
+ typescript: typescript2 = true,
1918
+ stylistic: stylistic2 = true
2082
1919
  } = options;
2083
1920
  const [
2084
1921
  pluginAstro,
2085
1922
  parserAstro,
1923
+ parserTs,
2086
1924
  pluginA11y
2087
1925
  ] = await Promise.all([
2088
1926
  interop(import("eslint-plugin-astro")),
2089
1927
  interop(import("astro-eslint-parser")),
1928
+ interop(import("@typescript-eslint/parser")),
2090
1929
  ...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
2091
1930
  ]);
2092
1931
  return [
@@ -2101,15 +1940,10 @@ async function astro(options) {
2101
1940
  name: "luxass:astro:rules",
2102
1941
  files,
2103
1942
  languageOptions: {
2104
- globals: {
2105
- "astro/astro": true,
2106
- "es2020": true,
2107
- "node": true
2108
- },
2109
1943
  parser: parserAstro,
2110
1944
  parserOptions: {
2111
1945
  extraFileExtensions: [".astro"],
2112
- parser: typescript2 ? await interop(import("@typescript-eslint/parser")) : null,
1946
+ parser: typescript2 ? parserTs : null,
2113
1947
  sourceType: "module"
2114
1948
  }
2115
1949
  },
@@ -2117,28 +1951,16 @@ async function astro(options) {
2117
1951
  // Disallow conflicting set directives and child contents
2118
1952
  // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-conflict-set-directives/
2119
1953
  "astro/no-conflict-set-directives": "error",
2120
- // Disallow using deprecated Astro.canonicalURL
2121
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-canonicalurl/
2122
- "astro/no-deprecated-astro-canonicalurl": "error",
2123
- // Disallow using deprecated Astro.fetchContent()
2124
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-fetchcontent/
2125
- "astro/no-deprecated-astro-fetchcontent": "error",
2126
- // Disallow using deprecated Astro.resolve()
2127
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-resolve/
2128
- "astro/no-deprecated-astro-resolve": "error",
2129
- // Disallow using deprecated getEntryBySlug()
2130
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-getentrybyslug/
2131
- "astro/no-deprecated-getentrybyslug": "error",
2132
- // Disallow unused define:vars={...} in style tag
2133
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-define-vars-in-style/
2134
- "astro/no-unused-define-vars-in-style": "error",
2135
- // Disallow warnings when compiling
2136
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/
2137
- "astro/valid-compile": "error",
2138
- "style/jsx-closing-tag-location": "off",
2139
- "style/jsx-indent": "off",
2140
- "style/jsx-one-expression-per-line": "off",
2141
- "style/multiline-ternary": ["error", "never"],
1954
+ // Disallow use of `set:html` directive
1955
+ // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-html-directive/
1956
+ "astro/no-set-html-directive": "off",
1957
+ ...stylistic2 ? {
1958
+ "style/indent": "off",
1959
+ "style/jsx-indent": "off",
1960
+ "style/jsx-closing-tag-location": "off",
1961
+ "style/jsx-one-expression-per-line": "off",
1962
+ "style/no-multiple-empty-lines": "off"
1963
+ } : {},
2142
1964
  ...overrides
2143
1965
  }
2144
1966
  },
@@ -2169,7 +1991,7 @@ async function astro(options) {
2169
1991
  browser: true,
2170
1992
  es2020: true
2171
1993
  },
2172
- parser: typescript2 ? await interop(import("@typescript-eslint/parser")) : null,
1994
+ parser: typescript2 ? parserTs : null,
2173
1995
  parserOptions: {
2174
1996
  project: null,
2175
1997
  sourceType: "module"
@@ -2232,7 +2054,7 @@ async function tailwindcss(options = {}) {
2232
2054
  }
2233
2055
 
2234
2056
  // src/configs/formatters.ts
2235
- var parserPlain2 = __toESM(require("eslint-parser-plain"), 1);
2057
+ import * as parserPlain2 from "eslint-parser-plain";
2236
2058
  async function formatters(options = {}, stylistic2 = {}) {
2237
2059
  await ensure([
2238
2060
  "eslint-plugin-format"
@@ -2455,291 +2277,241 @@ async function toml(options = {}) {
2455
2277
  ];
2456
2278
  }
2457
2279
 
2458
- // src/configs/frameworks/solid.ts
2459
- async function solid(options = {}) {
2280
+ // src/factory.ts
2281
+ var FLAT_CONFIG_PROPS = [
2282
+ "name",
2283
+ "files",
2284
+ "ignores",
2285
+ "languageOptions",
2286
+ "linterOptions",
2287
+ "processor",
2288
+ "plugins",
2289
+ "rules",
2290
+ "settings"
2291
+ ];
2292
+ var VuePackages = [
2293
+ "vue",
2294
+ "nuxt",
2295
+ "vitepress",
2296
+ "@slidev/cli"
2297
+ ];
2298
+ async function luxass(options = {}, ...userConfigs) {
2460
2299
  const {
2461
- a11y = false,
2462
- files = [GLOB_JSX, GLOB_TSX],
2463
- overrides = {},
2464
- typescript: typescript2 = true
2300
+ astro: enableAstro = false,
2301
+ editor = !!((process3.env.VSCODE_PID || process3.env.JETBRAINS_IDE || process3.env.VIM) && !process3.env.CI),
2302
+ exts = [],
2303
+ gitignore: enableGitignore = true,
2304
+ nextjs: enableNextJS = false,
2305
+ react: enableReact = false,
2306
+ tailwindcss: enableTailwindCSS = false,
2307
+ typescript: enableTypeScript = isPackageExists3("typescript"),
2308
+ unocss: enableUnoCSS = false,
2309
+ vue: enableVue = VuePackages.some((i) => isPackageExists3(i))
2465
2310
  } = options;
2466
- await ensure([
2467
- "eslint-plugin-solid"
2468
- ]);
2469
- const [
2470
- pluginSolid
2471
- ] = await Promise.all([
2472
- interop(import("eslint-plugin-solid"))
2473
- ]);
2474
- return [
2475
- {
2476
- name: "luxass:solid:setup",
2477
- plugins: {
2478
- solid: pluginSolid
2479
- }
2480
- },
2481
- {
2482
- name: "luxass:solid:rules",
2483
- files,
2484
- languageOptions: {
2485
- parserOptions: {
2486
- ecmaFeatures: {
2487
- jsx: true
2488
- }
2489
- },
2490
- sourceType: "module"
2491
- },
2492
- rules: {
2493
- ...a11y ? {
2494
- // recommended rules for jsx-a11y
2495
- "jsx-a11y/alt-text": "error",
2496
- "jsx-a11y/anchor-ambiguous-text": "off",
2497
- "jsx-a11y/anchor-has-content": "error",
2498
- "jsx-a11y/anchor-is-valid": "error",
2499
- "jsx-a11y/aria-activedescendant-has-tabindex": "error",
2500
- "jsx-a11y/aria-props": "error",
2501
- "jsx-a11y/aria-proptypes": "error",
2502
- "jsx-a11y/aria-role": "error",
2503
- "jsx-a11y/aria-unsupported-elements": "error",
2504
- "jsx-a11y/autocomplete-valid": "error",
2505
- "jsx-a11y/click-events-have-key-events": "error",
2506
- "jsx-a11y/control-has-associated-label": [
2507
- "off",
2508
- {
2509
- ignoreElements: [
2510
- "audio",
2511
- "canvas",
2512
- "embed",
2513
- "input",
2514
- "textarea",
2515
- "tr",
2516
- "video"
2517
- ],
2518
- ignoreRoles: [
2519
- "grid",
2520
- "listbox",
2521
- "menu",
2522
- "menubar",
2523
- "radiogroup",
2524
- "row",
2525
- "tablist",
2526
- "toolbar",
2527
- "tree",
2528
- "treegrid"
2529
- ],
2530
- includeRoles: [
2531
- "alert",
2532
- "dialog"
2533
- ]
2534
- }
2535
- ],
2536
- "jsx-a11y/heading-has-content": "error",
2537
- "jsx-a11y/html-has-lang": "error",
2538
- "jsx-a11y/iframe-has-title": "error",
2539
- "jsx-a11y/img-redundant-alt": "error",
2540
- "jsx-a11y/interactive-supports-focus": [
2541
- "error",
2542
- {
2543
- tabbable: [
2544
- "button",
2545
- "checkbox",
2546
- "link",
2547
- "searchbox",
2548
- "spinbutton",
2549
- "switch",
2550
- "textbox"
2551
- ]
2552
- }
2553
- ],
2554
- "jsx-a11y/label-has-associated-control": "error",
2555
- "jsx-a11y/label-has-for": "off",
2556
- "jsx-a11y/media-has-caption": "error",
2557
- "jsx-a11y/mouse-events-have-key-events": "error",
2558
- "jsx-a11y/no-access-key": "error",
2559
- "jsx-a11y/no-autofocus": "error",
2560
- "jsx-a11y/no-distracting-elements": "error",
2561
- "jsx-a11y/no-interactive-element-to-noninteractive-role": [
2562
- "error",
2563
- {
2564
- canvas: [
2565
- "img"
2566
- ],
2567
- tr: [
2568
- "none",
2569
- "presentation"
2570
- ]
2571
- }
2572
- ],
2573
- "jsx-a11y/no-noninteractive-element-interactions": [
2574
- "error",
2575
- {
2576
- alert: [
2577
- "onKeyUp",
2578
- "onKeyDown",
2579
- "onKeyPress"
2580
- ],
2581
- body: [
2582
- "onError",
2583
- "onLoad"
2584
- ],
2585
- dialog: [
2586
- "onKeyUp",
2587
- "onKeyDown",
2588
- "onKeyPress"
2589
- ],
2590
- handlers: [
2591
- "onClick",
2592
- "onError",
2593
- "onLoad",
2594
- "onMouseDown",
2595
- "onMouseUp",
2596
- "onKeyPress",
2597
- "onKeyDown",
2598
- "onKeyUp"
2599
- ],
2600
- iframe: [
2601
- "onError",
2602
- "onLoad"
2603
- ],
2604
- img: [
2605
- "onError",
2606
- "onLoad"
2607
- ]
2608
- }
2609
- ],
2610
- "jsx-a11y/no-noninteractive-element-to-interactive-role": [
2611
- "error",
2612
- {
2613
- fieldset: [
2614
- "radiogroup",
2615
- "presentation"
2616
- ],
2617
- li: [
2618
- "menuitem",
2619
- "option",
2620
- "row",
2621
- "tab",
2622
- "treeitem"
2623
- ],
2624
- ol: [
2625
- "listbox",
2626
- "menu",
2627
- "menubar",
2628
- "radiogroup",
2629
- "tablist",
2630
- "tree",
2631
- "treegrid"
2632
- ],
2633
- table: [
2634
- "grid"
2635
- ],
2636
- td: [
2637
- "gridcell"
2638
- ],
2639
- ul: [
2640
- "listbox",
2641
- "menu",
2642
- "menubar",
2643
- "radiogroup",
2644
- "tablist",
2645
- "tree",
2646
- "treegrid"
2647
- ]
2648
- }
2649
- ],
2650
- "jsx-a11y/no-noninteractive-tabindex": [
2651
- "error",
2652
- {
2653
- allowExpressionValues: true,
2654
- roles: [
2655
- "tabpanel"
2656
- ],
2657
- tags: []
2658
- }
2659
- ],
2660
- "jsx-a11y/no-redundant-roles": "error",
2661
- "jsx-a11y/no-static-element-interactions": [
2662
- "error",
2663
- {
2664
- allowExpressionValues: true,
2665
- handlers: [
2666
- "onClick",
2667
- "onMouseDown",
2668
- "onMouseUp",
2669
- "onKeyPress",
2670
- "onKeyDown",
2671
- "onKeyUp"
2672
- ]
2673
- }
2674
- ],
2675
- "jsx-a11y/role-has-required-aria-props": "error",
2676
- "jsx-a11y/role-supports-aria-props": "error",
2677
- "jsx-a11y/scope": "error",
2678
- "jsx-a11y/tabindex-no-positive": "error"
2679
- } : {},
2680
- // solid recommended rules
2681
- // reactivity
2682
- "solid/components-return-once": 1,
2683
- "solid/event-handlers": 1,
2684
- // these rules are mostly style suggestions
2685
- "solid/imports": 1,
2686
- // identifier usage is important
2687
- "solid/jsx-no-duplicate-props": 2,
2688
- "solid/jsx-no-script-url": 2,
2689
- "solid/jsx-no-undef": 2,
2690
- "solid/jsx-uses-vars": 2,
2691
- "solid/no-array-handlers": 0,
2692
- "solid/no-destructure": 2,
2693
- // security problems
2694
- "solid/no-innerhtml": 2,
2695
- // only necessary for resource-constrained environments
2696
- "solid/no-proxy-apis": 0,
2697
- "solid/no-react-deps": 1,
2698
- "solid/no-react-specific-props": 1,
2699
- "solid/no-unknown-namespaces": 2,
2700
- // deprecated
2701
- "solid/prefer-classlist": 0,
2702
- "solid/prefer-for": 2,
2703
- // handled by Solid compiler, opt-in style suggestion
2704
- "solid/prefer-show": 0,
2705
- "solid/reactivity": 1,
2706
- "solid/self-closing-comp": 1,
2707
- "solid/style-prop": 1,
2708
- ...typescript2 ? {
2709
- "solid/jsx-no-undef": [2, { typescriptEnabled: true }],
2710
- // namespaces taken care of by TS
2711
- "solid/no-unknown-namespaces": 0
2712
- } : {},
2713
- // overrides
2714
- ...overrides
2311
+ const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? options.stylistic : {};
2312
+ if (stylisticOptions && !("jsx" in stylisticOptions)) {
2313
+ stylisticOptions.jsx = options.jsx ?? true;
2314
+ }
2315
+ const configs = [];
2316
+ if (enableGitignore) {
2317
+ if (typeof enableGitignore !== "boolean") {
2318
+ configs.push(interop(import("eslint-config-flat-gitignore")).then((plugin) => [plugin(enableGitignore)]));
2319
+ } else {
2320
+ if (existsSync(".gitignore")) {
2321
+ configs.push(interop(import("eslint-config-flat-gitignore")).then((plugin) => [plugin()]));
2715
2322
  }
2716
2323
  }
2717
- ];
2324
+ }
2325
+ configs.push(
2326
+ ignores(),
2327
+ javascript({
2328
+ editor,
2329
+ overrides: getOverrides(options, "javascript")
2330
+ }),
2331
+ comments(),
2332
+ node(),
2333
+ jsdoc({
2334
+ stylistic: stylisticOptions
2335
+ }),
2336
+ imports({
2337
+ stylistic: stylisticOptions
2338
+ }),
2339
+ unicorn()
2340
+ );
2341
+ if (enableVue) {
2342
+ exts.push("vue");
2343
+ }
2344
+ if (enableTypeScript) {
2345
+ configs.push(typescript({
2346
+ ...resolveSubOptions(options, "typescript"),
2347
+ exts,
2348
+ overrides: getOverrides(options, "typescript")
2349
+ }));
2350
+ }
2351
+ if (stylisticOptions) {
2352
+ configs.push(stylistic({
2353
+ ...stylisticOptions,
2354
+ overrides: getOverrides(options, "stylistic")
2355
+ }));
2356
+ }
2357
+ if (options.test ?? true) {
2358
+ configs.push(test({
2359
+ editor,
2360
+ overrides: getOverrides(options, "test")
2361
+ }));
2362
+ }
2363
+ if (enableReact || enableNextJS) {
2364
+ configs.push(react({
2365
+ overrides: getOverrides(options, "react"),
2366
+ typescript: !!enableTypeScript
2367
+ }));
2368
+ }
2369
+ if (enableNextJS) {
2370
+ configs.push(
2371
+ nextjs({
2372
+ ...resolveSubOptions(options, "nextjs"),
2373
+ overrides: getOverrides(options, "nextjs")
2374
+ })
2375
+ );
2376
+ }
2377
+ if (enableVue) {
2378
+ configs.push(
2379
+ vue({
2380
+ ...resolveSubOptions(options, "vue"),
2381
+ overrides: getOverrides(options, "vue"),
2382
+ stylistic: stylisticOptions,
2383
+ typescript: !!enableTypeScript
2384
+ })
2385
+ );
2386
+ }
2387
+ if (enableAstro) {
2388
+ configs.push(
2389
+ astro({
2390
+ ...resolveSubOptions(options, "astro"),
2391
+ overrides: getOverrides(options, "astro"),
2392
+ typescript: !!enableTypeScript
2393
+ })
2394
+ );
2395
+ }
2396
+ if (enableUnoCSS) {
2397
+ configs.push(unocss({
2398
+ ...resolveSubOptions(options, "unocss"),
2399
+ overrides: getOverrides(options, "unocss")
2400
+ }));
2401
+ }
2402
+ if (enableTailwindCSS) {
2403
+ configs.push(tailwindcss({
2404
+ ...resolveSubOptions(options, "tailwindcss"),
2405
+ overrides: getOverrides(options, "tailwindcss")
2406
+ }));
2407
+ }
2408
+ if (options.jsonc ?? true) {
2409
+ configs.push(
2410
+ jsonc({
2411
+ overrides: getOverrides(options, "jsonc"),
2412
+ stylistic: stylisticOptions
2413
+ }),
2414
+ sortPackageJson(),
2415
+ sortTsconfig()
2416
+ );
2417
+ }
2418
+ if (options.yaml ?? true) {
2419
+ configs.push(yaml({
2420
+ overrides: getOverrides(options, "yaml"),
2421
+ stylistic: stylisticOptions
2422
+ }));
2423
+ }
2424
+ if (options.toml ?? true) {
2425
+ configs.push(toml({
2426
+ overrides: getOverrides(options, "toml"),
2427
+ stylistic: stylisticOptions
2428
+ }));
2429
+ }
2430
+ if (options.markdown ?? true) {
2431
+ configs.push(
2432
+ markdown({
2433
+ exts,
2434
+ overrides: getOverrides(options, "markdown")
2435
+ })
2436
+ );
2437
+ }
2438
+ if (options.formatters) {
2439
+ configs.push(formatters(
2440
+ options.formatters,
2441
+ typeof stylisticOptions === "boolean" ? {} : stylisticOptions
2442
+ ));
2443
+ }
2444
+ const fusedConfig = FLAT_CONFIG_PROPS.reduce((acc, key) => {
2445
+ if (key in options) {
2446
+ acc[key] = options[key];
2447
+ }
2448
+ return acc;
2449
+ }, {});
2450
+ if (Object.keys(fusedConfig).length) {
2451
+ configs.push([fusedConfig]);
2452
+ }
2453
+ const merged = combine(
2454
+ ...configs,
2455
+ ...userConfigs
2456
+ );
2457
+ return merged;
2718
2458
  }
2719
- // Annotate the CommonJS export names for ESM import in node:
2720
- 0 && (module.exports = {
2459
+ export {
2460
+ GLOB_ASTRO,
2461
+ GLOB_CSS,
2462
+ GLOB_EXCLUDE,
2463
+ GLOB_HTML,
2464
+ GLOB_JS,
2465
+ GLOB_JSON,
2466
+ GLOB_JSON5,
2467
+ GLOB_JSONC,
2468
+ GLOB_JSX,
2469
+ GLOB_LESS,
2470
+ GLOB_MARKDOWN,
2471
+ GLOB_MARKDOWN_CODE,
2472
+ GLOB_MARKDOWN_IN_MARKDOWN,
2473
+ GLOB_NEXTJS_OG,
2474
+ GLOB_NEXTJS_ROUTES,
2475
+ GLOB_POSTCSS,
2476
+ GLOB_SCSS,
2477
+ GLOB_SRC,
2478
+ GLOB_SRC_EXT,
2479
+ GLOB_STYLE,
2480
+ GLOB_TESTS,
2481
+ GLOB_TOML,
2482
+ GLOB_TS,
2483
+ GLOB_TSX,
2484
+ GLOB_VUE,
2485
+ GLOB_YAML,
2721
2486
  astro,
2487
+ combine,
2722
2488
  comments,
2489
+ ensure,
2723
2490
  formatters,
2491
+ getOverrides,
2724
2492
  ignores,
2725
2493
  imports,
2494
+ interop,
2726
2495
  javascript,
2727
2496
  jsdoc,
2728
2497
  jsonc,
2498
+ luxass,
2729
2499
  markdown,
2730
2500
  nextjs,
2731
2501
  node,
2732
2502
  react,
2733
- solid,
2503
+ renameRules,
2504
+ resolveSubOptions,
2734
2505
  sortPackageJson,
2735
2506
  sortTsconfig,
2736
2507
  stylistic,
2737
2508
  tailwindcss,
2738
2509
  test,
2510
+ toArray,
2739
2511
  toml,
2740
2512
  typescript,
2741
2513
  unicorn,
2742
2514
  unocss,
2743
2515
  vue,
2744
2516
  yaml
2745
- });
2517
+ };