@luxass/eslint-config 4.2.5 → 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 (144) hide show
  1. package/README.md +35 -54
  2. package/dist/index.cjs +166 -479
  3. package/dist/index.d.cts +733 -12
  4. package/dist/index.d.ts +733 -12
  5. package/dist/{configs/index.cjs → index.js} +300 -542
  6. package/package.json +51 -86
  7. package/dist/chunk-4YBQZLPS.mjs +0 -68
  8. package/dist/chunk-4YT54JFZ.mjs +0 -48
  9. package/dist/chunk-5NK24IKQ.mjs +0 -26
  10. package/dist/chunk-6T7MXPCT.mjs +0 -17
  11. package/dist/chunk-7ODEIBF5.mjs +0 -144
  12. package/dist/chunk-AQRBQAKE.mjs +0 -48
  13. package/dist/chunk-DAJA5AV3.mjs +0 -29
  14. package/dist/chunk-DCOLHWHC.mjs +0 -269
  15. package/dist/chunk-DVQQVCGF.mjs +0 -45
  16. package/dist/chunk-EHWA727G.mjs +0 -69
  17. package/dist/chunk-FNOIGW47.mjs +0 -104
  18. package/dist/chunk-KOXCJL3C.mjs +0 -109
  19. package/dist/chunk-MMSZW2UW.mjs +0 -92
  20. package/dist/chunk-MT5P5EKH.mjs +0 -207
  21. package/dist/chunk-O2BXTQHK.mjs +0 -117
  22. package/dist/chunk-QDSV5ONX.mjs +0 -93
  23. package/dist/chunk-QMGT2Z63.mjs +0 -57
  24. package/dist/chunk-RVSUTDCE.mjs +0 -57
  25. package/dist/chunk-SPD4DGYN.mjs +0 -274
  26. package/dist/chunk-UITQW3RA.mjs +0 -293
  27. package/dist/chunk-V57HXOSW.mjs +0 -81
  28. package/dist/chunk-WDSV2EFG.mjs +0 -7
  29. package/dist/chunk-WOBGA3K2.mjs +0 -63
  30. package/dist/chunk-WSQOWO67.mjs +0 -16
  31. package/dist/chunk-XBASVDU6.mjs +0 -215
  32. package/dist/chunk-XPKGXA67.mjs +0 -183
  33. package/dist/chunk-YGZJUKJC.mjs +0 -0
  34. package/dist/chunk-YO3IYQ2L.mjs +0 -220
  35. package/dist/configs/astro.cjs +0 -179
  36. package/dist/configs/astro.d.cts +0 -11
  37. package/dist/configs/astro.d.ts +0 -11
  38. package/dist/configs/astro.mjs +0 -8
  39. package/dist/configs/comments.cjs +0 -63
  40. package/dist/configs/comments.d.cts +0 -15
  41. package/dist/configs/comments.d.ts +0 -15
  42. package/dist/configs/comments.mjs +0 -6
  43. package/dist/configs/formatters.cjs +0 -274
  44. package/dist/configs/formatters.d.cts +0 -11
  45. package/dist/configs/formatters.d.ts +0 -11
  46. package/dist/configs/formatters.mjs +0 -9
  47. package/dist/configs/ignores.cjs +0 -96
  48. package/dist/configs/ignores.d.cts +0 -15
  49. package/dist/configs/ignores.d.ts +0 -15
  50. package/dist/configs/ignores.mjs +0 -7
  51. package/dist/configs/imports.cjs +0 -104
  52. package/dist/configs/imports.d.cts +0 -23
  53. package/dist/configs/imports.d.ts +0 -23
  54. package/dist/configs/imports.mjs +0 -7
  55. package/dist/configs/index.d.cts +0 -20
  56. package/dist/configs/index.d.ts +0 -20
  57. package/dist/configs/index.mjs +0 -104
  58. package/dist/configs/javascript.cjs +0 -324
  59. package/dist/configs/javascript.d.cts +0 -11
  60. package/dist/configs/javascript.d.ts +0 -11
  61. package/dist/configs/javascript.mjs +0 -7
  62. package/dist/configs/jsdoc.cjs +0 -85
  63. package/dist/configs/jsdoc.d.cts +0 -27
  64. package/dist/configs/jsdoc.d.ts +0 -27
  65. package/dist/configs/jsdoc.mjs +0 -7
  66. package/dist/configs/jsonc.cjs +0 -155
  67. package/dist/configs/jsonc.d.cts +0 -11
  68. package/dist/configs/jsonc.d.ts +0 -11
  69. package/dist/configs/jsonc.mjs +0 -8
  70. package/dist/configs/markdown.cjs +0 -164
  71. package/dist/configs/markdown.d.cts +0 -35
  72. package/dist/configs/markdown.d.ts +0 -35
  73. package/dist/configs/markdown.mjs +0 -8
  74. package/dist/configs/nextjs.cjs +0 -180
  75. package/dist/configs/nextjs.d.cts +0 -11
  76. package/dist/configs/nextjs.d.ts +0 -11
  77. package/dist/configs/nextjs.mjs +0 -8
  78. package/dist/configs/node.cjs +0 -60
  79. package/dist/configs/node.d.cts +0 -15
  80. package/dist/configs/node.d.ts +0 -15
  81. package/dist/configs/node.mjs +0 -6
  82. package/dist/configs/perfectionist.cjs +0 -51
  83. package/dist/configs/perfectionist.d.cts +0 -20
  84. package/dist/configs/perfectionist.d.ts +0 -20
  85. package/dist/configs/perfectionist.mjs +0 -6
  86. package/dist/configs/react.cjs +0 -379
  87. package/dist/configs/react.d.cts +0 -11
  88. package/dist/configs/react.d.ts +0 -11
  89. package/dist/configs/react.mjs +0 -8
  90. package/dist/configs/solid.cjs +0 -360
  91. package/dist/configs/solid.d.cts +0 -11
  92. package/dist/configs/solid.d.ts +0 -11
  93. package/dist/configs/solid.mjs +0 -8
  94. package/dist/configs/sort.cjs +0 -240
  95. package/dist/configs/sort.d.cts +0 -26
  96. package/dist/configs/sort.d.ts +0 -26
  97. package/dist/configs/sort.mjs +0 -8
  98. package/dist/configs/stylistic.cjs +0 -98
  99. package/dist/configs/stylistic.d.cts +0 -11
  100. package/dist/configs/stylistic.d.ts +0 -11
  101. package/dist/configs/stylistic.mjs +0 -9
  102. package/dist/configs/tailwindcss.cjs +0 -148
  103. package/dist/configs/tailwindcss.d.cts +0 -11
  104. package/dist/configs/tailwindcss.d.ts +0 -11
  105. package/dist/configs/tailwindcss.mjs +0 -8
  106. package/dist/configs/test.cjs +0 -206
  107. package/dist/configs/test.d.cts +0 -11
  108. package/dist/configs/test.d.ts +0 -11
  109. package/dist/configs/test.mjs +0 -9
  110. package/dist/configs/toml.cjs +0 -131
  111. package/dist/configs/toml.d.cts +0 -11
  112. package/dist/configs/toml.d.ts +0 -11
  113. package/dist/configs/toml.mjs +0 -8
  114. package/dist/configs/typescript.cjs +0 -291
  115. package/dist/configs/typescript.d.cts +0 -11
  116. package/dist/configs/typescript.d.ts +0 -11
  117. package/dist/configs/typescript.mjs +0 -8
  118. package/dist/configs/unicorn.cjs +0 -91
  119. package/dist/configs/unicorn.d.cts +0 -15
  120. package/dist/configs/unicorn.d.ts +0 -15
  121. package/dist/configs/unicorn.mjs +0 -6
  122. package/dist/configs/unocss.cjs +0 -133
  123. package/dist/configs/unocss.d.cts +0 -11
  124. package/dist/configs/unocss.d.ts +0 -11
  125. package/dist/configs/unocss.mjs +0 -8
  126. package/dist/configs/vue.cjs +0 -293
  127. package/dist/configs/vue.d.cts +0 -11
  128. package/dist/configs/vue.d.ts +0 -11
  129. package/dist/configs/vue.mjs +0 -8
  130. package/dist/configs/yaml.cjs +0 -143
  131. package/dist/configs/yaml.d.cts +0 -11
  132. package/dist/configs/yaml.d.ts +0 -11
  133. package/dist/configs/yaml.mjs +0 -8
  134. package/dist/custom-rules/utils.cjs +0 -31
  135. package/dist/custom-rules/utils.d.cts +0 -6
  136. package/dist/custom-rules/utils.d.ts +0 -6
  137. package/dist/custom-rules/utils.mjs +0 -6
  138. package/dist/globs.cjs +0 -158
  139. package/dist/globs.d.cts +0 -28
  140. package/dist/globs.d.ts +0 -28
  141. package/dist/globs.mjs +0 -56
  142. package/dist/index.mjs +0 -284
  143. package/dist/types-HqEzZfQU.d.cts +0 -668
  144. package/dist/types-HqEzZfQU.d.ts +0 -668
