@luxass/eslint-config 4.2.4 → 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 (114) hide show
  1. package/README.md +34 -52
  2. package/dist/{chunk-KJ7ZCBK4.mjs → chunk-2IR43M6N.mjs} +2 -2
  3. package/dist/{chunk-RNFKNSHW.mjs → chunk-47ISSTHW.mjs} +3 -5
  4. package/dist/{chunk-5SDSWPKR.mjs → chunk-4YT54JFZ.mjs} +1 -1
  5. package/dist/{chunk-Q57BF3CR.mjs → chunk-AJS3TMZE.mjs} +2 -2
  6. package/dist/{chunk-FU5SRKZU.mjs → chunk-C6FE5KXJ.mjs} +2 -2
  7. package/dist/{chunk-RAIFRO2A.mjs → chunk-DCOLHWHC.mjs} +1 -1
  8. package/dist/{chunk-JUFHDXTH.mjs → chunk-E4RVBKZB.mjs} +2 -2
  9. package/dist/{chunk-DVQQVCGF.mjs → chunk-HZNHG5PB.mjs} +1 -1
  10. package/dist/{chunk-ATRL3UZP.mjs → chunk-KOXCJL3C.mjs} +1 -0
  11. package/dist/{chunk-BXBN56WI.mjs → chunk-PFCAWBCD.mjs} +2 -2
  12. package/dist/{chunk-MX3BZIQW.mjs → chunk-PFYV2TWZ.mjs} +2 -2
  13. package/dist/{chunk-PYS26PF3.mjs → chunk-QT6FHTFU.mjs} +2 -2
  14. package/dist/{chunk-QMGT2Z63.mjs → chunk-RDZJT36Z.mjs} +1 -1
  15. package/dist/{chunk-WRURTO5T.mjs → chunk-TWAETZPX.mjs} +42 -37
  16. package/dist/{chunk-ANUYBAYV.mjs → chunk-WSQOWO67.mjs} +1 -1
  17. package/dist/{chunk-C5YCKPY4.mjs → chunk-XD3UVRU7.mjs} +2 -2
  18. package/dist/{chunk-WOYZWHPM.mjs → chunk-XGI647GZ.mjs} +2 -2
  19. package/dist/{chunk-5TJETBJG.mjs → chunk-XMXYE5WC.mjs} +2 -2
  20. package/dist/{chunk-UMUUVFB7.mjs → chunk-YNMFVYL6.mjs} +2 -2
  21. package/dist/{chunk-3ZMCYBTA.mjs → chunk-YO3IYQ2L.mjs} +1 -1
  22. package/dist/configs/{tailwindcss.cjs → css/tailwindcss.cjs} +2 -2
  23. package/dist/configs/{tailwindcss.d.cts → css/tailwindcss.d.cts} +1 -1
  24. package/dist/configs/{tailwindcss.d.ts → css/tailwindcss.d.ts} +1 -1
  25. package/dist/configs/css/tailwindcss.mjs +8 -0
  26. package/dist/configs/{unocss.cjs → css/unocss.cjs} +2 -2
  27. package/dist/configs/{unocss.d.cts → css/unocss.d.cts} +1 -1
  28. package/dist/configs/{unocss.d.ts → css/unocss.d.ts} +1 -1
  29. package/dist/configs/css/unocss.mjs +8 -0
  30. package/dist/configs/{jsonc.cjs → data/json.cjs} +5 -5
  31. package/dist/configs/{nextjs.d.cts → data/json.d.cts} +1 -1
  32. package/dist/configs/{nextjs.d.ts → data/json.d.ts} +1 -1
  33. package/dist/configs/data/json.mjs +8 -0
  34. package/dist/configs/{toml.cjs → data/toml.cjs} +2 -2
  35. package/dist/configs/{astro.d.ts → data/toml.d.cts} +1 -1
  36. package/dist/configs/{toml.d.ts → data/toml.d.ts} +1 -1
  37. package/dist/configs/data/toml.mjs +8 -0
  38. package/dist/configs/{yaml.cjs → data/yaml.cjs} +2 -2
  39. package/dist/configs/{yaml.d.cts → data/yaml.d.cts} +1 -1
  40. package/dist/configs/{yaml.d.ts → data/yaml.d.ts} +1 -1
  41. package/dist/configs/data/yaml.mjs +8 -0
  42. package/dist/configs/{jsdoc.cjs → docs/jsdoc.cjs} +2 -2
  43. package/dist/configs/{jsdoc.d.cts → docs/jsdoc.d.cts} +1 -1
  44. package/dist/configs/{jsdoc.d.ts → docs/jsdoc.d.ts} +1 -1
  45. package/dist/configs/docs/jsdoc.mjs +7 -0
  46. package/dist/configs/{markdown.cjs → docs/markdown.cjs} +2 -2
  47. package/dist/configs/{markdown.d.cts → docs/markdown.d.cts} +1 -1
  48. package/dist/configs/{markdown.d.ts → docs/markdown.d.ts} +1 -1
  49. package/dist/configs/docs/markdown.mjs +8 -0
  50. package/dist/configs/formatters.cjs +1 -1
  51. package/dist/configs/formatters.mjs +3 -3
  52. package/dist/configs/{astro.cjs → frameworks/astro.cjs} +2 -2
  53. package/dist/configs/{jsonc.d.ts → frameworks/astro.d.cts} +1 -1
  54. package/dist/configs/{astro.d.cts → frameworks/astro.d.ts} +1 -1
  55. package/dist/configs/frameworks/astro.mjs +8 -0
  56. package/dist/configs/{nextjs.cjs → frameworks/nextjs.cjs} +2 -2
  57. package/dist/configs/frameworks/nextjs.d.cts +11 -0
  58. package/dist/configs/frameworks/nextjs.d.ts +11 -0
  59. package/dist/configs/frameworks/nextjs.mjs +8 -0
  60. package/dist/configs/{react.cjs → frameworks/react.cjs} +3 -5
  61. package/dist/configs/{react.d.cts → frameworks/react.d.cts} +1 -1
  62. package/dist/configs/{react.d.ts → frameworks/react.d.ts} +1 -1
  63. package/dist/configs/frameworks/react.mjs +8 -0
  64. package/dist/configs/{solid.cjs → frameworks/solid.cjs} +2 -2
  65. package/dist/configs/{solid.d.cts → frameworks/solid.d.cts} +1 -1
  66. package/dist/configs/{solid.d.ts → frameworks/solid.d.ts} +1 -1
  67. package/dist/configs/frameworks/solid.mjs +8 -0
  68. package/dist/configs/{vue.cjs → frameworks/vue.cjs} +2 -2
  69. package/dist/configs/{jsonc.d.cts → frameworks/vue.d.cts} +2 -2
  70. package/dist/configs/{toml.d.cts → frameworks/vue.d.ts} +2 -2
  71. package/dist/configs/frameworks/vue.mjs +8 -0
  72. package/dist/configs/ignores.cjs +1 -0
  73. package/dist/configs/ignores.mjs +2 -2
  74. package/dist/configs/imports.mjs +2 -2
  75. package/dist/configs/index.cjs +52 -65
  76. package/dist/configs/index.d.cts +2 -3
  77. package/dist/configs/index.d.ts +2 -3
  78. package/dist/configs/index.mjs +42 -47
  79. package/dist/configs/javascript.mjs +2 -2
  80. package/dist/configs/stylistic.cjs +1 -1
  81. package/dist/configs/stylistic.mjs +1 -1
  82. package/dist/configs/test.cjs +37 -33
  83. package/dist/configs/test.mjs +2 -3
  84. package/dist/configs/typescript.mjs +2 -2
  85. package/dist/globs.cjs +1 -0
  86. package/dist/globs.mjs +1 -1
  87. package/dist/index.cjs +61 -72
  88. package/dist/index.mjs +50 -56
  89. package/package.json +1 -2
  90. package/dist/chunk-6T7MXPCT.mjs +0 -17
  91. package/dist/chunk-WDSV2EFG.mjs +0 -7
  92. package/dist/configs/astro.mjs +0 -8
  93. package/dist/configs/jsdoc.mjs +0 -7
  94. package/dist/configs/jsonc.mjs +0 -8
  95. package/dist/configs/markdown.mjs +0 -8
  96. package/dist/configs/nextjs.mjs +0 -8
  97. package/dist/configs/perfectionist.cjs +0 -51
  98. package/dist/configs/perfectionist.d.cts +0 -20
  99. package/dist/configs/perfectionist.d.ts +0 -20
  100. package/dist/configs/perfectionist.mjs +0 -6
  101. package/dist/configs/react.mjs +0 -8
  102. package/dist/configs/solid.mjs +0 -8
  103. package/dist/configs/tailwindcss.mjs +0 -8
  104. package/dist/configs/toml.mjs +0 -8
  105. package/dist/configs/unocss.mjs +0 -8
  106. package/dist/configs/vue.d.cts +0 -11
  107. package/dist/configs/vue.d.ts +0 -11
  108. package/dist/configs/vue.mjs +0 -8
  109. package/dist/configs/yaml.mjs +0 -8
  110. package/dist/custom-rules/utils.cjs +0 -31
  111. package/dist/custom-rules/utils.d.cts +0 -6
  112. package/dist/custom-rules/utils.d.ts +0 -6
  113. package/dist/custom-rules/utils.mjs +0 -6
  114. /package/dist/{chunk-YGZJUKJC.mjs → chunk-YZCJUX6Z.mjs} +0 -0
