@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
@@ -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,
@@ -201,6 +200,7 @@ var GLOB_EXCLUDE = [
201
200
  "**/.nuxt",
202
201
  "**/.next",
203
202
  "**/.vercel",
203
+ "**/.netlify",
204
204
  "**/.changeset",
205
205
  "**/.idea",
206
206
  "**/.cache",
@@ -458,20 +458,6 @@ function sortTsconfig() {
458
458
  ];
459
459
  }
460
460
 
461
- // src/configs/perfectionist.ts
462
- var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
463
- async function perfectionist() {
464
- return [
465
- {
466
- name: "luxass:perfectionist",
467
- plugins: {
468
- perfectionist: import_eslint_plugin_perfectionist.default
469
- },
470
- rules: {}
471
- }
472
- ];
473
- }
474
-
475
461
  // src/configs/imports.ts
476
462
  var import_eslint_plugin_i = __toESM(require("eslint-plugin-i"), 1);
477
463
  var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
@@ -820,7 +806,7 @@ async function ensure(packages) {
820
806
  ;
821
807
  }
822
808
 
823
- // src/configs/jsdoc.ts
809
+ // src/configs/docs/jsdoc.ts
824
810
  async function jsdoc(options = {}) {
825
811
  const {
826
812
  overrides,
@@ -858,7 +844,7 @@ async function jsdoc(options = {}) {
858
844
  ];
859
845
  }
860
846
 
861
- // src/configs/jsonc.ts
847
+ // src/configs/data/json.ts
862
848
  async function jsonc(options = {}) {
863
849
  const {
864
850
  files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
@@ -939,7 +925,7 @@ async function jsonc(options = {}) {
939
925
  ];
940
926
  }
941
927
 
942
- // src/configs/markdown.ts
928
+ // src/configs/docs/markdown.ts
943
929
  var parserPlain = __toESM(require("eslint-parser-plain"), 1);
944
930
  var import_eslint_merge_processors = require("eslint-merge-processors");
945
931
  async function markdown(options = {}) {
@@ -1037,7 +1023,7 @@ var StylisticConfigDefaults = {
1037
1023
  indent: 2,
1038
1024
  jsx: true,
1039
1025
  quotes: "double",
1040
- semi: false
1026
+ semi: true
1041
1027
  };
1042
1028
  async function stylistic(options = {}) {
1043
1029
  const {
@@ -1285,7 +1271,7 @@ async function typescript(options = {}) {
1285
1271
  ];
1286
1272
  }
1287
1273
 
1288
- // src/configs/vue.ts
1274
+ // src/configs/frameworks/vue.ts
1289
1275
  var import_eslint_merge_processors2 = require("eslint-merge-processors");
1290
1276
  async function vue(options = {}) {
1291
1277
  const {
@@ -1481,7 +1467,7 @@ async function vue(options = {}) {
1481
1467
  ];
1482
1468
  }
1483
1469
 
1484
- // src/configs/yaml.ts
1470
+ // src/configs/data/yaml.ts
1485
1471
  async function yaml(options = {}) {
1486
1472
  const {
1487
1473
  files = [GLOB_YAML],
@@ -1557,6 +1543,7 @@ var import_utils8 = require("@typescript-eslint/utils");
1557
1543
  var createRule = import_utils8.ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
1558
1544
 
1559
1545
  // src/custom-rules/no-only-tests/index.ts
1546
+ var RULE_NAME = "no-only-tests";
1560
1547
  var DEFAULT_OPTIONS = {
1561
1548
  blocks: ["describe", "it", "test"],
1562
1549
  focus: ["only"]
@@ -1565,10 +1552,10 @@ function getPath(node2, path = []) {
1565
1552
  if (node2) {
1566
1553
  const nodeName = node2.name || node2.property && node2.property.name;
1567
1554
  if (node2.object) {
1568
- return getPath(node2.object, [
1569
- nodeName,
1570
- ...path
1571
- ]);
1555
+ return getPath(
1556
+ node2.object,
1557
+ [nodeName, ...path]
1558
+ );
1572
1559
  }
1573
1560
  if (node2.callee)
1574
1561
  return getPath(node2.callee, path);
@@ -1577,13 +1564,13 @@ function getPath(node2, path = []) {
1577
1564
  return path;
1578
1565
  }
1579
1566
  var noOnlyTests = createRule({
1580
- name: "no-only-tests",
1567
+ name: RULE_NAME,
1581
1568
  create: (context, [options]) => {
1582
1569
  const {
1583
1570
  blocks = DEFAULT_OPTIONS.blocks,
1584
1571
  focus = DEFAULT_OPTIONS.focus
1585
1572
  } = options;
1586
- const handler = {
1573
+ return {
1587
1574
  Identifier(node2) {
1588
1575
  const parent = node2.parent?.object;
1589
1576
  if (!parent)
@@ -1592,56 +1579,59 @@ var noOnlyTests = createRule({
1592
1579
  return;
1593
1580
  const callPath = getPath(node2.parent).join(".");
1594
1581
  const found = blocks.find((block) => {
1595
- if (block.endsWith("*"))
1582
+ if (block.endsWith("*")) {
1596
1583
  return callPath.startsWith(block.replace(/\*$/, ""));
1584
+ }
1597
1585
  return callPath.startsWith(`${block}.`);
1598
1586
  });
1599
1587
  if (found) {
1600
1588
  context.report({
1601
1589
  data: { block: callPath.split(".")[0], focus: node2.name },
1602
- messageId: "notPermitted",
1590
+ messageId: "not-permitted",
1603
1591
  node: node2
1604
1592
  });
1605
1593
  }
1606
1594
  }
1607
1595
  };
1608
- return handler;
1609
1596
  },
1610
- defaultOptions: [{
1611
- blocks: ["describe", "it", "test"],
1612
- focus: ["only"]
1613
- }],
1597
+ defaultOptions: [
1598
+ {
1599
+ blocks: ["describe", "it", "test"],
1600
+ focus: ["only"]
1601
+ }
1602
+ ],
1614
1603
  meta: {
1615
1604
  docs: {
1616
1605
  description: "disallow .only blocks in tests",
1617
1606
  recommended: "recommended"
1618
1607
  },
1619
1608
  messages: {
1620
- notPermitted: "{{ block }}.{{ focus }} not permitted"
1609
+ "not-permitted": "{{ block }}.{{ focus }} not permitted"
1621
1610
  },
1622
- schema: [{
1623
- additionalProperties: false,
1624
- properties: {
1625
- blocks: {
1626
- items: {
1627
- type: "string"
1611
+ schema: [
1612
+ {
1613
+ additionalProperties: false,
1614
+ properties: {
1615
+ blocks: {
1616
+ items: {
1617
+ type: "string"
1618
+ },
1619
+ type: "array",
1620
+ uniqueItems: true
1628
1621
  },
1629
- type: "array",
1630
- uniqueItems: true
1622
+ focus: {
1623
+ items: {
1624
+ type: "string"
1625
+ },
1626
+ type: "array",
1627
+ uniqueItems: true
1628
+ }
1631
1629
  },
1632
- focus: {
1633
- items: {
1634
- type: "string"
1635
- },
1636
- type: "array",
1637
- uniqueItems: true
1638
- }
1639
- },
1640
- type: "object"
1641
- }],
1630
+ type: "object"
1631
+ }
1632
+ ],
1642
1633
  type: "layout"
1643
1634
  }
1644
- // i need to have this here, otherwise typechecking fails.
1645
1635
  });
1646
1636
 
1647
1637
  // src/configs/test.ts
@@ -1687,7 +1677,7 @@ async function test(options = {}) {
1687
1677
  ];
1688
1678
  }
1689
1679
 
1690
- // src/configs/unocss.ts
1680
+ // src/configs/css/unocss.ts
1691
1681
  async function unocss(options = {}) {
1692
1682
  const {
1693
1683
  attributify = true,
@@ -1724,7 +1714,7 @@ async function unocss(options = {}) {
1724
1714
  ];
1725
1715
  }
1726
1716
 
1727
- // src/configs/nextjs.ts
1717
+ // src/configs/frameworks/nextjs.ts
1728
1718
  async function nextjs(options = {}) {
1729
1719
  const {
1730
1720
  files = [GLOB_SRC],
@@ -1803,7 +1793,7 @@ async function nextjs(options = {}) {
1803
1793
  ];
1804
1794
  }
1805
1795
 
1806
- // src/configs/react.ts
1796
+ // src/configs/frameworks/react.ts
1807
1797
  var import_local_pkg2 = require("local-pkg");
1808
1798
  async function react(options = {}) {
1809
1799
  const {
@@ -1829,9 +1819,7 @@ async function react(options = {}) {
1829
1819
  interop(import("eslint-plugin-react-refresh")),
1830
1820
  ...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
1831
1821
  ]);
1832
- const isAllowConstantExport = ["vite"].some(
1833
- (i) => (0, import_local_pkg2.isPackageExists)(i)
1834
- );
1822
+ const isAllowConstantExport = (0, import_local_pkg2.isPackageExists)("vite");
1835
1823
  return [
1836
1824
  {
1837
1825
  name: "luxass:react:setup",
@@ -2084,7 +2072,7 @@ async function react(options = {}) {
2084
2072
  ];
2085
2073
  }
2086
2074
 
2087
- // src/configs/astro.ts
2075
+ // src/configs/frameworks/astro.ts
2088
2076
  async function astro(options) {
2089
2077
  const {
2090
2078
  a11y = false,
@@ -2191,7 +2179,7 @@ async function astro(options) {
2191
2179
  ];
2192
2180
  }
2193
2181
 
2194
- // src/configs/tailwindcss.ts
2182
+ // src/configs/css/tailwindcss.ts
2195
2183
  async function tailwindcss(options = {}) {
2196
2184
  const {
2197
2185
  files = [GLOB_SRC],
@@ -2408,7 +2396,7 @@ async function formatters(options = {}, stylistic2 = {}) {
2408
2396
  return configs;
2409
2397
  }
2410
2398
 
2411
- // src/configs/toml.ts
2399
+ // src/configs/data/toml.ts
2412
2400
  async function toml(options = {}) {
2413
2401
  const {
2414
2402
  files = [GLOB_TOML],
@@ -2467,7 +2455,7 @@ async function toml(options = {}) {
2467
2455
  ];
2468
2456
  }
2469
2457
 
2470
- // src/configs/solid.ts
2458
+ // src/configs/frameworks/solid.ts
2471
2459
  async function solid(options = {}) {
2472
2460
  const {
2473
2461
  a11y = false,
@@ -2741,7 +2729,6 @@ async function solid(options = {}) {
2741
2729
  markdown,
2742
2730
  nextjs,
2743
2731
  node,
2744
- perfectionist,
2745
2732
  react,
2746
2733
  solid,
2747
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,80 +1,76 @@
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";
13
+ } from "../chunk-YNMFVYL6.mjs";
28
14
  import {
29
- typescript
30
- } from "../chunk-3ZMCYBTA.mjs";
31
- import {
32
- unicorn
33
- } from "../chunk-RVSUTDCE.mjs";
34
- 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 "../chunk-4YBQZLPS.mjs";
71
64
  import {
72
65
  ignores
73
- } from "../chunk-ANUYBAYV.mjs";
66
+ } from "../chunk-WSQOWO67.mjs";
74
67
  import {
75
68
  imports
76
- } from "../chunk-5SDSWPKR.mjs";
77
- import "../chunk-ATRL3UZP.mjs";
69
+ } from "../chunk-4YT54JFZ.mjs";
70
+ import {
71
+ javascript
72
+ } from "../chunk-DCOLHWHC.mjs";
73
+ import "../chunk-KOXCJL3C.mjs";
78
74
  export {
79
75
  astro,
80
76
  comments,
@@ -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,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  javascript
3
- } from "../chunk-RAIFRO2A.mjs";
4
- import "../chunk-ATRL3UZP.mjs";
3
+ } from "../chunk-DCOLHWHC.mjs";
4
+ import "../chunk-KOXCJL3C.mjs";
5
5
  export {
6
6
  javascript
7
7
  };
@@ -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,9 +1,8 @@
1
1
  import {
2
2
  test
3
- } from "../chunk-WRURTO5T.mjs";
4
- import "../chunk-WDSV2EFG.mjs";
3
+ } from "../chunk-TWAETZPX.mjs";
5
4
  import "../chunk-4YBQZLPS.mjs";
6
- import "../chunk-ATRL3UZP.mjs";
5
+ import "../chunk-KOXCJL3C.mjs";
7
6
  export {
8
7
  test
9
8
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  typescript
3
- } from "../chunk-3ZMCYBTA.mjs";
3
+ } from "../chunk-YO3IYQ2L.mjs";
4
4
  import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-ATRL3UZP.mjs";
5
+ import "../chunk-KOXCJL3C.mjs";
6
6
  export {
7
7
  typescript
8
8
  };
package/dist/globs.cjs CHANGED
@@ -113,6 +113,7 @@ var GLOB_EXCLUDE = [
113
113
  "**/.nuxt",
114
114
  "**/.next",
115
115
  "**/.vercel",
116
+ "**/.netlify",
116
117
  "**/.changeset",
117
118
  "**/.idea",
118
119
  "**/.cache",
package/dist/globs.mjs CHANGED
@@ -25,7 +25,7 @@ import {
25
25
  GLOB_TSX,
26
26
  GLOB_VUE,
27
27
  GLOB_YAML
28
- } from "./chunk-ATRL3UZP.mjs";
28
+ } from "./chunk-KOXCJL3C.mjs";
29
29
  export {
30
30
  GLOB_ASTRO,
31
31
  GLOB_CSS,