package/dist/index.cjs CHANGED
@@ -30,8 +30,63 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
- default: () => src_default,
34
- luxass: () => luxass
33
+ GLOB_ASTRO: () => GLOB_ASTRO,
34
+ GLOB_CSS: () => GLOB_CSS,
35
+ GLOB_EXCLUDE: () => GLOB_EXCLUDE,
36
+ GLOB_HTML: () => GLOB_HTML,
37
+ GLOB_JS: () => GLOB_JS,
38
+ GLOB_JSON: () => GLOB_JSON,
39
+ GLOB_JSON5: () => GLOB_JSON5,
40
+ GLOB_JSONC: () => GLOB_JSONC,
41
+ GLOB_JSX: () => GLOB_JSX,
42
+ GLOB_LESS: () => GLOB_LESS,
43
+ GLOB_MARKDOWN: () => GLOB_MARKDOWN,
44
+ GLOB_MARKDOWN_CODE: () => GLOB_MARKDOWN_CODE,
45
+ GLOB_MARKDOWN_IN_MARKDOWN: () => GLOB_MARKDOWN_IN_MARKDOWN,
46
+ GLOB_NEXTJS_OG: () => GLOB_NEXTJS_OG,
47
+ GLOB_NEXTJS_ROUTES: () => GLOB_NEXTJS_ROUTES,
48
+ GLOB_POSTCSS: () => GLOB_POSTCSS,
49
+ GLOB_SCSS: () => GLOB_SCSS,
50
+ GLOB_SRC: () => GLOB_SRC,
51
+ GLOB_SRC_EXT: () => GLOB_SRC_EXT,
52
+ GLOB_STYLE: () => GLOB_STYLE,
53
+ GLOB_TESTS: () => GLOB_TESTS,
54
+ GLOB_TOML: () => GLOB_TOML,
55
+ GLOB_TS: () => GLOB_TS,
56
+ GLOB_TSX: () => GLOB_TSX,
57
+ GLOB_VUE: () => GLOB_VUE,
58
+ GLOB_YAML: () => GLOB_YAML,
59
+ astro: () => astro,
60
+ combine: () => combine,
61
+ comments: () => comments,
62
+ ensure: () => ensure,
63
+ formatters: () => formatters,
64
+ getOverrides: () => getOverrides,
65
+ ignores: () => ignores,
66
+ imports: () => imports,
67
+ interop: () => interop,
68
+ javascript: () => javascript,
69
+ jsdoc: () => jsdoc,
70
+ jsonc: () => jsonc,
71
+ luxass: () => luxass,
72
+ markdown: () => markdown,
73
+ nextjs: () => nextjs,
74
+ node: () => node,
75
+ react: () => react,
76
+ renameRules: () => renameRules,
77
+ resolveSubOptions: () => resolveSubOptions,
78
+ sortPackageJson: () => sortPackageJson,
79
+ sortTsconfig: () => sortTsconfig,
80
+ stylistic: () => stylistic,
81
+ tailwindcss: () => tailwindcss,
82
+ test: () => test,
83
+ toArray: () => toArray,
84
+ toml: () => toml,
85
+ typescript: () => typescript,
86
+ unicorn: () => unicorn,
87
+ unocss: () => unocss,
88
+ vue: () => vue,
89
+ yaml: () => yaml
35
90
  });