package/dist/index.cjs CHANGED
@@ -183,6 +183,7 @@ var GLOB_EXCLUDE = [
183
183
  "**/.nuxt",
184
184
  "**/.next",
185
185
  "**/.vercel",
186
+ "**/.netlify",
186
187
  "**/.changeset",
187
188
  "**/.idea",
188
189
  "**/.cache",
@@ -440,20 +441,6 @@ function sortTsconfig() {
440
441
  ];
441
442
  }
442
443
 
443
- // src/configs/perfectionist.ts
444
- var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
445
- async function perfectionist() {
446
- return [
447
- {
448
- name: "luxass:perfectionist",
449
- plugins: {
450
- perfectionist: import_eslint_plugin_perfectionist.default
451
- },
452
- rules: {}
453
- }
454
- ];
455
- }
456
-
457
444
  // src/configs/imports.ts
458
445
  var import_eslint_plugin_i = __toESM(require("eslint-plugin-i"), 1);
459
446
  var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
@@ -815,7 +802,7 @@ function getOverrides(options, key) {
815
802
  };
816
803
  }
817
804
 
818
- // src/configs/jsdoc.ts
805
+ // src/configs/docs/jsdoc.ts
819
806
  async function jsdoc(options = {}) {
820
807
  const {
821
808
  overrides,
@@ -853,7 +840,7 @@ async function jsdoc(options = {}) {
853
840
  ];
854
841
  }
855
842
 
856
- // src/configs/jsonc.ts
843
+ // src/configs/data/json.ts
857
844
  async function jsonc(options = {}) {
858
845
  const {
859
846
  files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
@@ -934,7 +921,7 @@ async function jsonc(options = {}) {
934
921
  ];
935
922
  }
936
923
 
937
- // src/configs/markdown.ts
924
+ // src/configs/docs/markdown.ts
938
925
  var parserPlain = __toESM(require("eslint-parser-plain"), 1);
939
926
  var import_eslint_merge_processors = require("eslint-merge-processors");
940
927
  async function markdown(options = {}) {
@@ -1032,7 +1019,7 @@ var StylisticConfigDefaults = {
1032
1019
  indent: 2,
1033
1020
  jsx: true,
1034
1021
  quotes: "double",
1035
- semi: false
1022
+ semi: true
1036
1023
  };
1037
1024
  async function stylistic(options = {}) {
1038
1025
  const {
@@ -1280,7 +1267,7 @@ async function typescript(options = {}) {
1280
1267
  ];
1281
1268
  }
1282
1269
 
1283
- // src/configs/vue.ts
1270
+ // src/configs/frameworks/vue.ts
1284
1271
  var import_eslint_merge_processors2 = require("eslint-merge-processors");
1285
1272
  async function vue(options = {}) {
1286
1273
  const {
@@ -1476,7 +1463,7 @@ async function vue(options = {}) {
1476
1463
  ];
1477
1464
  }
1478
1465
 
1479
- // src/configs/yaml.ts
1466
+ // src/configs/data/yaml.ts
1480
1467
  async function yaml(options = {}) {
1481
1468
  const {
1482
1469
  files = [GLOB_YAML],
@@ -1552,6 +1539,7 @@ var import_utils8 = require("@typescript-eslint/utils");
1552
1539
  var createRule = import_utils8.ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
1553
1540
 
1554
1541
  // src/custom-rules/no-only-tests/index.ts
1542
+ var RULE_NAME = "no-only-tests";
1555
1543
  var DEFAULT_OPTIONS = {
1556
1544
  blocks: ["describe", "it", "test"],
1557
1545
  focus: ["only"]
@@ -1560,10 +1548,10 @@ function getPath(node2, path = []) {
1560
1548
  if (node2) {
1561
1549
  const nodeName = node2.name || node2.property && node2.property.name;
1562
1550
  if (node2.object) {
1563
- return getPath(node2.object, [
1564
- nodeName,
1565
- ...path
1566
- ]);
1551
+ return getPath(
1552
+ node2.object,
1553
+ [nodeName, ...path]
1554
+ );
1567
1555
  }
1568
1556
  if (node2.callee)
1569
1557
  return getPath(node2.callee, path);
@@ -1572,13 +1560,13 @@ function getPath(node2, path = []) {
1572
1560
  return path;
1573
1561
  }
1574
1562
  var noOnlyTests = createRule({
1575
- name: "no-only-tests",
1563
+ name: RULE_NAME,
1576
1564
  create: (context, [options]) => {
1577
1565
  const {
1578
1566
  blocks = DEFAULT_OPTIONS.blocks,
1579
1567
  focus = DEFAULT_OPTIONS.focus
1580
1568
  } = options;
1581
- const handler = {
1569
+ return {
1582
1570
  Identifier(node2) {
1583
1571
  const parent = node2.parent?.object;
1584
1572
  if (!parent)
@@ -1587,56 +1575,59 @@ var noOnlyTests = createRule({
1587
1575
  return;
1588
1576
  const callPath = getPath(node2.parent).join(".");
1589
1577
  const found = blocks.find((block) => {
1590
- if (block.endsWith("*"))
1578
+ if (block.endsWith("*")) {
1591
1579
  return callPath.startsWith(block.replace(/\*$/, ""));
1580
+ }
1592
1581
  return callPath.startsWith(`${block}.`);
1593
1582
  });
1594
1583
  if (found) {
1595
1584
  context.report({
1596
1585
  data: { block: callPath.split(".")[0], focus: node2.name },
1597
- messageId: "notPermitted",
1586
+ messageId: "not-permitted",
1598
1587
  node: node2
1599
1588
  });
1600
1589
  }
1601
1590
  }
1602
1591
  };
1603
- return handler;
1604
1592
  },
1605
- defaultOptions: [{
1606
- blocks: ["describe", "it", "test"],
1607
- focus: ["only"]
1608
- }],
1593
+ defaultOptions: [
1594
+ {
1595
+ blocks: ["describe", "it", "test"],
1596
+ focus: ["only"]
1597
+ }
1598
+ ],
1609
1599
  meta: {
1610
1600
  docs: {
1611
1601
  description: "disallow .only blocks in tests",
1612
1602
  recommended: "recommended"
1613
1603
  },
1614
1604
  messages: {
1615
- notPermitted: "{{ block }}.{{ focus }} not permitted"
1605
+ "not-permitted": "{{ block }}.{{ focus }} not permitted"
1616
1606
  },
1617
- schema: [{
1618
- additionalProperties: false,
1619
- properties: {
1620
- blocks: {
1621
- items: {
1622
- type: "string"
1607
+ schema: [
1608
+ {
1609
+ additionalProperties: false,
1610
+ properties: {
1611
+ blocks: {
1612
+ items: {
1613
+ type: "string"
1614
+ },
1615
+ type: "array",
1616
+ uniqueItems: true
1623
1617
  },
1624
- type: "array",
1625
- uniqueItems: true
1618
+ focus: {
1619
+ items: {
1620
+ type: "string"
1621
+ },
1622
+ type: "array",
1623
+ uniqueItems: true
1624
+ }
1626
1625
  },
1627
- focus: {
1628
- items: {
1629
- type: "string"
1630
- },
1631
- type: "array",
1632
- uniqueItems: true
1633
- }
1634
- },
1635
- type: "object"
1636
- }],
1626
+ type: "object"
1627
+ }
1628
+ ],
1637
1629
  type: "layout"
1638
1630
  }
1639
- // i need to have this here, otherwise typechecking fails.
1640
1631
  });
1641
1632
 
1642
1633
  // src/configs/test.ts
@@ -1682,7 +1673,7 @@ async function test(options = {}) {
1682
1673
  ];
1683
1674
  }
1684
1675
 
1685
- // src/configs/unocss.ts
1676
+ // src/configs/css/unocss.ts
1686
1677
  async function unocss(options = {}) {
1687
1678
  const {
1688
1679
  attributify = true,
@@ -1719,7 +1710,7 @@ async function unocss(options = {}) {
1719
1710
  ];
1720
1711
  }
1721
1712
 
1722
- // src/configs/nextjs.ts
1713
+ // src/configs/frameworks/nextjs.ts
1723
1714
  async function nextjs(options = {}) {
1724
1715
  const {
1725
1716
  files = [GLOB_SRC],
@@ -1798,7 +1789,7 @@ async function nextjs(options = {}) {
1798
1789
  ];
1799
1790
  }
1800
1791
 
1801
- // src/configs/react.ts
1792
+ // src/configs/frameworks/react.ts
1802
1793
  var import_local_pkg2 = require("local-pkg");
1803
1794
  async function react(options = {}) {
1804
1795
  const {
@@ -1824,9 +1815,7 @@ async function react(options = {}) {
1824
1815
  interop(import("eslint-plugin-react-refresh")),
1825
1816
  ...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
1826
1817
  ]);
1827
- const isAllowConstantExport = ["vite"].some(
1828
- (i) => (0, import_local_pkg2.isPackageExists)(i)
1829
- );
1818
+ const isAllowConstantExport = (0, import_local_pkg2.isPackageExists)("vite");
1830
1819
  return [
1831
1820
  {
1832
1821
  name: "luxass:react:setup",
@@ -2079,7 +2068,7 @@ async function react(options = {}) {
2079
2068
  ];
2080
2069
  }
2081
2070
 
2082
- // src/configs/astro.ts
2071
+ // src/configs/frameworks/astro.ts
2083
2072
  async function astro(options) {
2084
2073
  const {
2085
2074
  a11y = false,
@@ -2186,7 +2175,7 @@ async function astro(options) {
2186
2175
  ];
2187
2176
  }
2188
2177
 
2189
- // src/configs/tailwindcss.ts
2178
+ // src/configs/css/tailwindcss.ts
2190
2179
  async function tailwindcss(options = {}) {
2191
2180
  const {
2192
2181
  files = [GLOB_SRC],
@@ -2403,7 +2392,7 @@ async function formatters(options = {}, stylistic2 = {}) {
2403
2392
  return configs;
2404
2393
  }
2405
2394
 
2406
- // src/configs/toml.ts
2395
+ // src/configs/data/toml.ts
2407
2396
  async function toml(options = {}) {
2408
2397
  const {
2409
2398
  files = [GLOB_TOML],
@@ -2462,7 +2451,7 @@ async function toml(options = {}) {
2462
2451
  ];
2463
2452
  }
2464
2453
 
2465
- // src/configs/solid.ts
2454
+ // src/configs/frameworks/solid.ts
2466
2455
  async function solid(options = {}) {
2467
2456
  const {
2468
2457
  a11y = false,
@@ -2724,9 +2713,9 @@ async function solid(options = {}) {
2724
2713
  ];
2725
2714
  }
2726
2715
 
2727
- // src/constants.ts
2728
- var VUE_PACKAGES = ["vue", "nuxt", "vitepress", "@slidev/cli"];
2716
+ // src/factory.ts
2729
2717
  var FLAT_CONFIG_PROPS = [
2718
+ "name",
2730
2719
  "files",
2731
2720
  "ignores",
2732
2721
  "languageOptions",
@@ -2736,11 +2725,9 @@ var FLAT_CONFIG_PROPS = [
2736
2725
  "rules",
2737
2726
  "settings"
2738
2727
  ];
2739
-
2740
- // src/factory.ts
2741
2728
  async function luxass(options = {}, ...userConfigs) {
2742
2729
  const {
2743
- astro: enableAstro = (0, import_local_pkg3.isPackageExists)("astro"),
2730
+ astro: enableAstro = false,
2744
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),
2745
2732
  exts = [],
2746
2733
  gitignore: enableGitignore = true,
@@ -2750,7 +2737,7 @@ async function luxass(options = {}, ...userConfigs) {
2750
2737
  tailwindcss: enableTailwindCSS = false,
2751
2738
  typescript: enableTypeScript = (0, import_local_pkg3.isPackageExists)("typescript"),
2752
2739
  unocss: enableUnoCSS = false,
2753
- vue: enableVue = VUE_PACKAGES.some((i) => (0, import_local_pkg3.isPackageExists)(i))
2740
+ vue: enableVue = false
2754
2741
  } = options;
2755
2742
  const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? options.stylistic : {};
2756
2743
  if (stylisticOptions && !("jsx" in stylisticOptions)) {
@@ -2780,8 +2767,7 @@ async function luxass(options = {}, ...userConfigs) {
2780
2767
  imports({
2781
2768
  stylistic: stylisticOptions
2782
2769
  }),
2783
- unicorn(),
2784
- perfectionist()
2770
+ unicorn()
2785
2771
  );
2786
2772
  if (enableVue) {
2787
2773
  exts.push("vue");
@@ -2910,7 +2896,10 @@ async function luxass(options = {}, ...userConfigs) {
2910
2896
  if (Object.keys(fusedConfig).length) {
2911
2897
  configs.push([fusedConfig]);
2912
2898
  }
2913
- const merged = combine(...configs, ...userConfigs);
2899
+ const merged = combine(
2900
+ ...configs,
2901
+ ...userConfigs
2902
+ );
2914
2903
  return merged;
2915
2904
  }
2916
2905
 
package/dist/index.mjs CHANGED
@@ -1,72 +1,65 @@
1
- import "./chunk-YGZJUKJC.mjs";
2
- import {
3
- unocss
4
- } from "./chunk-KJ7ZCBK4.mjs";
5
- import {
6
- vue
7
- } from "./chunk-JUFHDXTH.mjs";
8
- import {
9
- yaml
10
- } from "./chunk-WOYZWHPM.mjs";
1
+ import "./chunk-YZCJUX6Z.mjs";
11
2
  import {
12
3
  solid
13
- } from "./chunk-C5YCKPY4.mjs";
4
+ } from "./chunk-XD3UVRU7.mjs";
14
5
  import {
15
- sortPackageJson,
16
- sortTsconfig
17
- } from "./chunk-XBASVDU6.mjs";
18
- import {
19
- tailwindcss
20
- } from "./chunk-Q57BF3CR.mjs";
6
+ vue
7
+ } from "./chunk-E4RVBKZB.mjs";
21
8
  import {
22
- test
23
- } from "./chunk-WRURTO5T.mjs";
24
- import "./chunk-WDSV2EFG.mjs";
9
+ jsonc
10
+ } from "./chunk-PFCAWBCD.mjs";
25
11
  import {
26
12
  toml
27
- } from "./chunk-UMUUVFB7.mjs";
28
- import {
29
- typescript
30
- } from "./chunk-3ZMCYBTA.mjs";
31
- import {
32
- unicorn
33
- } from "./chunk-RVSUTDCE.mjs";
13
+ } from "./chunk-YNMFVYL6.mjs";
34
14
  import {
35
- javascript
36
- } from "./chunk-RAIFRO2A.mjs";
15
+ yaml
16
+ } from "./chunk-XGI647GZ.mjs";
37
17
  import {
38
18
  jsdoc
39
- } from "./chunk-DVQQVCGF.mjs";
40
- import {
41
- jsonc
42
- } from "./chunk-BXBN56WI.mjs";
19
+ } from "./chunk-HZNHG5PB.mjs";
43
20
  import {
44
21
  markdown
45
- } from "./chunk-FU5SRKZU.mjs";
22
+ } from "./chunk-C6FE5KXJ.mjs";
23
+ import {
24
+ astro
25
+ } from "./chunk-PFYV2TWZ.mjs";
46
26
  import {
47
27
  nextjs
48
- } from "./chunk-PYS26PF3.mjs";
28
+ } from "./chunk-QT6FHTFU.mjs";
29
+ import {
30
+ react
31
+ } from "./chunk-47ISSTHW.mjs";
49
32
  import {
50
33
  node
51
34
  } from "./chunk-5NK24IKQ.mjs";
52
35
  import {
53
- perfectionist
54
- } from "./chunk-6T7MXPCT.mjs";
36
+ sortPackageJson,
37
+ sortTsconfig
38
+ } from "./chunk-XBASVDU6.mjs";
55
39
  import {
56
- react
57
- } from "./chunk-RNFKNSHW.mjs";
40
+ test
41
+ } from "./chunk-TWAETZPX.mjs";
58
42
  import {
59
- astro
60
- } from "./chunk-MX3BZIQW.mjs";
43
+ typescript
44
+ } from "./chunk-YO3IYQ2L.mjs";
45
+ import {
46
+ unicorn
47
+ } from "./chunk-RVSUTDCE.mjs";
48
+ import {
49
+ tailwindcss
50
+ } from "./chunk-AJS3TMZE.mjs";
51
+ import {
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-5TJETBJG.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,
@@ -75,20 +68,21 @@ import {
75
68
  } from "./chunk-4YBQZLPS.mjs";
76
69
  import {
77
70
  ignores
78
- } from "./chunk-ANUYBAYV.mjs";
71
+ } from "./chunk-WSQOWO67.mjs";
79
72
  import {
80
73
  imports
81
- } from "./chunk-5SDSWPKR.mjs";
82
- import "./chunk-ATRL3UZP.mjs";
74
+ } from "./chunk-4YT54JFZ.mjs";
75
+ import {
76
+ javascript
77
+ } from "./chunk-DCOLHWHC.mjs";
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.4",
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-MX3BZIQW.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-ATRL3UZP.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-BXBN56WI.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-ATRL3UZP.mjs";
6
- export {
7
- jsonc
8
- };
@@ -1,8 +0,0 @@
1
- import {
2
- markdown
3
- } from "../chunk-FU5SRKZU.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-ATRL3UZP.mjs";
6
- export {
7
- markdown
8
- };
@@ -1,8 +0,0 @@
1
- import {
2
- nextjs
3
- } from "../chunk-PYS26PF3.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-ATRL3UZP.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 };