@luxass/eslint-config 4.2.5 → 4.2.6

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 (102) hide show
  1. package/README.md +33 -51
  2. package/dist/{chunk-AQRBQAKE.mjs → chunk-2IR43M6N.mjs} +1 -1
  3. package/dist/{chunk-UITQW3RA.mjs → chunk-47ISSTHW.mjs} +2 -4
  4. package/dist/{chunk-WOBGA3K2.mjs → chunk-AJS3TMZE.mjs} +1 -1
  5. package/dist/{chunk-FNOIGW47.mjs → chunk-C6FE5KXJ.mjs} +1 -1
  6. package/dist/{chunk-MT5P5EKH.mjs → chunk-E4RVBKZB.mjs} +1 -1
  7. package/dist/{chunk-DVQQVCGF.mjs → chunk-HZNHG5PB.mjs} +1 -1
  8. package/dist/{chunk-QDSV5ONX.mjs → chunk-PFCAWBCD.mjs} +1 -1
  9. package/dist/{chunk-O2BXTQHK.mjs → chunk-PFYV2TWZ.mjs} +1 -1
  10. package/dist/{chunk-MMSZW2UW.mjs → chunk-QT6FHTFU.mjs} +1 -1
  11. package/dist/{chunk-QMGT2Z63.mjs → chunk-RDZJT36Z.mjs} +1 -1
  12. package/dist/{chunk-7ODEIBF5.mjs → chunk-TWAETZPX.mjs} +41 -36
  13. package/dist/{chunk-SPD4DGYN.mjs → chunk-XD3UVRU7.mjs} +1 -1
  14. package/dist/{chunk-V57HXOSW.mjs → chunk-XGI647GZ.mjs} +1 -1
  15. package/dist/{chunk-XPKGXA67.mjs → chunk-XMXYE5WC.mjs} +1 -1
  16. package/dist/{chunk-EHWA727G.mjs → chunk-YNMFVYL6.mjs} +1 -1
  17. package/dist/configs/{tailwindcss.cjs → css/tailwindcss.cjs} +2 -2
  18. package/dist/configs/{tailwindcss.d.cts → css/tailwindcss.d.cts} +1 -1
  19. package/dist/configs/{tailwindcss.d.ts → css/tailwindcss.d.ts} +1 -1
  20. package/dist/configs/css/tailwindcss.mjs +8 -0
  21. package/dist/configs/{unocss.cjs → css/unocss.cjs} +2 -2
  22. package/dist/configs/{unocss.d.cts → css/unocss.d.cts} +1 -1
  23. package/dist/configs/{unocss.d.ts → css/unocss.d.ts} +1 -1
  24. package/dist/configs/css/unocss.mjs +8 -0
  25. package/dist/configs/{jsonc.cjs → data/json.cjs} +5 -5
  26. package/dist/configs/{nextjs.d.cts → data/json.d.cts} +1 -1
  27. package/dist/configs/{nextjs.d.ts → data/json.d.ts} +1 -1
  28. package/dist/configs/data/json.mjs +8 -0
  29. package/dist/configs/{toml.cjs → data/toml.cjs} +2 -2
  30. package/dist/configs/{astro.d.ts → data/toml.d.cts} +1 -1
  31. package/dist/configs/{toml.d.ts → data/toml.d.ts} +1 -1
  32. package/dist/configs/data/toml.mjs +8 -0
  33. package/dist/configs/{yaml.cjs → data/yaml.cjs} +2 -2
  34. package/dist/configs/{yaml.d.cts → data/yaml.d.cts} +1 -1
  35. package/dist/configs/{yaml.d.ts → data/yaml.d.ts} +1 -1
  36. package/dist/configs/data/yaml.mjs +8 -0
  37. package/dist/configs/{jsdoc.cjs → docs/jsdoc.cjs} +2 -2
  38. package/dist/configs/{jsdoc.d.cts → docs/jsdoc.d.cts} +1 -1
  39. package/dist/configs/{jsdoc.d.ts → docs/jsdoc.d.ts} +1 -1
  40. package/dist/configs/docs/jsdoc.mjs +7 -0
  41. package/dist/configs/{markdown.cjs → docs/markdown.cjs} +2 -2
  42. package/dist/configs/{markdown.d.cts → docs/markdown.d.cts} +1 -1
  43. package/dist/configs/{markdown.d.ts → docs/markdown.d.ts} +1 -1
  44. package/dist/configs/docs/markdown.mjs +8 -0
  45. package/dist/configs/formatters.cjs +1 -1
  46. package/dist/configs/formatters.mjs +2 -2
  47. package/dist/configs/{astro.cjs → frameworks/astro.cjs} +2 -2
  48. package/dist/configs/{jsonc.d.ts → frameworks/astro.d.cts} +1 -1
  49. package/dist/configs/{astro.d.cts → frameworks/astro.d.ts} +1 -1
  50. package/dist/configs/frameworks/astro.mjs +8 -0
  51. package/dist/configs/{nextjs.cjs → frameworks/nextjs.cjs} +2 -2
  52. package/dist/configs/frameworks/nextjs.d.cts +11 -0
  53. package/dist/configs/frameworks/nextjs.d.ts +11 -0
  54. package/dist/configs/frameworks/nextjs.mjs +8 -0
  55. package/dist/configs/{react.cjs → frameworks/react.cjs} +3 -5
  56. package/dist/configs/{react.d.cts → frameworks/react.d.cts} +1 -1
  57. package/dist/configs/{react.d.ts → frameworks/react.d.ts} +1 -1
  58. package/dist/configs/frameworks/react.mjs +8 -0
  59. package/dist/configs/{solid.cjs → frameworks/solid.cjs} +2 -2
  60. package/dist/configs/{solid.d.cts → frameworks/solid.d.cts} +1 -1
  61. package/dist/configs/{solid.d.ts → frameworks/solid.d.ts} +1 -1
  62. package/dist/configs/frameworks/solid.mjs +8 -0
  63. package/dist/configs/{vue.cjs → frameworks/vue.cjs} +2 -2
  64. package/dist/configs/{jsonc.d.cts → frameworks/vue.d.cts} +2 -2
  65. package/dist/configs/{toml.d.cts → frameworks/vue.d.ts} +2 -2
  66. package/dist/configs/frameworks/vue.mjs +8 -0
  67. package/dist/configs/index.cjs +51 -65
  68. package/dist/configs/index.d.cts +2 -3
  69. package/dist/configs/index.d.ts +2 -3
  70. package/dist/configs/index.mjs +38 -43
  71. package/dist/configs/stylistic.cjs +1 -1
  72. package/dist/configs/stylistic.mjs +1 -1
  73. package/dist/configs/test.cjs +37 -33
  74. package/dist/configs/test.mjs +1 -2
  75. package/dist/index.cjs +60 -72
  76. package/dist/index.mjs +46 -52
  77. package/package.json +1 -2
  78. package/dist/chunk-6T7MXPCT.mjs +0 -17
  79. package/dist/chunk-WDSV2EFG.mjs +0 -7
  80. package/dist/configs/astro.mjs +0 -8
  81. package/dist/configs/jsdoc.mjs +0 -7
  82. package/dist/configs/jsonc.mjs +0 -8
  83. package/dist/configs/markdown.mjs +0 -8
  84. package/dist/configs/nextjs.mjs +0 -8
  85. package/dist/configs/perfectionist.cjs +0 -51
  86. package/dist/configs/perfectionist.d.cts +0 -20
  87. package/dist/configs/perfectionist.d.ts +0 -20
  88. package/dist/configs/perfectionist.mjs +0 -6
  89. package/dist/configs/react.mjs +0 -8
  90. package/dist/configs/solid.mjs +0 -8
  91. package/dist/configs/tailwindcss.mjs +0 -8
  92. package/dist/configs/toml.mjs +0 -8
  93. package/dist/configs/unocss.mjs +0 -8
  94. package/dist/configs/vue.d.cts +0 -11
  95. package/dist/configs/vue.d.ts +0 -11
  96. package/dist/configs/vue.mjs +0 -8
  97. package/dist/configs/yaml.mjs +0 -8
  98. package/dist/custom-rules/utils.cjs +0 -31
  99. package/dist/custom-rules/utils.d.cts +0 -6
  100. package/dist/custom-rules/utils.d.ts +0 -6
  101. package/dist/custom-rules/utils.mjs +0 -6
  102. /package/dist/{chunk-YGZJUKJC.mjs → chunk-YZCJUX6Z.mjs} +0 -0