36
91
  module.exports = __toCommonJS(src_exports);
37
92
 
@@ -123,9 +178,11 @@ function unicorn() {
123
178
  // src/globs.ts
124
179
  var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
125
180
  var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
181
+ var GLOB_JS = "**/*.?([cm])js";
126
182
  var GLOB_JSX = "**/*.?([cm])jsx";
127
183
  var GLOB_TS = "**/*.?([cm])ts";
128
184
  var GLOB_TSX = "**/*.?([cm])tsx";
185
+ var GLOB_STYLE = "**/*.{c,le,sc}ss";
129
186
  var GLOB_CSS = "**/*.css";
130
187
  var GLOB_POSTCSS = "**/*.{p,post}css";
131
188
  var GLOB_LESS = "**/*.less";
@@ -138,6 +195,7 @@ var GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
138
195
  var GLOB_VUE = "**/*.vue";
139
196
  var GLOB_YAML = "**/*.y?(a)ml";
140
197
  var GLOB_TOML = "**/*.toml";
198
+ var GLOB_HTML = "**/*.htm?(l)";
141
199
  var GLOB_ASTRO = "**/*.astro";
142
200
  var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
143
201
  var GLOB_TESTS = [
@@ -441,20 +499,6 @@ function sortTsconfig() {
441
499
  ];
442
500
  }
443
501
 
444
- // src/configs/perfectionist.ts
445
- var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
446
- async function perfectionist() {
447
- return [
448
- {
449
- name: "luxass:perfectionist",
450
- plugins: {
451
- perfectionist: import_eslint_plugin_perfectionist.default
452
- },
453
- rules: {}
454
- }
455
- ];
456
- }
457
-
458
502
  // src/configs/imports.ts
459
503
  var import_eslint_plugin_i = __toESM(require("eslint-plugin-i"), 1);
460
504
  var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
@@ -816,7 +860,7 @@ function getOverrides(options, key) {
816
860
  };
817
861
  }
818
862
 
