@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
@@ -41,7 +41,6 @@ __export(configs_exports, {
41
41
  markdown: () => markdown,
42
42
  nextjs: () => nextjs,
43
43
  node: () => node,
44
- perfectionist: () => perfectionist,
45
44
  react: () => react,
46
45
  solid: () => solid,
47
46
  sortPackageJson: () => sortPackageJson,
@@ -459,20 +458,6 @@ function sortTsconfig() {
459
458
  ];
460
459
  }
461
460
 
462
- // src/configs/perfectionist.ts
463
- var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
464
- async function perfectionist() {
465
- return [
466
- {
467
- name: "luxass:perfectionist",
468
- plugins: {
469
- perfectionist: import_eslint_plugin_perfectionist.default
470
- },
471
- rules: {}
472
- }
473
- ];
474
- }
475
-
476
461
  // src/configs/imports.ts
477
462
  var import_eslint_plugin_i = __toESM(require("eslint-plugin-i"), 1);
478
463
  var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
@@ -821,7 +806,7 @@ async function ensure(packages) {
821
806
  ;
822
807
  }
823
808
 
824
- // src/configs/jsdoc.ts
809
+ // src/configs/docs/jsdoc.ts
825
810
  async function jsdoc(options = {}) {
826
811
  const {
827
812
  overrides,
@@ -859,7 +844,7 @@ async function jsdoc(options = {}) {
859
844
  ];
860
845
  }
861
846
 
862
- // src/configs/jsonc.ts
847
+ // src/configs/data/json.ts
863
848
  async function jsonc(options = {}) {
864
849
  const {
865
850
  files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
@@ -940,7 +925,7 @@ async function jsonc(options = {}) {
940
925
  ];
941
926
  }
942
927
 
943
- // src/configs/markdown.ts
928
+ // src/configs/docs/markdown.ts
944
929
  var parserPlain = __toESM(require("eslint-parser-plain"), 1);
945
930
  var import_eslint_merge_processors = require("eslint-merge-processors");
946
931
  async function markdown(options = {}) {
@@ -1038,7 +1023,7 @@ var StylisticConfigDefaults = {
1038
1023
  indent: 2,
1039
1024
  jsx: true,
1040
1025
  quotes: "double",
1041
- semi: false
1026
+ semi: true
1042
1027
  };
1043
1028
  async function stylistic(options = {}) {
1044
1029
  const {
@@ -1286,7 +1271,7 @@ async function typescript(options = {}) {
1286
1271
  ];
1287
1272
  }
1288
1273
 
1289
- // src/configs/vue.ts
1274
+ // src/configs/frameworks/vue.ts
1290
1275
  var import_eslint_merge_processors2 = require("eslint-merge-processors");
1291
1276
  async function vue(options = {}) {
1292
1277
  const {
@@ -1482,7 +1467,7 @@ async function vue(options = {}) {
1482
1467
  ];
1483
1468
  }
1484
1469
 
1485
- // src/configs/yaml.ts
1470
+ // src/configs/data/yaml.ts
1486
1471
  async function yaml(options = {}) {
1487
1472
  const {
1488
1473
  files = [GLOB_YAML],
@@ -1558,6 +1543,7 @@ var import_utils8 = require("@typescript-eslint/utils");
1558
1543
  var createRule = import_utils8.ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
1559
1544
 
1560
1545
  // src/custom-rules/no-only-tests/index.ts
1546
+ var RULE_NAME = "no-only-tests";
1561
1547
  var DEFAULT_OPTIONS = {
1562
1548
  blocks: ["describe", "it", "test"],
1563
1549
  focus: ["only"]
@@ -1566,10 +1552,10 @@ function getPath(node2, path = []) {
1566
1552
  if (node2) {
1567
1553
  const nodeName = node2.name || node2.property && node2.property.name;
1568
1554
  if (node2.object) {
1569
- return getPath(node2.object, [
1570
- nodeName,
1571
- ...path
1572
- ]);
1555
+ return getPath(
1556
+ node2.object,
1557
+ [nodeName, ...path]
1558
+ );
1573
1559
  }
1574
1560
  if (node2.callee)
1575
1561
  return getPath(node2.callee, path);
@@ -1578,13 +1564,13 @@ function getPath(node2, path = []) {
1578
1564
  return path;
1579
1565
  }
1580
1566
  var noOnlyTests = createRule({
1581
- name: "no-only-tests",
1567
+ name: RULE_NAME,
1582
1568
  create: (context, [options]) => {
1583
1569
  const {
1584
1570
  blocks = DEFAULT_OPTIONS.blocks,
1585
1571
  focus = DEFAULT_OPTIONS.focus
1586
1572
  } = options;
1587
- const handler = {
1573
+ return {
1588
1574
  Identifier(node2) {
1589
1575
  const parent = node2.parent?.object;
1590
1576
  if (!parent)
@@ -1593,56 +1579,59 @@ var noOnlyTests = createRule({
1593
1579
  return;
1594
1580
  const callPath = getPath(node2.parent).join(".");
1595
1581
  const found = blocks.find((block) => {
1596
- if (block.endsWith("*"))
1582
+ if (block.endsWith("*")) {
1597
1583
  return callPath.startsWith(block.replace(/\*$/, ""));
1584
+ }
1598
1585
  return callPath.startsWith(`${block}.`);
1599
1586
  });
1600
1587
  if (found) {
1601
1588
  context.report({
1602
1589
  data: { block: callPath.split(".")[0], focus: node2.name },
1603
- messageId: "notPermitted",
1590
+ messageId: "not-permitted",
1604
1591
  node: node2
1605
1592
  });
1606
1593
  }
1607
1594
  }
1608
1595
  };
1609
- return handler;
1610
1596
  },
1611
- defaultOptions: [{
1612
- blocks: ["describe", "it", "test"],
1613
- focus: ["only"]
1614
- }],
1597
+ defaultOptions: [
1598
+ {
1599
+ blocks: ["describe", "it", "test"],
1600
+ focus: ["only"]
1601
+ }
1602
+ ],
1615
1603
  meta: {
1616
1604
  docs: {
1617
1605
  description: "disallow .only blocks in tests",
1618
1606
  recommended: "recommended"
1619
1607
  },
1620
1608
  messages: {
1621
- notPermitted: "{{ block }}.{{ focus }} not permitted"
1609
+ "not-permitted": "{{ block }}.{{ focus }} not permitted"
1622
1610
  },
1623
- schema: [{
1624
- additionalProperties: false,
1625
- properties: {
1626
- blocks: {
1627
- items: {
1628
- type: "string"
1611
+ schema: [
1612
+ {
1613
+ additionalProperties: false,
1614
+ properties: {
1615
+ blocks: {
1616
+ items: {
1617
+ type: "string"
1618
+ },
1619
+ type: "array",
1620
+ uniqueItems: true
1629
1621
  },
1630
- type: "array",
1631
- uniqueItems: true
1622
+ focus: {
1623
+ items: {
1624
+ type: "string"
1625
+ },
1626
+ type: "array",
1627
+ uniqueItems: true
1628
+ }
1632
1629
  },
1633
- focus: {
1634
- items: {
1635
- type: "string"
1636
- },
1637
- type: "array",
1638
- uniqueItems: true
1639
- }
1640
- },
1641
- type: "object"
1642
- }],
1630
+ type: "object"
1631
+ }
1632
+ ],
1643
1633
  type: "layout"
1644
1634
  }
1645
- // i need to have this here, otherwise typechecking fails.
1646
1635
  });
1647
1636
 
1648
1637
  // src/configs/test.ts
@@ -1688,7 +1677,7 @@ async function test(options = {}) {
1688
1677
  ];
1689
1678
  }
1690
1679
 
1691
- // src/configs/unocss.ts
1680
+ // src/configs/css/unocss.ts
1692
1681
  async function unocss(options = {}) {
1693
1682
  const {
1694
1683
  attributify = true,
@@ -1725,7 +1714,7 @@ async function unocss(options = {}) {
1725
1714
  ];
1726
1715
  }
1727
1716
 
1728
- // src/configs/nextjs.ts
1717
+ // src/configs/frameworks/nextjs.ts
1729
1718
  async function nextjs(options = {}) {
1730
1719
  const {
1731
1720
  files = [GLOB_SRC],
@@ -1804,7 +1793,7 @@ async function nextjs(options = {}) {
1804
1793
  ];
1805
1794
  }
1806
1795
 
1807
- // src/configs/react.ts
1796
+ // src/configs/frameworks/react.ts
1808
1797
  var import_local_pkg2 = require("local-pkg");
1809
1798
  async function react(options = {}) {
1810
1799
  const {
@@ -1830,9 +1819,7 @@ async function react(options = {}) {
1830
1819
  interop(import("eslint-plugin-react-refresh")),
1831
1820
  ...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
1832
1821
  ]);
1833
- const isAllowConstantExport = ["vite"].some(
1834
- (i) => (0, import_local_pkg2.isPackageExists)(i)
1835
- );
1822
+ const isAllowConstantExport = (0, import_local_pkg2.isPackageExists)("vite");
1836
1823
  return [
1837
1824
  {
1838
1825
  name: "luxass:react:setup",
@@ -2085,7 +2072,7 @@ async function react(options = {}) {
2085
2072
  ];
2086
2073
  }
2087
2074
 
2088
- // src/configs/astro.ts
2075
+ // src/configs/frameworks/astro.ts
2089
2076
  async function astro(options) {
2090
2077
  const {
2091
2078
  a11y = false,
@@ -2192,7 +2179,7 @@ async function astro(options) {
2192
2179
  ];
2193
2180
  }
2194
2181
 
2195
- // src/configs/tailwindcss.ts
2182
+ // src/configs/css/tailwindcss.ts
2196
2183
  async function tailwindcss(options = {}) {
2197
2184
  const {
2198
2185
  files = [GLOB_SRC],
@@ -2409,7 +2396,7 @@ async function formatters(options = {}, stylistic2 = {}) {
2409
2396
  return configs;
2410
2397
  }
2411
2398
 
2412
- // src/configs/toml.ts
2399
+ // src/configs/data/toml.ts
2413
2400
  async function toml(options = {}) {
2414
2401
  const {
2415
2402
  files = [GLOB_TOML],
@@ -2468,7 +2455,7 @@ async function toml(options = {}) {
2468
2455
  ];
2469
2456
  }
2470
2457
 
2471
- // src/configs/solid.ts
2458
+ // src/configs/frameworks/solid.ts
2472
2459
  async function solid(options = {}) {
2473
2460
  const {
2474
2461
  a11y = false,
@@ -2742,7 +2729,6 @@ async function solid(options = {}) {
2742
2729
  markdown,
2743
2730
  nextjs,
2744
2731
  node,
2745
- perfectionist,
2746
2732
  react,
2747
2733
  solid,
2748
2734
  sortPackageJson,
@@ -3,11 +3,10 @@ export { unicorn } from './unicorn.cjs';
3
3
  export { ignores } from './ignores.cjs';
4
4
  export { node } from './node.cjs';
5
5
  export { sortPackageJson, sortTsconfig } from './sort.cjs';
6
- export { perfectionist } from './perfectionist.cjs';
7
6
  export { ImportsOptions, imports } from './imports.cjs';
8
7
  export { A as AstroOptions, F as FormattersOptions, b as JSONOptions, J as JavaScriptOptions, N as NextJSOptions, R as ReactOptions, o as SolidOptions, S as StylisticConfig, c as StylisticOptions, l as TOMLOptions, h as TailwindCSSOptions, e as TestOptions, T as TypeScriptOptions, U as UnoCSSOptions, V as VueOptions, Y as YAMLOptions, f as astro, i as formatters, j as javascript, a as jsonc, n as nextjs, r as react, m as solid, s as stylistic, g as tailwindcss, d as test, k as toml, t as typescript, u as unocss, v as vue, y as yaml } from '../types-HqEzZfQU.cjs';
9
- export { JSDOCOptions, jsdoc } from './jsdoc.cjs';
10
- export { MarkdownOptions, markdown } from './markdown.cjs';
8
+ export { JSDOCOptions, jsdoc } from './docs/jsdoc.cjs';
9
+ export { MarkdownOptions, markdown } from './docs/markdown.cjs';
11
10
  import 'eslint-config-flat-gitignore';
12
11
  import '@antfu/eslint-define-config';
13
12
  import '@eslint-types/jsdoc/types';
@@ -3,11 +3,10 @@ export { unicorn } from './unicorn.js';
3
3
  export { ignores } from './ignores.js';
4
4
  export { node } from './node.js';
5
5
  export { sortPackageJson, sortTsconfig } from './sort.js';
6
- export { perfectionist } from './perfectionist.js';
7
6
  export { ImportsOptions, imports } from './imports.js';
8
7
  export { A as AstroOptions, F as FormattersOptions, b as JSONOptions, J as JavaScriptOptions, N as NextJSOptions, R as ReactOptions, o as SolidOptions, S as StylisticConfig, c as StylisticOptions, l as TOMLOptions, h as TailwindCSSOptions, e as TestOptions, T as TypeScriptOptions, U as UnoCSSOptions, V as VueOptions, Y as YAMLOptions, f as astro, i as formatters, j as javascript, a as jsonc, n as nextjs, r as react, m as solid, s as stylistic, g as tailwindcss, d as test, k as toml, t as typescript, u as unocss, v as vue, y as yaml } from '../types-HqEzZfQU.js';
9
- export { JSDOCOptions, jsdoc } from './jsdoc.js';
10
- export { MarkdownOptions, markdown } from './markdown.js';
8
+ export { JSDOCOptions, jsdoc } from './docs/jsdoc.js';
9
+ export { MarkdownOptions, markdown } from './docs/markdown.js';
11
10
  import 'eslint-config-flat-gitignore';
12
11
  import '@antfu/eslint-define-config';
13
12
  import '@eslint-types/jsdoc/types';
@@ -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 "../chunk-4YBQZLPS.mjs";
71
64
  import {
72
65
  ignores
@@ -74,6 +67,9 @@ import {
74
67
  import {
75
68
  imports
76
69
  } from "../chunk-4YT54JFZ.mjs";
70
+ import {
71
+ javascript
72
+ } from "../chunk-DCOLHWHC.mjs";
77
73
  import "../chunk-KOXCJL3C.mjs";
78
74
  export {
79
75
  astro,
@@ -87,7 +83,6 @@ export {
87
83
  markdown,
88
84
  nextjs,
89
85
  node,
90
- perfectionist,
91
86
  react,
92
87
  solid,
93
88
  sortPackageJson,
@@ -49,7 +49,7 @@ var StylisticConfigDefaults = {
49
49
  indent: 2,
50
50
  jsx: true,
51
51
  quotes: "double",
52
- semi: false
52
+ semi: true
53
53
  };
54
54
  async function stylistic(options = {}) {
55
55
  const {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  StylisticConfigDefaults,
3
3
  stylistic
4
- } from "../chunk-QMGT2Z63.mjs";
4
+ } from "../chunk-RDZJT36Z.mjs";
5
5
  import "../chunk-4YBQZLPS.mjs";
6
6
  export {
7
7
  StylisticConfigDefaults,
@@ -71,6 +71,7 @@ var import_utils = require("@typescript-eslint/utils");
71
71
  var createRule = import_utils.ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
72
72
 
73
73
  // src/custom-rules/no-only-tests/index.ts
74
+ var RULE_NAME = "no-only-tests";
74
75
  var DEFAULT_OPTIONS = {
75
76
  blocks: ["describe", "it", "test"],
76
77
  focus: ["only"]
@@ -79,10 +80,10 @@ function getPath(node, path = []) {
79
80
  if (node) {
80
81
  const nodeName = node.name || node.property && node.property.name;
81
82
  if (node.object) {
82
- return getPath(node.object, [
83
- nodeName,
84
- ...path
85
- ]);
83
+ return getPath(
84
+ node.object,
85
+ [nodeName, ...path]
86
+ );
86
87
  }
87
88
  if (node.callee)
88
89
  return getPath(node.callee, path);
@@ -91,13 +92,13 @@ function getPath(node, path = []) {
91
92
  return path;
92
93
  }
93
94
  var noOnlyTests = createRule({
94
- name: "no-only-tests",
95
+ name: RULE_NAME,
95
96
  create: (context, [options]) => {
96
97
  const {
97
98
  blocks = DEFAULT_OPTIONS.blocks,
98
99
  focus = DEFAULT_OPTIONS.focus
99
100
  } = options;
100
- const handler = {
101
+ return {
101
102
  Identifier(node) {
102
103
  const parent = node.parent?.object;
103
104
  if (!parent)
@@ -106,56 +107,59 @@ var noOnlyTests = createRule({
106
107
  return;
107
108
  const callPath = getPath(node.parent).join(".");
108
109
  const found = blocks.find((block) => {
109
- if (block.endsWith("*"))
110
+ if (block.endsWith("*")) {
110
111
  return callPath.startsWith(block.replace(/\*$/, ""));
112
+ }
111
113
  return callPath.startsWith(`${block}.`);
112
114
  });
113
115
  if (found) {
114
116
  context.report({
115
117
  data: { block: callPath.split(".")[0], focus: node.name },
116
- messageId: "notPermitted",
118
+ messageId: "not-permitted",
117
119
  node
118
120
  });
119
121
  }
120
122
  }
121
123
  };
122
- return handler;
123
124
  },
124
- defaultOptions: [{
125
- blocks: ["describe", "it", "test"],
126
- focus: ["only"]
127
- }],
125
+ defaultOptions: [
126
+ {
127
+ blocks: ["describe", "it", "test"],
128
+ focus: ["only"]
129
+ }
130
+ ],
128
131
  meta: {
129
132
  docs: {
130
133
  description: "disallow .only blocks in tests",
131
134
  recommended: "recommended"
132
135
  },
133
136
  messages: {
134
- notPermitted: "{{ block }}.{{ focus }} not permitted"
137
+ "not-permitted": "{{ block }}.{{ focus }} not permitted"
135
138
  },
136
- schema: [{
137
- additionalProperties: false,
138
- properties: {
139
- blocks: {
140
- items: {
141
- type: "string"
139
+ schema: [
140
+ {
141
+ additionalProperties: false,
142
+ properties: {
143
+ blocks: {
144
+ items: {
145
+ type: "string"
146
+ },
147
+ type: "array",
148
+ uniqueItems: true
142
149
  },
143
- type: "array",
144
- uniqueItems: true
150
+ focus: {
151
+ items: {
152
+ type: "string"
153
+ },
154
+ type: "array",
155
+ uniqueItems: true
156
+ }
145
157
  },
146
- focus: {
147
- items: {
148
- type: "string"
149
- },
150
- type: "array",
151
- uniqueItems: true
152
- }
153
- },
154
- type: "object"
155
- }],
158
+ type: "object"
159
+ }
160
+ ],
156
161
  type: "layout"
157
162
  }
158
- // i need to have this here, otherwise typechecking fails.
159
163
  });
160
164
 
161
165
  // src/configs/test.ts
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  test
3
- } from "../chunk-7ODEIBF5.mjs";
4
- import "../chunk-WDSV2EFG.mjs";
3
+ } from "../chunk-TWAETZPX.mjs";
5
4
  import "../chunk-4YBQZLPS.mjs";
6
5
  import "../chunk-KOXCJL3C.mjs";
7
6
  export {