package/dist/index.cjs CHANGED
@@ -441,20 +441,6 @@ function sortTsconfig() {
441
441
  ];
442
442
  }
443
443
 
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
444
  // src/configs/imports.ts
459
445
  var import_eslint_plugin_i = __toESM(require("eslint-plugin-i"), 1);
460
446
  var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
@@ -816,7 +802,7 @@ function getOverrides(options, key) {
816
802
  };
817
803
  }
818
804
 
819
- // src/configs/jsdoc.ts
805
+ // src/configs/docs/jsdoc.ts
820
806
  async function jsdoc(options = {}) {
821
807
  const {
822
808
  overrides,
@@ -854,7 +840,7 @@ async function jsdoc(options = {}) {
854
840
  ];
855
841
  }
856
842
 
857
- // src/configs/jsonc.ts
843
+ // src/configs/data/json.ts
858
844
  async function jsonc(options = {}) {
859
845
  const {
860
846
  files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
@@ -935,7 +921,7 @@ async function jsonc(options = {}) {
935
921
  ];
936
922
  }
937
923
 
938
- // src/configs/markdown.ts
924
+ // src/configs/docs/markdown.ts
939
925
  var parserPlain = __toESM(require("eslint-parser-plain"), 1);
940
926
  var import_eslint_merge_processors = require("eslint-merge-processors");
941
927
  async function markdown(options = {}) {
@@ -1033,7 +1019,7 @@ var StylisticConfigDefaults = {
1033
1019
  indent: 2,
1034
1020
  jsx: true,
1035
1021
  quotes: "double",
1036
- semi: false
1022
+ semi: true
1037
1023
  };
1038
1024
  async function stylistic(options = {}) {
1039
1025
  const {
@@ -1281,7 +1267,7 @@ async function typescript(options = {}) {
1281
1267
  ];
1282
1268
  }
1283
1269
 
1284
- // src/configs/vue.ts
1270
+ // src/configs/frameworks/vue.ts
1285
1271
  var import_eslint_merge_processors2 = require("eslint-merge-processors");
1286
1272
  async function vue(options = {}) {
1287
1273
  const {
@@ -1477,7 +1463,7 @@ async function vue(options = {}) {
1477
1463
  ];
1478
1464
  }
1479
1465
 
1480
- // src/configs/yaml.ts
1466
+ // src/configs/data/yaml.ts
1481
1467
  async function yaml(options = {}) {
1482
1468
  const {
1483
1469
  files = [GLOB_YAML],
@@ -1553,6 +1539,7 @@ var import_utils8 = require("@typescript-eslint/utils");
1553
1539
  var createRule = import_utils8.ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
1554
1540
 
1555
1541
  // src/custom-rules/no-only-tests/index.ts
1542
+ var RULE_NAME = "no-only-tests";
1556
1543
  var DEFAULT_OPTIONS = {
1557
1544
  blocks: ["describe", "it", "test"],
1558
1545
  focus: ["only"]
@@ -1561,10 +1548,10 @@ function getPath(node2, path = []) {
1561
1548
  if (node2) {
1562
1549
  const nodeName = node2.name || node2.property && node2.property.name;
1563
1550
  if (node2.object) {
1564
- return getPath(node2.object, [
1565
- nodeName,
1566
- ...path
1567
- ]);
1551
+ return getPath(
1552
+ node2.object,
1553
+ [nodeName, ...path]
1554
+ );
1568
1555
  }
1569
1556
  if (node2.callee)
1570
1557
  return getPath(node2.callee, path);
@@ -1573,13 +1560,13 @@ function getPath(node2, path = []) {
1573
1560
  return path;
1574
1561
  }
1575
1562
  var noOnlyTests = createRule({
1576
- name: "no-only-tests",
1563
+ name: RULE_NAME,
1577
1564
  create: (context, [options]) => {
1578
1565
  const {
1579
1566
  blocks = DEFAULT_OPTIONS.blocks,
1580
1567
  focus = DEFAULT_OPTIONS.focus
1581
1568
  } = options;
1582
- const handler = {
1569
+ return {
1583
1570
  Identifier(node2) {
1584
1571
  const parent = node2.parent?.object;
1585
1572
  if (!parent)
@@ -1588,56 +1575,59 @@ var noOnlyTests = createRule({
1588
1575
  return;
1589
1576
  const callPath = getPath(node2.parent).join(".");
1590
1577
  const found = blocks.find((block) => {
1591
- if (block.endsWith("*"))
1578
+ if (block.endsWith("*")) {
1592
1579
  return callPath.startsWith(block.replace(/\*$/, ""));
1580
+ }
1593
1581
  return callPath.startsWith(`${block}.`);
1594
1582
  });
1595
1583
  if (found) {
1596
1584
  context.report({
1597
1585
  data: { block: callPath.split(".")[0], focus: node2.name },
1598
- messageId: "notPermitted",
1586
+ messageId: "not-permitted",
1599
1587
  node: node2
1600
1588
  });
1601
1589
  }
1602
1590
  }
1603
1591
  };
1604
- return handler;
1605
1592
  },
1606
- defaultOptions: [{
1607
- blocks: ["describe", "it", "test"],
1608
- focus: ["only"]
1609
- }],
1593
+ defaultOptions: [
1594
+ {
1595
+ blocks: ["describe", "it", "test"],
1596
+ focus: ["only"]
1597
+ }
1598
+ ],
1610
1599
  meta: {
1611
1600
  docs: {
1612
1601
  description: "disallow .only blocks in tests",
1613
1602
  recommended: "recommended"
1614
1603
  },
1615
1604
  messages: {
1616
- notPermitted: "{{ block }}.{{ focus }} not permitted"
1605
+ "not-permitted": "{{ block }}.{{ focus }} not permitted"
1617
1606
  },
1618
- schema: [{
1619
- additionalProperties: false,
1620
- properties: {
1621
- blocks: {
1622
- items: {
1623
- type: "string"
1607
+ schema: [
1608
+ {
1609
+ additionalProperties: false,
1610
+ properties: {
1611
+ blocks: {
1612
+ items: {
1613
+ type: "string"
1614
+ },
1615
+ type: "array",
1616
+ uniqueItems: true
1624
1617
  },
1625
- type: "array",
1626
- uniqueItems: true
1618
+ focus: {
1619
+ items: {
1620
+ type: "string"
1621
+ },
1622
+ type: "array",
1623
+ uniqueItems: true
1624
+ }
1627
1625
  },
1628
- focus: {
1629
- items: {
1630
- type: "string"
1631
- },
1632
- type: "array",
1633
- uniqueItems: true
1634
- }
1635
- },
1636
- type: "object"
1637
- }],
1626
+ type: "object"
1627
+ }
1628
+ ],
1638
1629
  type: "layout"
1639
1630
  }
1640
- // i need to have this here, otherwise typechecking fails.
1641
1631
  });
1642
1632
 
1643
1633
  // src/configs/test.ts
@@ -1683,7 +1673,7 @@ async function test(options = {}) {
1683
1673
  ];
1684
1674
  }
1685
1675
 
1686
- // src/configs/unocss.ts
1676
+ // src/configs/css/unocss.ts
1687
1677
  async function unocss(options = {}) {
1688
1678
  const {
1689
1679
  attributify = true,
@@ -1720,7 +1710,7 @@ async function unocss(options = {}) {
1720
1710
  ];
1721
1711
  }
1722
1712
 
1723
- // src/configs/nextjs.ts
1713
+ // src/configs/frameworks/nextjs.ts
1724
1714
  async function nextjs(options = {}) {
1725
1715
  const {
1726
1716
  files = [GLOB_SRC],
@@ -1799,7 +1789,7 @@ async function nextjs(options = {}) {
1799
1789
  ];
1800
1790
  }
1801
1791
 
1802
- // src/configs/react.ts
1792
+ // src/configs/frameworks/react.ts
1803
1793
  var import_local_pkg2 = require("local-pkg");
1804
1794
  async function react(options = {}) {
1805
1795
  const {
@@ -1825,9 +1815,7 @@ async function react(options = {}) {
1825
1815
  interop(import("eslint-plugin-react-refresh")),
1826
1816
  ...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
1827
1817
  ]);
1828
- const isAllowConstantExport = ["vite"].some(
1829
- (i) => (0, import_local_pkg2.isPackageExists)(i)
1830
- );
1818
+ const isAllowConstantExport = (0, import_local_pkg2.isPackageExists)("vite");
1831
1819
  return [
1832
1820
  {
1833
1821
  name: "luxass:react:setup",
@@ -2080,7 +2068,7 @@ async function react(options = {}) {
2080
2068
  ];
2081
2069
  }
2082
2070
 
2083
- // src/configs/astro.ts
2071
+ // src/configs/frameworks/astro.ts
2084
2072
  async function astro(options) {
2085
2073
  const {
2086
2074
  a11y = false,
@@ -2187,7 +2175,7 @@ async function astro(options) {
2187
2175
  ];
2188
2176
  }
2189
2177
 
2190
- // src/configs/tailwindcss.ts
2178
+ // src/configs/css/tailwindcss.ts
2191
2179
  async function tailwindcss(options = {}) {
2192
2180
  const {
2193
2181
  files = [GLOB_SRC],
@@ -2404,7 +2392,7 @@ async function formatters(options = {}, stylistic2 = {}) {
2404
2392
  return configs;
2405
2393
  }
2406
2394
 
2407
- // src/configs/toml.ts
2395
+ // src/configs/data/toml.ts
2408
2396
  async function toml(options = {}) {
2409
2397
  const {
2410
2398
  files = [GLOB_TOML],
@@ -2463,7 +2451,7 @@ async function toml(options = {}) {
2463
2451
  ];
2464
2452
  }
2465
2453
 
2466
- // src/configs/solid.ts
2454
+ // src/configs/frameworks/solid.ts
2467
2455
  async function solid(options = {}) {
2468
2456
  const {
2469
2457
  a11y = false,
@@ -2725,9 +2713,9 @@ async function solid(options = {}) {
2725
2713
  ];
2726
2714
  }
2727
2715
 
2728
- // src/constants.ts
2729
- var VUE_PACKAGES = ["vue", "nuxt", "vitepress", "@slidev/cli"];
2716
+ // src/factory.ts
2730
2717
  var FLAT_CONFIG_PROPS = [
2718
+ "name",
2731
2719
  "files",
2732
2720
  "ignores",
2733
2721
  "languageOptions",
@@ -2737,11 +2725,9 @@ var FLAT_CONFIG_PROPS = [
2737
2725
  "rules",
2738
2726
  "settings"
2739
2727
  ];
2740
-
2741
- // src/factory.ts
2742
2728
  async function luxass(options = {}, ...userConfigs) {
2743
2729
  const {
2744
- astro: enableAstro = (0, import_local_pkg3.isPackageExists)("astro"),
2730
+ astro: enableAstro = false,
2745
2731
  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
2732
  exts = [],
2747
2733
  gitignore: enableGitignore = true,
@@ -2751,7 +2737,7 @@ async function luxass(options = {}, ...userConfigs) {
2751
2737
  tailwindcss: enableTailwindCSS = false,
2752
2738
  typescript: enableTypeScript = (0, import_local_pkg3.isPackageExists)("typescript"),
2753
2739
  unocss: enableUnoCSS = false,
2754
- vue: enableVue = VUE_PACKAGES.some((i) => (0, import_local_pkg3.isPackageExists)(i))
2740
+ vue: enableVue = false
2755
2741
  } = options;
2756
2742
  const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? options.stylistic : {};
2757
2743
  if (stylisticOptions && !("jsx" in stylisticOptions)) {
@@ -2781,8 +2767,7 @@ async function luxass(options = {}, ...userConfigs) {
2781
2767
  imports({
2782
2768
  stylistic: stylisticOptions
2783
2769
  }),
2784
- unicorn(),
2785
- perfectionist()
2770
+ unicorn()
2786
2771
  );
2787
2772
  if (enableVue) {
2788
2773
  exts.push("vue");
@@ -2911,7 +2896,10 @@ async function luxass(options = {}, ...userConfigs) {
2911
2896
  if (Object.keys(fusedConfig).length) {
2912
2897
  configs.push([fusedConfig]);
2913
2898
  }
2914
- const merged = combine(...configs, ...userConfigs);
2899
+ const merged = combine(
2900
+ ...configs,
2901
+ ...userConfigs
2902
+ );
2915
2903
  return merged;
2916
2904
  }
2917
2905
 
package/dist/index.mjs CHANGED
@@ -1,30 +1,44 @@
1
- import "./chunk-YGZJUKJC.mjs";
1
+ import "./chunk-YZCJUX6Z.mjs";
2
2
  import {
3
- unocss
4
- } from "./chunk-AQRBQAKE.mjs";
3
+ solid
4
+ } from "./chunk-XD3UVRU7.mjs";
5
5
  import {
6
6
  vue
7
- } from "./chunk-MT5P5EKH.mjs";
7
+ } from "./chunk-E4RVBKZB.mjs";
8
+ import {
9
+ jsonc
10
+ } from "./chunk-PFCAWBCD.mjs";
11
+ import {
12
+ toml
13
+ } from "./chunk-YNMFVYL6.mjs";
8
14
  import {
9
15
  yaml
10
- } from "./chunk-V57HXOSW.mjs";
16
+ } from "./chunk-XGI647GZ.mjs";
11
17
  import {
12
- solid
13
- } from "./chunk-SPD4DGYN.mjs";
18
+ jsdoc
19
+ } from "./chunk-HZNHG5PB.mjs";
20
+ import {
21
+ markdown
22
+ } from "./chunk-C6FE5KXJ.mjs";
23
+ import {
24
+ astro
25
+ } from "./chunk-PFYV2TWZ.mjs";
26
+ import {
27
+ nextjs
28
+ } from "./chunk-QT6FHTFU.mjs";
29
+ import {
30
+ react
31
+ } from "./chunk-47ISSTHW.mjs";
32
+ import {
33
+ node
34
+ } from "./chunk-5NK24IKQ.mjs";
14
35
  import {
15
36
  sortPackageJson,
16
37
  sortTsconfig
17
38
  } from "./chunk-XBASVDU6.mjs";
18
- import {
19
- tailwindcss
20
- } from "./chunk-WOBGA3K2.mjs";
21
39
  import {
22
40
  test
23
- } from "./chunk-7ODEIBF5.mjs";
24
- import "./chunk-WDSV2EFG.mjs";
25
- import {
26
- toml
27
- } from "./chunk-EHWA727G.mjs";
41
+ } from "./chunk-TWAETZPX.mjs";
28
42
  import {
29
43
  typescript
30
44
  } from "./chunk-YO3IYQ2L.mjs";
@@ -32,41 +46,20 @@ import {
32
46
  unicorn
33
47
  } from "./chunk-RVSUTDCE.mjs";
34
48
  import {
35
- javascript
36
- } from "./chunk-DCOLHWHC.mjs";
37
- import {
38
- jsdoc
39
- } from "./chunk-DVQQVCGF.mjs";
40
- import {
41
- jsonc
42
- } from "./chunk-QDSV5ONX.mjs";
43
- import {
44
- markdown
45
- } from "./chunk-FNOIGW47.mjs";
46
- import {
47
- nextjs
48
- } from "./chunk-MMSZW2UW.mjs";
49
- import {
50
- node
51
- } from "./chunk-5NK24IKQ.mjs";
52
- import {
53
- perfectionist
54
- } from "./chunk-6T7MXPCT.mjs";
55
- import {
56
- react
57
- } from "./chunk-UITQW3RA.mjs";
49
+ tailwindcss
50
+ } from "./chunk-AJS3TMZE.mjs";
58
51
  import {
59
- astro
60
- } from "./chunk-O2BXTQHK.mjs";
52
+ unocss
53
+ } from "./chunk-2IR43M6N.mjs";
61
54
  import {
62
55
  comments
63
56
  } from "./chunk-DAJA5AV3.mjs";
64
57
  import {
65
58
  formatters
66
- } from "./chunk-XPKGXA67.mjs";
59
+ } from "./chunk-XMXYE5WC.mjs";
67
60
  import {
68
61
  stylistic
69
- } from "./chunk-QMGT2Z63.mjs";
62
+ } from "./chunk-RDZJT36Z.mjs";
70
63
  import {
71
64
  combine,
72
65
  getOverrides,
@@ -79,16 +72,17 @@ import {
79
72
  import {
80
73
  imports
81
74
  } from "./chunk-4YT54JFZ.mjs";
75
+ import {
76
+ javascript
77
+ } from "./chunk-DCOLHWHC.mjs";
82
78
  import "./chunk-KOXCJL3C.mjs";
83
79
 
84
80
  // src/factory.ts
85
81
  import process from "node:process";
86
82
  import { existsSync } from "node:fs";
87
83
  import { isPackageExists } from "local-pkg";
88
-
89
- // src/constants.ts
90
- var VUE_PACKAGES = ["vue", "nuxt", "vitepress", "@slidev/cli"];
91
84
  var FLAT_CONFIG_PROPS = [
85
+ "name",
92
86
  "files",
93
87
  "ignores",
94
88
  "languageOptions",
@@ -98,11 +92,9 @@ var FLAT_CONFIG_PROPS = [
98
92
  "rules",
99
93
  "settings"
100
94
  ];
101
-
102
- // src/factory.ts
103
95
  async function luxass(options = {}, ...userConfigs) {
104
96
  const {
105
- astro: enableAstro = isPackageExists("astro"),
97
+ astro: enableAstro = false,
106
98
  editor = !!((process.env.VSCODE_PID || process.env.JETBRAINS_IDE || process.env.VIM) && !process.env.CI),
107
99
  exts = [],
108
100
  gitignore: enableGitignore = true,
@@ -112,7 +104,7 @@ async function luxass(options = {}, ...userConfigs) {
112
104
  tailwindcss: enableTailwindCSS = false,
113
105
  typescript: enableTypeScript = isPackageExists("typescript"),
114
106
  unocss: enableUnoCSS = false,
115
- vue: enableVue = VUE_PACKAGES.some((i) => isPackageExists(i))
107
+ vue: enableVue = false
116
108
  } = options;
117
109
  const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? options.stylistic : {};
118
110
  if (stylisticOptions && !("jsx" in stylisticOptions)) {
@@ -142,8 +134,7 @@ async function luxass(options = {}, ...userConfigs) {
142
134
  imports({
143
135
  stylistic: stylisticOptions
144
136
  }),
145
- unicorn(),
146
- perfectionist()
137
+ unicorn()
147
138
  );
148
139
  if (enableVue) {
149
140
  exts.push("vue");
@@ -272,7 +263,10 @@ async function luxass(options = {}, ...userConfigs) {
272
263
  if (Object.keys(fusedConfig).length) {
273
264
  configs.push([fusedConfig]);
274
265
  }
275
- const merged = combine(...configs, ...userConfigs);
266
+ const merged = combine(
267
+ ...configs,
268
+ ...userConfigs
269
+ );
276
270
  return merged;
277
271
  }
278
272
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luxass/eslint-config",
3
- "version": "4.2.5",
3
+ "version": "4.2.6",
4
4
  "description": "ESLint config for @luxass",
5
5
  "type": "module",
6
6
  "author": {
@@ -143,7 +143,6 @@
143
143
  "eslint-plugin-jsx-a11y": "^6.8.0",
144
144
  "eslint-plugin-markdown": "^3.0.1",
145
145
  "eslint-plugin-n": "^16.6.2",
146
- "eslint-plugin-perfectionist": "^2.5.0",
147
146
  "eslint-plugin-sort-keys": "^2.3.5",
148
147
  "eslint-plugin-toml": "^0.9.2",
149
148
  "eslint-plugin-unicorn": "^50.0.1",
@@ -1,17 +0,0 @@
1
- // src/configs/perfectionist.ts
2
- import pluginPerfectionist from "eslint-plugin-perfectionist";
3
- async function perfectionist() {
4
- return [
5
- {
6
- name: "luxass:perfectionist",
7
- plugins: {
8
- perfectionist: pluginPerfectionist
9
- },
10
- rules: {}
11
- }
12
- ];
13
- }
14
-
15
- export {
16
- perfectionist
17
- };
@@ -1,7 +0,0 @@
1
- // src/custom-rules/utils.ts
2
- import { ESLintUtils } from "@typescript-eslint/utils";
3
- var createRule = ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
4
-
5
- export {
6
- createRule
7
- };
@@ -1,8 +0,0 @@
1
- import {
2
- astro
3
- } from "../chunk-O2BXTQHK.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-KOXCJL3C.mjs";
6
- export {
7
- astro
8
- };
@@ -1,7 +0,0 @@
1
- import {
2
- jsdoc
3
- } from "../chunk-DVQQVCGF.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- export {
6
- jsdoc
7
- };
@@ -1,8 +0,0 @@
1
- import {
2
- jsonc
3
- } from "../chunk-QDSV5ONX.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-KOXCJL3C.mjs";
6
- export {
7
- jsonc
8
- };
@@ -1,8 +0,0 @@
1
- import {
2
- markdown
3
- } from "../chunk-FNOIGW47.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-KOXCJL3C.mjs";
6
- export {
7
- markdown
8
- };
@@ -1,8 +0,0 @@
1
- import {
2
- nextjs
3
- } from "../chunk-MMSZW2UW.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-KOXCJL3C.mjs";
6
- export {
7
- nextjs
8
- };
@@ -1,51 +0,0 @@
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/perfectionist.ts
31
- var perfectionist_exports = {};
32
- __export(perfectionist_exports, {
33
- perfectionist: () => perfectionist
34
- });
35
- module.exports = __toCommonJS(perfectionist_exports);
36
- var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
37
- async function perfectionist() {
38
- return [
39
- {
40
- name: "luxass:perfectionist",
41
- plugins: {
42
- perfectionist: import_eslint_plugin_perfectionist.default
43
- },
44
- rules: {}
45
- }
46
- ];
47
- }
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
50
- perfectionist
51
- });
@@ -1,20 +0,0 @@
1
- import { p as FlatConfigItem } from '../types-HqEzZfQU.cjs';
2
- import 'eslint-config-flat-gitignore';
3
- import '@antfu/eslint-define-config';
4
- import '@eslint-types/jsdoc/types';
5
- import '@eslint-types/typescript-eslint/types';
6
- import '@eslint-types/unicorn/types';
7
- import 'eslint-plugin-antfu';
8
- import '@stylistic/eslint-plugin';
9
- import 'eslint';
10
- import '@typescript-eslint/parser';
11
- import 'eslint-processor-vue-blocks';
12
-
13
- /**
14
- * Optional perfectionist plugin for props and items sorting.
15
- *
16
- * @see https://github.com/azat-io/eslint-plugin-perfectionist
17
- */
18
- declare function perfectionist(): Promise<FlatConfigItem[]>;
19
-
20
- export { perfectionist };
@@ -1,20 +0,0 @@
1
- import { p as FlatConfigItem } from '../types-HqEzZfQU.js';
2
- import 'eslint-config-flat-gitignore';
3
- import '@antfu/eslint-define-config';
4
- import '@eslint-types/jsdoc/types';
5
- import '@eslint-types/typescript-eslint/types';
6
- import '@eslint-types/unicorn/types';
7
- import 'eslint-plugin-antfu';
8
- import '@stylistic/eslint-plugin';
9
- import 'eslint';
10
- import '@typescript-eslint/parser';
11
- import 'eslint-processor-vue-blocks';
12
-
13
- /**
14
- * Optional perfectionist plugin for props and items sorting.
15
- *
16
- * @see https://github.com/azat-io/eslint-plugin-perfectionist
17
- */
18
- declare function perfectionist(): Promise<FlatConfigItem[]>;
19
-
20
- export { perfectionist };
@@ -1,6 +0,0 @@
1
- import {
2
- perfectionist
3
- } from "../chunk-6T7MXPCT.mjs";
4
- export {
5
- perfectionist
6
- };