819
- // src/configs/jsdoc.ts
863
+ // src/configs/docs/jsdoc.ts
820
864
  async function jsdoc(options = {}) {
821
865
  const {
822
866
  overrides,
@@ -854,7 +898,7 @@ async function jsdoc(options = {}) {
854
898
  ];
855
899
  }
856
900
 
857
- // src/configs/jsonc.ts
901
+ // src/configs/data/json.ts
858
902
  async function jsonc(options = {}) {
859
903
  const {
860
904
  files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
@@ -935,7 +979,7 @@ async function jsonc(options = {}) {
935
979
  ];
936
980
  }
937
981
 
938
- // src/configs/markdown.ts
982
+ // src/configs/docs/markdown.ts
939
983
  var parserPlain = __toESM(require("eslint-parser-plain"), 1);
940
984
  var import_eslint_merge_processors = require("eslint-merge-processors");
941
985
  async function markdown(options = {}) {
@@ -1033,7 +1077,7 @@ var StylisticConfigDefaults = {
1033
1077
  indent: 2,
1034
1078
  jsx: true,
1035
1079
  quotes: "double",
1036
- semi: false
1080
+ semi: true
1037
1081
  };
1038
1082
  async function stylistic(options = {}) {
1039
1083
  const {
@@ -1281,28 +1325,22 @@ async function typescript(options = {}) {
1281
1325
  ];
1282
1326
  }
1283
1327
 
1284
- // src/configs/vue.ts
1328
+ // src/configs/frameworks/vue.ts
1285
1329
  var import_eslint_merge_processors2 = require("eslint-merge-processors");
1286
1330
  async function vue(options = {}) {
1287
1331
  const {
1288
- a11y = false,
1289
1332
  files = [GLOB_VUE],
1290
1333
  overrides = {},
1291
1334
  stylistic: stylistic2 = true
1292
1335
  } = options;
1293
- if (a11y) {
1294
- await ensure(["eslint-plugin-vuejs-accessibility"]);
1295
- }
1296
1336
  const [
1297
1337
  pluginVue,
1298
1338
  parserVue,
1299
- processorVueBlocks,
1300
- pluginA11y
1339
+ processorVueBlocks
1301
1340
  ] = await Promise.all([
1302
1341
  interop(import("eslint-plugin-vue")),
1303
1342
  interop(import("vue-eslint-parser")),
1304
- interop(import("eslint-processor-vue-blocks")),
1305
- ...a11y ? [interop(import("eslint-plugin-vuejs-accessibility"))] : []
1343
+ interop(import("eslint-processor-vue-blocks"))
1306
1344
  ]);
1307
1345
  const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
1308
1346
  const {
@@ -1312,8 +1350,7 @@ async function vue(options = {}) {
1312
1350
  {
1313
1351
  name: "luxass:vue:setup",
1314
1352
  plugins: {
1315
- vue: pluginVue,
1316
- ...a11y ? { "vue-a11y": pluginA11y } : {}
1353
+ vue: pluginVue
1317
1354
  }
1318
1355
  },
1319
1356
  {
@@ -1449,35 +1486,13 @@ async function vue(options = {}) {
1449
1486
  "vue/space-in-parens": ["error", "never"],
1450
1487
  "vue/template-curly-spacing": "error"
1451
1488
  } : {},
1452
- ...a11y ? {
1453
- "vue-a11y/alt-text": "error",
1454
- "vue-a11y/anchor-has-content": "error",
1455
- "vue-a11y/aria-props": "error",
1456
- "vue-a11y/aria-role": "error",
1457
- "vue-a11y/aria-unsupported-elements": "error",
1458
- "vue-a11y/click-events-have-key-events": "error",
1459
- "vue-a11y/form-control-has-label": "error",
1460
- "vue-a11y/heading-has-content": "error",
1461
- "vue-a11y/iframe-has-title": "error",
1462
- "vue-a11y/interactive-supports-focus": "error",
1463
- "vue-a11y/label-has-for": "error",
1464
- "vue-a11y/media-has-caption": "error",
1465
- "vue-a11y/mouse-events-have-key-events": "error",
1466
- "vue-a11y/no-access-key": "error",
1467
- "vue-a11y/no-autofocus": "error",
1468
- "vue-a11y/no-distracting-elements": "error",
1469
- "vue-a11y/no-redundant-roles": "error",
1470
- "vue-a11y/no-static-element-interactions": "error",
1471
- "vue-a11y/role-has-required-aria-props": "error",
1472
- "vue-a11y/tabindex-no-positive": "error"
1473
- } : {},
1474
1489
  ...overrides
1475
1490
  }
1476
1491
  }
1477
1492
  ];
1478
1493
  }
1479
1494
 
1480
- // src/configs/yaml.ts
1495
+ // src/configs/data/yaml.ts
1481
1496
  async function yaml(options = {}) {
1482
1497
  const {
1483
1498
  files = [GLOB_YAML],
@@ -1548,98 +1563,6 @@ async function yaml(options = {}) {
1548
1563
  ];
1549
1564
  }
1550
1565
 
1551
- // src/custom-rules/utils.ts
1552
- var import_utils8 = require("@typescript-eslint/utils");
1553
- var createRule = import_utils8.ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
1554
-
1555
- // src/custom-rules/no-only-tests/index.ts
1556
- var DEFAULT_OPTIONS = {
1557
- blocks: ["describe", "it", "test"],
1558
- focus: ["only"]
1559
- };
1560
- function getPath(node2, path = []) {
1561
- if (node2) {
1562
- const nodeName = node2.name || node2.property && node2.property.name;
1563
- if (node2.object) {
1564
- return getPath(node2.object, [
1565
- nodeName,
1566
- ...path
1567
- ]);
1568
- }
1569
- if (node2.callee)
1570
- return getPath(node2.callee, path);
1571
- return [nodeName, ...path];
1572
- }
1573
- return path;
1574
- }
1575
- var noOnlyTests = createRule({
1576
- name: "no-only-tests",
1577
- create: (context, [options]) => {
1578
- const {
1579
- blocks = DEFAULT_OPTIONS.blocks,
1580
- focus = DEFAULT_OPTIONS.focus
1581
- } = options;
1582
- const handler = {
1583
- Identifier(node2) {
1584
- const parent = node2.parent?.object;
1585
- if (!parent)
1586
- return;
1587
- if (!focus.includes(node2.name))
1588
- return;
1589
- const callPath = getPath(node2.parent).join(".");
1590
- const found = blocks.find((block) => {
1591
- if (block.endsWith("*"))
1592
- return callPath.startsWith(block.replace(/\*$/, ""));
1593
- return callPath.startsWith(`${block}.`);
1594
- });
1595
- if (found) {
1596
- context.report({
1597
- data: { block: callPath.split(".")[0], focus: node2.name },
1598
- messageId: "notPermitted",
1599
- node: node2
1600
- });
1601
- }
1602
- }
1603
- };
1604
- return handler;
1605
- },
1606
- defaultOptions: [{
1607
- blocks: ["describe", "it", "test"],
1608
- focus: ["only"]
1609
- }],
1610
- meta: {
1611
- docs: {
1612
- description: "disallow .only blocks in tests",
1613
- recommended: "recommended"
1614
- },
1615
- messages: {
1616
- notPermitted: "{{ block }}.{{ focus }} not permitted"
1617
- },
1618
- schema: [{
1619
- additionalProperties: false,
1620
- properties: {
1621
- blocks: {
1622
- items: {
1623
- type: "string"
1624
- },
1625
- type: "array",
1626
- uniqueItems: true
1627
- },
1628
- focus: {
1629
- items: {
1630
- type: "string"
1631
- },
1632
- type: "array",
1633
- uniqueItems: true
1634
- }
1635
- },
1636
- type: "object"
1637
- }],
1638
- type: "layout"
1639
- }
1640
- // i need to have this here, otherwise typechecking fails.
1641
- });
1642
-
1643
1566
  // src/configs/test.ts
1644
1567
  async function test(options = {}) {
1645
1568
  const {
@@ -1659,8 +1582,7 @@ async function test(options = {}) {
1659
1582
  test: {
1660
1583
  ...pluginVitest,
1661
1584
  rules: {
1662
- ...pluginVitest.rules,
1663
- "no-only-tests": noOnlyTests
1585
+ ...pluginVitest.rules
1664
1586
  }
1665
1587
  }
1666
1588
  }
@@ -1674,7 +1596,7 @@ async function test(options = {}) {
1674
1596
  { fn: "it", withinDescribe: "it" }
1675
1597
  ],
1676
1598
  "test/no-identical-title": "error",
1677
- "test/no-only-tests": editor ? "off" : "error",
1599
+ "test/no-focused-tests": editor ? "off" : "error",
1678
1600
  "test/prefer-hooks-in-order": "error",
1679
1601
  "test/prefer-lowercase-title": "error",
1680
1602
  ...overrides
@@ -1683,7 +1605,7 @@ async function test(options = {}) {
1683
1605
  ];
1684
1606
  }
1685
1607
 
1686
- // src/configs/unocss.ts
1608
+ // src/configs/css/unocss.ts
1687
1609
  async function unocss(options = {}) {
1688
1610
  const {
1689
1611
  attributify = true,
@@ -1720,7 +1642,7 @@ async function unocss(options = {}) {
1720
1642
  ];
1721
1643
  }
1722
1644
 
1723
- // src/configs/nextjs.ts
1645
+ // src/configs/frameworks/nextjs.ts
1724
1646
  async function nextjs(options = {}) {
1725
1647
  const {
1726
1648
  files = [GLOB_SRC],
@@ -1799,7 +1721,7 @@ async function nextjs(options = {}) {
1799
1721
  ];
1800
1722
  }
1801
1723
 
1802
- // src/configs/react.ts
1724
+ // src/configs/frameworks/react.ts
1803
1725
  var import_local_pkg2 = require("local-pkg");
1804
1726
  async function react(options = {}) {
1805
1727
  const {
@@ -1825,9 +1747,7 @@ async function react(options = {}) {
1825
1747
  interop(import("eslint-plugin-react-refresh")),
1826
1748
  ...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
1827
1749
  ]);
1828
- const isAllowConstantExport = ["vite"].some(
1829
- (i) => (0, import_local_pkg2.isPackageExists)(i)
1830
- );
1750
+ const isAllowConstantExport = (0, import_local_pkg2.isPackageExists)("vite");
1831
1751
  return [
1832
1752
  {
1833
1753
  name: "luxass:react:setup",
@@ -2080,21 +2000,24 @@ async function react(options = {}) {
2080
2000
  ];
2081
2001
  }
2082
2002
 
2083
- // src/configs/astro.ts
2003
+ // src/configs/frameworks/astro.ts
2084
2004
  async function astro(options) {
2085
2005
  const {
2086
2006
  a11y = false,
2087
2007
  files = [GLOB_ASTRO],
2088
2008
  overrides = {},
2089
- typescript: typescript2 = true
2009
+ typescript: typescript2 = true,
2010
+ stylistic: stylistic2 = true
2090
2011
  } = options;
2091
2012
  const [
2092
2013
  pluginAstro,
2093
2014
  parserAstro,
2015
+ parserTs,
2094
2016
  pluginA11y
2095
2017
  ] = await Promise.all([
2096
2018
  interop(import("eslint-plugin-astro")),
2097
2019
  interop(import("astro-eslint-parser")),
2020
+ interop(import("@typescript-eslint/parser")),
2098
2021
  ...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
2099
2022
  ]);
2100
2023
  return [
@@ -2109,15 +2032,10 @@ async function astro(options) {
2109
2032
  name: "luxass:astro:rules",
2110
2033
  files,
2111
2034
  languageOptions: {
2112
- globals: {
2113
- "astro/astro": true,
2114
- "es2020": true,
2115
- "node": true
2116
- },
2117
2035
  parser: parserAstro,
2118
2036
  parserOptions: {
2119
2037
  extraFileExtensions: [".astro"],
2120
- parser: typescript2 ? await interop(import("@typescript-eslint/parser")) : null,
2038
+ parser: typescript2 ? parserTs : null,
2121
2039
  sourceType: "module"
2122
2040
  }
2123
2041
  },
@@ -2125,28 +2043,16 @@ async function astro(options) {
2125
2043
  // Disallow conflicting set directives and child contents
2126
2044
  // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-conflict-set-directives/
2127
2045
  "astro/no-conflict-set-directives": "error",
2128
- // Disallow using deprecated Astro.canonicalURL
2129
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-canonicalurl/
2130
- "astro/no-deprecated-astro-canonicalurl": "error",
2131
- // Disallow using deprecated Astro.fetchContent()
2132
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-fetchcontent/
2133
- "astro/no-deprecated-astro-fetchcontent": "error",
2134
- // Disallow using deprecated Astro.resolve()
2135
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-resolve/
2136
- "astro/no-deprecated-astro-resolve": "error",
2137
- // Disallow using deprecated getEntryBySlug()
2138
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-getentrybyslug/
2139
- "astro/no-deprecated-getentrybyslug": "error",
2140
- // Disallow unused define:vars={...} in style tag
2141
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-define-vars-in-style/
2142
- "astro/no-unused-define-vars-in-style": "error",
2143
- // Disallow warnings when compiling
2144
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/
2145
- "astro/valid-compile": "error",
2146
- "style/jsx-closing-tag-location": "off",
2147
- "style/jsx-indent": "off",
2148
- "style/jsx-one-expression-per-line": "off",
2149
- "style/multiline-ternary": ["error", "never"],
2046
+ // Disallow use of `set:html` directive
2047
+ // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-html-directive/
2048
+ "astro/no-set-html-directive": "off",
2049
+ ...stylistic2 ? {
2050
+ "style/indent": "off",
2051
+ "style/jsx-indent": "off",
2052
+ "style/jsx-closing-tag-location": "off",
2053
+ "style/jsx-one-expression-per-line": "off",
2054
+ "style/no-multiple-empty-lines": "off"
2055
+ } : {},
2150
2056
  ...overrides
2151
2057
  }
2152
2058
  },
@@ -2177,7 +2083,7 @@ async function astro(options) {
2177
2083
  browser: true,
2178
2084
  es2020: true
2179
2085
  },
2180
- parser: typescript2 ? await interop(import("@typescript-eslint/parser")) : null,
2086
+ parser: typescript2 ? parserTs : null,
2181
2087
  parserOptions: {
2182
2088
  project: null,
2183
2089
  sourceType: "module"
@@ -2187,7 +2093,7 @@ async function astro(options) {
2187
2093
  ];
2188
2094
  }
2189
2095
 
2190
- // src/configs/tailwindcss.ts
2096
+ // src/configs/css/tailwindcss.ts
2191
2097
  async function tailwindcss(options = {}) {
2192
2098
  const {
2193
2099
  files = [GLOB_SRC],
@@ -2404,7 +2310,7 @@ async function formatters(options = {}, stylistic2 = {}) {
2404
2310
  return configs;
2405
2311
  }
2406
2312
 
2407
- // src/configs/toml.ts
2313
+ // src/configs/data/toml.ts
2408
2314
  async function toml(options = {}) {
2409
2315
  const {
2410
2316
  files = [GLOB_TOML],
@@ -2463,271 +2369,9 @@ async function toml(options = {}) {
2463
2369
  ];
2464
2370
  }
2465
2371
 
2466
- // src/configs/solid.ts
2467
- async function solid(options = {}) {
2468
- const {
2469
- a11y = false,
2470
- files = [GLOB_JSX, GLOB_TSX],
2471
- overrides = {},
2472
- typescript: typescript2 = true
2473
- } = options;
2474
- await ensure([
2475
- "eslint-plugin-solid"
2476
- ]);
2477
- const [
2478
- pluginSolid
2479
- ] = await Promise.all([
2480
- interop(import("eslint-plugin-solid"))
2481
- ]);
2482
- return [
2483
- {
2484
- name: "luxass:solid:setup",
2485
- plugins: {
2486
- solid: pluginSolid
2487
- }
2488
- },
2489
- {
2490
- name: "luxass:solid:rules",
2491
- files,
2492
- languageOptions: {
2493
- parserOptions: {
2494
- ecmaFeatures: {
2495
- jsx: true
2496
- }
2497
- },
2498
- sourceType: "module"
2499
- },
2500
- rules: {
2501
- ...a11y ? {
2502
- // recommended rules for jsx-a11y
2503
- "jsx-a11y/alt-text": "error",
2504
- "jsx-a11y/anchor-ambiguous-text": "off",
2505
- "jsx-a11y/anchor-has-content": "error",
2506
- "jsx-a11y/anchor-is-valid": "error",
2507
- "jsx-a11y/aria-activedescendant-has-tabindex": "error",
2508
- "jsx-a11y/aria-props": "error",
2509
- "jsx-a11y/aria-proptypes": "error",
2510
- "jsx-a11y/aria-role": "error",
2511
- "jsx-a11y/aria-unsupported-elements": "error",
2512
- "jsx-a11y/autocomplete-valid": "error",
2513
- "jsx-a11y/click-events-have-key-events": "error",
2514
- "jsx-a11y/control-has-associated-label": [
2515
- "off",
2516
- {
2517
- ignoreElements: [
2518
- "audio",
2519
- "canvas",
2520
- "embed",
2521
- "input",
2522
- "textarea",
2523
- "tr",
2524
- "video"
2525
- ],
2526
- ignoreRoles: [
2527
- "grid",
2528
- "listbox",
2529
- "menu",
2530
- "menubar",
2531
- "radiogroup",
2532
- "row",
2533
- "tablist",
2534
- "toolbar",
2535
- "tree",
2536
- "treegrid"
2537
- ],
2538
- includeRoles: [
2539
- "alert",
2540
- "dialog"
2541
- ]
2542
- }
2543
- ],
2544
- "jsx-a11y/heading-has-content": "error",
2545
- "jsx-a11y/html-has-lang": "error",
2546
- "jsx-a11y/iframe-has-title": "error",
2547
- "jsx-a11y/img-redundant-alt": "error",
2548
- "jsx-a11y/interactive-supports-focus": [
2549
- "error",
2550
- {
2551
- tabbable: [
2552
- "button",
2553
- "checkbox",
2554
- "link",
2555
- "searchbox",
2556
- "spinbutton",
2557
- "switch",
2558
- "textbox"
2559
- ]
2560
- }
2561
- ],
2562
- "jsx-a11y/label-has-associated-control": "error",
2563
- "jsx-a11y/label-has-for": "off",
2564
- "jsx-a11y/media-has-caption": "error",
2565
- "jsx-a11y/mouse-events-have-key-events": "error",
2566
- "jsx-a11y/no-access-key": "error",
2567
- "jsx-a11y/no-autofocus": "error",
2568
- "jsx-a11y/no-distracting-elements": "error",
2569
- "jsx-a11y/no-interactive-element-to-noninteractive-role": [
2570
- "error",
2571
- {
2572
- canvas: [
2573
- "img"
2574
- ],
2575
- tr: [
2576
- "none",
2577
- "presentation"
2578
- ]
2579
- }
2580
- ],
2581
- "jsx-a11y/no-noninteractive-element-interactions": [
2582
- "error",
2583
- {
2584
- alert: [
2585
- "onKeyUp",
2586
- "onKeyDown",
2587
- "onKeyPress"
2588
- ],
2589
- body: [
2590
- "onError",
2591
- "onLoad"
2592
- ],
2593
- dialog: [
2594
- "onKeyUp",
2595
- "onKeyDown",
2596
- "onKeyPress"
2597
- ],
2598
- handlers: [
2599
- "onClick",
2600
- "onError",
2601
- "onLoad",
2602
- "onMouseDown",
2603
- "onMouseUp",
2604
- "onKeyPress",
2605
- "onKeyDown",
2606
- "onKeyUp"
2607
- ],
2608
- iframe: [
2609
- "onError",
2610
- "onLoad"
2611
- ],
2612
- img: [
2613
- "onError",
2614
- "onLoad"
2615
- ]
2616
- }
2617
- ],
2618
- "jsx-a11y/no-noninteractive-element-to-interactive-role": [
2619
- "error",
2620
- {
2621
- fieldset: [
2622
- "radiogroup",
2623
- "presentation"
2624
- ],
2625
- li: [
2626
- "menuitem",
2627
- "option",
2628
- "row",
2629
- "tab",
2630
- "treeitem"
2631
- ],
2632
- ol: [
2633
- "listbox",
2634
- "menu",
2635
- "menubar",
2636
- "radiogroup",
2637
- "tablist",
2638
- "tree",
2639
- "treegrid"
2640
- ],
2641
- table: [
2642
- "grid"
2643
- ],
2644
- td: [
2645
- "gridcell"
2646
- ],
2647
- ul: [
2648
- "listbox",
2649
- "menu",
2650
- "menubar",
2651
- "radiogroup",
2652
- "tablist",
2653
- "tree",
2654
- "treegrid"
2655
- ]
2656
- }
2657
- ],
2658
- "jsx-a11y/no-noninteractive-tabindex": [
2659
- "error",
2660
- {
2661
- allowExpressionValues: true,
2662
- roles: [
2663
- "tabpanel"
2664
- ],
2665
- tags: []
2666
- }
2667
- ],
2668
- "jsx-a11y/no-redundant-roles": "error",
2669
- "jsx-a11y/no-static-element-interactions": [
2670
- "error",
2671
- {
2672
- allowExpressionValues: true,
2673
- handlers: [
2674
- "onClick",
2675
- "onMouseDown",
2676
- "onMouseUp",
2677
- "onKeyPress",
2678
- "onKeyDown",
2679
- "onKeyUp"
2680
- ]
2681
- }
2682
- ],
2683
- "jsx-a11y/role-has-required-aria-props": "error",
2684
- "jsx-a11y/role-supports-aria-props": "error",
2685
- "jsx-a11y/scope": "error",
2686
- "jsx-a11y/tabindex-no-positive": "error"
2687
- } : {},
2688
- // solid recommended rules
2689
- // reactivity
2690
- "solid/components-return-once": 1,
2691
- "solid/event-handlers": 1,
2692
- // these rules are mostly style suggestions
2693
- "solid/imports": 1,
2694
- // identifier usage is important
2695
- "solid/jsx-no-duplicate-props": 2,
2696
- "solid/jsx-no-script-url": 2,
2697
- "solid/jsx-no-undef": 2,
2698
- "solid/jsx-uses-vars": 2,
2699
- "solid/no-array-handlers": 0,
2700
- "solid/no-destructure": 2,
2701
- // security problems
2702
- "solid/no-innerhtml": 2,
2703
- // only necessary for resource-constrained environments
2704
- "solid/no-proxy-apis": 0,
2705
- "solid/no-react-deps": 1,
2706
- "solid/no-react-specific-props": 1,
2707
- "solid/no-unknown-namespaces": 2,
2708
- // deprecated
2709
- "solid/prefer-classlist": 0,
2710
- "solid/prefer-for": 2,
2711
- // handled by Solid compiler, opt-in style suggestion
2712
- "solid/prefer-show": 0,
2713
- "solid/reactivity": 1,
2714
- "solid/self-closing-comp": 1,
2715
- "solid/style-prop": 1,
2716
- ...typescript2 ? {
2717
- "solid/jsx-no-undef": [2, { typescriptEnabled: true }],
2718
- // namespaces taken care of by TS
2719
- "solid/no-unknown-namespaces": 0
2720
- } : {},
2721
- // overrides
2722
- ...overrides
2723
- }
2724
- }
2725
- ];
2726
- }
2727
-
2728
- // src/constants.ts
2729
- var VUE_PACKAGES = ["vue", "nuxt", "vitepress", "@slidev/cli"];
2372
+ // src/factory.ts
2730
2373
  var FLAT_CONFIG_PROPS = [
2374
+ "name",
2731
2375
  "files",
2732
2376
  "ignores",
2733
2377
  "languageOptions",
@@ -2737,21 +2381,24 @@ var FLAT_CONFIG_PROPS = [
2737
2381
  "rules",
2738
2382
  "settings"
2739
2383
  ];
2740
-
2741
- // src/factory.ts
2384
+ var VuePackages = [
2385
+ "vue",
2386
+ "nuxt",
2387
+ "vitepress",
2388
+ "@slidev/cli"
2389
+ ];
2742
2390
  async function luxass(options = {}, ...userConfigs) {
2743
2391
  const {
2744
- astro: enableAstro = (0, import_local_pkg3.isPackageExists)("astro"),
2392
+ astro: enableAstro = false,
2745
2393
  editor = !!((import_node_process3.default.env.VSCODE_PID || import_node_process3.default.env.JETBRAINS_IDE || import_node_process3.default.env.VIM) && !import_node_process3.default.env.CI),
2746
2394
  exts = [],
2747
2395
  gitignore: enableGitignore = true,
2748
2396
  nextjs: enableNextJS = false,
2749
2397
  react: enableReact = false,
2750
- solid: enableSolid = false,
2751
2398
  tailwindcss: enableTailwindCSS = false,
2752
2399
  typescript: enableTypeScript = (0, import_local_pkg3.isPackageExists)("typescript"),
2753
2400
  unocss: enableUnoCSS = false,
2754
- vue: enableVue = VUE_PACKAGES.some((i) => (0, import_local_pkg3.isPackageExists)(i))
2401
+ vue: enableVue = VuePackages.some((i) => (0, import_local_pkg3.isPackageExists)(i))
2755
2402
  } = options;
2756
2403
  const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? options.stylistic : {};
2757
2404
  if (stylisticOptions && !("jsx" in stylisticOptions)) {
@@ -2781,8 +2428,7 @@ async function luxass(options = {}, ...userConfigs) {
2781
2428
  imports({
2782
2429
  stylistic: stylisticOptions
2783
2430
  }),
2784
- unicorn(),
2785
- perfectionist()
2431
+ unicorn()
2786
2432
  );
2787
2433
  if (enableVue) {
2788
2434
  exts.push("vue");
@@ -2820,21 +2466,6 @@ async function luxass(options = {}, ...userConfigs) {
2820
2466
  })
2821
2467
  );
2822
2468
  }
2823
- if (enableSolid) {
2824
- configs.push(
2825
- // TODO: Analyze if this way is better for performance
2826
- // await interop(import("./configs/solid")).then((plugin) => plugin.solid({
2827
- // ...resolveSubOptions(options, "solid"),
2828
- // overrides: getOverrides(options, "solid"),
2829
- // typescript: !!enableTypeScript,
2830
- // })),
2831
- solid({
2832
- ...resolveSubOptions(options, "solid"),
2833
- overrides: getOverrides(options, "solid"),
2834
- typescript: !!enableTypeScript
2835
- })
2836
- );
2837
- }
2838
2469
  if (enableVue) {
2839
2470
  configs.push(
2840
2471
  vue({
@@ -2911,13 +2542,69 @@ async function luxass(options = {}, ...userConfigs) {
2911
2542
  if (Object.keys(fusedConfig).length) {
2912
2543
  configs.push([fusedConfig]);
2913
2544
  }
2914
- const merged = combine(...configs, ...userConfigs);
2545
+ const merged = combine(
2546
+ ...configs,
2547
+ ...userConfigs
2548
+ );
2915
2549
  return merged;
2916
2550
  }
2917
-
2918
- // src/index.ts
2919
- var src_default = luxass;
2920
2551
  // Annotate the CommonJS export names for ESM import in node:
2921
2552
  0 && (module.exports = {
2922
- luxass
2553
+ GLOB_ASTRO,
2554
+ GLOB_CSS,
2555
+ GLOB_EXCLUDE,
2556
+ GLOB_HTML,
2557
+ GLOB_JS,
2558
+ GLOB_JSON,
2559
+ GLOB_JSON5,
2560
+ GLOB_JSONC,
2561
+ GLOB_JSX,
2562
+ GLOB_LESS,
2563
+ GLOB_MARKDOWN,
2564
+ GLOB_MARKDOWN_CODE,
2565
+ GLOB_MARKDOWN_IN_MARKDOWN,
2566
+ GLOB_NEXTJS_OG,
2567
+ GLOB_NEXTJS_ROUTES,
2568
+ GLOB_POSTCSS,
2569
+ GLOB_SCSS,
2570
+ GLOB_SRC,
2571
+ GLOB_SRC_EXT,
2572
+ GLOB_STYLE,
2573
+ GLOB_TESTS,
2574
+ GLOB_TOML,
2575
+ GLOB_TS,
2576
+ GLOB_TSX,
2577
+ GLOB_VUE,
2578
+ GLOB_YAML,
2579
+ astro,
2580
+ combine,
2581
+ comments,
2582
+ ensure,
2583
+ formatters,
2584
+ getOverrides,
2585
+ ignores,
2586
+ imports,
2587
+ interop,
2588
+ javascript,
2589
+ jsdoc,
2590
+ jsonc,
2591
+ luxass,
2592
+ markdown,
2593
+ nextjs,
2594
+ node,
2595
+ react,
2596
+ renameRules,
2597
+ resolveSubOptions,
2598
+ sortPackageJson,
2599
+ sortTsconfig,
2600
+ stylistic,
2601
+ tailwindcss,
2602
+ test,
2603
+ toArray,
2604
+ toml,
2605
+ typescript,
2606
+ unicorn,
2607
+ unocss,
2608
+ vue,
2609
+ yaml
2923
2610
  });