@luxass/eslint-config 4.0.0-beta.7 → 4.0.0-beta.8

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 (94) hide show
  1. package/dist/{chunk-P4VCNFV7.mjs → chunk-24KJPXII.mjs} +1 -1
  2. package/dist/{chunk-ZCBXPKVL.mjs → chunk-3QHLEAXK.mjs} +1 -1
  3. package/dist/{chunk-AP74CKWC.mjs → chunk-4JKENKIP.mjs} +6 -2
  4. package/dist/{chunk-AWRK5LBF.mjs → chunk-BAKUP7QM.mjs} +1 -1
  5. package/dist/{chunk-SLYFE6WI.mjs → chunk-CFSYEIE4.mjs} +1 -1
  6. package/dist/{chunk-E75NMIPT.mjs → chunk-ERFDRAGW.mjs} +1 -1
  7. package/dist/{chunk-NAAUGWPQ.mjs → chunk-FK567E7G.mjs} +1 -1
  8. package/dist/{chunk-KL4WRPMJ.mjs → chunk-I2ECCPNN.mjs} +6 -2
  9. package/dist/{chunk-6B53AW4K.mjs → chunk-LQLF2CMA.mjs} +11 -6
  10. package/dist/{chunk-UTGBMMZF.mjs → chunk-M5WNLLBT.mjs} +1 -1
  11. package/dist/{chunk-QPBW5YAJ.mjs → chunk-NUG6FLHN.mjs} +1 -1
  12. package/dist/{chunk-LGVH5YDV.mjs → chunk-P3N5WLFL.mjs} +1 -1
  13. package/dist/chunk-TQ476NL2.mjs +57 -0
  14. package/dist/{chunk-ODRFH37N.mjs → chunk-UBPIYSHC.mjs} +13 -6
  15. package/dist/configs/astro.cjs +12 -5
  16. package/dist/configs/astro.d.cts +1 -1
  17. package/dist/configs/astro.d.ts +1 -1
  18. package/dist/configs/astro.mjs +2 -2
  19. package/dist/configs/comments.d.cts +1 -1
  20. package/dist/configs/comments.d.ts +1 -1
  21. package/dist/configs/ignores.d.cts +1 -1
  22. package/dist/configs/ignores.d.ts +1 -1
  23. package/dist/configs/imports.d.cts +1 -1
  24. package/dist/configs/imports.d.ts +1 -1
  25. package/dist/configs/index.cjs +58 -14
  26. package/dist/configs/index.d.cts +1 -1
  27. package/dist/configs/index.d.ts +1 -1
  28. package/dist/configs/index.mjs +14 -14
  29. package/dist/configs/javascript.d.cts +1 -1
  30. package/dist/configs/javascript.d.ts +1 -1
  31. package/dist/configs/jsdoc.cjs +2 -0
  32. package/dist/configs/jsdoc.d.cts +1 -1
  33. package/dist/configs/jsdoc.d.ts +1 -1
  34. package/dist/configs/jsdoc.mjs +2 -2
  35. package/dist/configs/jsonc.cjs +2 -0
  36. package/dist/configs/jsonc.d.cts +1 -1
  37. package/dist/configs/jsonc.d.ts +1 -1
  38. package/dist/configs/jsonc.mjs +2 -2
  39. package/dist/configs/markdown.cjs +2 -0
  40. package/dist/configs/markdown.d.cts +1 -1
  41. package/dist/configs/markdown.d.ts +1 -1
  42. package/dist/configs/markdown.mjs +2 -2
  43. package/dist/configs/nextjs.cjs +31 -1
  44. package/dist/configs/nextjs.d.cts +1 -1
  45. package/dist/configs/nextjs.d.ts +1 -1
  46. package/dist/configs/nextjs.mjs +2 -2
  47. package/dist/configs/node.d.cts +1 -1
  48. package/dist/configs/node.d.ts +1 -1
  49. package/dist/configs/perfectionist.d.cts +1 -1
  50. package/dist/configs/perfectionist.d.ts +1 -1
  51. package/dist/configs/react.cjs +38 -5
  52. package/dist/configs/react.d.cts +1 -1
  53. package/dist/configs/react.d.ts +1 -1
  54. package/dist/configs/react.mjs +2 -2
  55. package/dist/configs/sort.d.cts +1 -1
  56. package/dist/configs/sort.d.ts +1 -1
  57. package/dist/configs/stylistic.cjs +2 -0
  58. package/dist/configs/stylistic.d.cts +1 -1
  59. package/dist/configs/stylistic.d.ts +1 -1
  60. package/dist/configs/stylistic.mjs +2 -2
  61. package/dist/configs/tailwindcss.cjs +31 -1
  62. package/dist/configs/tailwindcss.d.cts +1 -1
  63. package/dist/configs/tailwindcss.d.ts +1 -1
  64. package/dist/configs/tailwindcss.mjs +2 -2
  65. package/dist/configs/test.cjs +2 -0
  66. package/dist/configs/test.d.cts +1 -1
  67. package/dist/configs/test.d.ts +1 -1
  68. package/dist/configs/test.mjs +2 -2
  69. package/dist/configs/typescript.cjs +4 -2
  70. package/dist/configs/typescript.d.cts +1 -1
  71. package/dist/configs/typescript.d.ts +1 -1
  72. package/dist/configs/typescript.mjs +2 -2
  73. package/dist/configs/unicorn.d.cts +1 -1
  74. package/dist/configs/unicorn.d.ts +1 -1
  75. package/dist/configs/unocss.cjs +2 -0
  76. package/dist/configs/unocss.d.cts +1 -1
  77. package/dist/configs/unocss.d.ts +1 -1
  78. package/dist/configs/unocss.mjs +2 -2
  79. package/dist/configs/vue.cjs +2 -0
  80. package/dist/configs/vue.d.cts +1 -1
  81. package/dist/configs/vue.d.ts +1 -1
  82. package/dist/configs/vue.mjs +2 -2
  83. package/dist/configs/yaml.cjs +2 -0
  84. package/dist/configs/yaml.d.cts +1 -1
  85. package/dist/configs/yaml.d.ts +1 -1
  86. package/dist/configs/yaml.mjs +2 -2
  87. package/dist/index.cjs +68 -25
  88. package/dist/index.d.cts +1 -1
  89. package/dist/index.d.ts +1 -1
  90. package/dist/index.mjs +17 -18
  91. package/dist/{types-d6wL74Fv.d.ts → types-fxhbVLKI.d.cts} +3 -3
  92. package/dist/{types-d6wL74Fv.d.cts → types-fxhbVLKI.d.ts} +3 -3
  93. package/package.json +5 -6
  94. package/dist/chunk-4VUK6ART.mjs +0 -29
package/dist/index.cjs CHANGED
@@ -479,6 +479,8 @@ async function javascript(options = {}) {
479
479
  }
480
480
 
481
481
  // src/utils.ts
482
+ var import_node_process = __toESM(require("process"), 1);
483
+ var import_local_pkg = require("local-pkg");
482
484
  async function combine(...configs) {
483
485
  const resolved = await Promise.all(configs);
484
486
  return resolved.flat();
@@ -500,6 +502,31 @@ async function interop(m) {
500
502
  const resolved = await m;
501
503
  return resolved.default || resolved;
502
504
  }
505
+ async function ensure(packages) {
506
+ if (import_node_process.default.env.CI || import_node_process.default.stdout.isTTY === false) {
507
+ return;
508
+ }
509
+ ;
510
+ const nonExistingPackages = packages.filter((i) => !(0, import_local_pkg.isPackageExists)(i));
511
+ if (nonExistingPackages.length === 0) {
512
+ return;
513
+ }
514
+ ;
515
+ const { default: prompts } = await import("prompts");
516
+ const { result } = await prompts([
517
+ {
518
+ message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`,
519
+ name: "result",
520
+ type: "confirm"
521
+ }
522
+ ]);
523
+ if (result) {
524
+ await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, {
525
+ dev: true
526
+ }));
527
+ }
528
+ ;
529
+ }
503
530
 
504
531
  // src/configs/jsdoc.ts
505
532
  async function jsdoc(options = {}) {
@@ -954,7 +981,7 @@ async function stylistic(options = {}) {
954
981
  }
955
982
 
956
983
  // src/configs/typescript.ts
957
- var import_node_process = __toESM(require("process"), 1);
984
+ var import_node_process2 = __toESM(require("process"), 1);
958
985
  async function typescript(options) {
959
986
  const {
960
987
  componentExts = [],
@@ -1008,7 +1035,7 @@ async function typescript(options) {
1008
1035
  sourceType: "module",
1009
1036
  ...tsconfigPath ? {
1010
1037
  project: tsconfigPath,
1011
- tsconfigRootDir: import_node_process.default.cwd()
1038
+ tsconfigRootDir: import_node_process2.default.cwd()
1012
1039
  } : {},
1013
1040
  ...parserOptions
1014
1041
  }
@@ -1465,7 +1492,6 @@ async function unocss() {
1465
1492
  var DEFAULT_TAILWIND_CALLEES = ["classnames", "clsx", "cx", "cn"];
1466
1493
  var DEFAULT_CLASS_REGEX = "^class(Name)?$";
1467
1494
  async function tailwindcss(options = {}) {
1468
- const pluginTailwindCSS = await interop(import("eslint-plugin-tailwindcss"));
1469
1495
  const {
1470
1496
  callees = DEFAULT_TAILWIND_CALLEES,
1471
1497
  classRegex = DEFAULT_CLASS_REGEX,
@@ -1473,6 +1499,10 @@ async function tailwindcss(options = {}) {
1473
1499
  nextjs: nextjs2,
1474
1500
  removeDuplicates = true
1475
1501
  } = options;
1502
+ await ensure([
1503
+ "eslint-plugin-tailwindcss"
1504
+ ]);
1505
+ const pluginTailwindCSS = await interop(import("eslint-plugin-tailwindcss"));
1476
1506
  const tailwindCSSCallee = callees ?? DEFAULT_TAILWIND_CALLEES;
1477
1507
  return [
1478
1508
  {
@@ -1515,8 +1545,11 @@ async function tailwindcss(options = {}) {
1515
1545
 
1516
1546
  // src/configs/nextjs.ts
1517
1547
  async function nextjs(options = {}) {
1518
- const pluginNextjs = await interop(import("@next/eslint-plugin-next"));
1519
1548
  const { overrides, rootDir } = options;
1549
+ await ensure([
1550
+ "@next/eslint-plugin-next"
1551
+ ]);
1552
+ const pluginNextjs = await interop(import("@next/eslint-plugin-next"));
1520
1553
  return [
1521
1554
  {
1522
1555
  name: "luxass:nextjs:setup",
@@ -1586,6 +1619,17 @@ async function nextjs(options = {}) {
1586
1619
 
1587
1620
  // src/configs/react.ts
1588
1621
  async function react(options) {
1622
+ const {
1623
+ a11y = false,
1624
+ overrides = {},
1625
+ typescript: typescript2 = true
1626
+ } = options;
1627
+ await ensure([
1628
+ "eslint-plugin-react",
1629
+ "eslint-plugin-react-hooks",
1630
+ "eslint-plugin-react-refresh",
1631
+ ...options.a11y ? ["eslint-plugin-jsx-a11y"] : []
1632
+ ]);
1589
1633
  const [
1590
1634
  pluginReact,
1591
1635
  pluginReactHooks,
@@ -1597,11 +1641,6 @@ async function react(options) {
1597
1641
  interop(import("eslint-plugin-react-refresh")),
1598
1642
  ...options.a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
1599
1643
  ]);
1600
- const {
1601
- a11y = false,
1602
- overrides = {},
1603
- typescript: typescript2 = true
1604
- } = options;
1605
1644
  return [
1606
1645
  {
1607
1646
  name: "luxass:react:setup",
@@ -1853,6 +1892,16 @@ async function react(options) {
1853
1892
 
1854
1893
  // src/configs/astro.ts
1855
1894
  async function astro(options) {
1895
+ const {
1896
+ a11y = false,
1897
+ overrides = {}
1898
+ // typescript = true,
1899
+ } = options;
1900
+ await interop([
1901
+ "eslint-plugin-astro",
1902
+ "astro-eslint-parser",
1903
+ ...options.a11y ? ["eslint-plugin-jsx-a11y"] : []
1904
+ ]);
1856
1905
  const [
1857
1906
  pluginAstro,
1858
1907
  parserAstro,
@@ -1862,11 +1911,6 @@ async function astro(options) {
1862
1911
  interop(import("astro-eslint-parser")),
1863
1912
  ...options.a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
1864
1913
  ]);
1865
- const {
1866
- a11y = false,
1867
- overrides = {}
1868
- // typescript = true,
1869
- } = options;
1870
1914
  return [
1871
1915
  {
1872
1916
  name: "luxass:astro:setup",
@@ -1919,13 +1963,12 @@ async function astro(options) {
1919
1963
  }
1920
1964
 
1921
1965
  // src/factory.ts
1922
- var import_node_process2 = __toESM(require("process"), 1);
1966
+ var import_node_process3 = __toESM(require("process"), 1);
1923
1967
  var import_node_fs = require("fs");
1924
- var import_local_pkg = require("local-pkg");
1968
+ var import_local_pkg2 = require("local-pkg");
1925
1969
 
1926
1970
  // src/constants.ts
1927
1971
  var VUE_PACKAGES = ["vue", "nuxt", "vitepress", "@slidev/cli"];
1928
- var REACT_PACKAGES = ["react", "next", "react-dom"];
1929
1972
  var UNO_PACKAGES = ["unocss", "@unocss/webpack", "@unocss/nuxt"];
1930
1973
  var FLAT_CONFIG_PROPS = [
1931
1974
  "files",
@@ -1941,18 +1984,18 @@ var FLAT_CONFIG_PROPS = [
1941
1984
  // src/factory.ts
1942
1985
  async function luxass(options = {}, ...userConfigs) {
1943
1986
  const {
1944
- astro: enableAstro = (0, import_local_pkg.isPackageExists)("astro"),
1987
+ astro: enableAstro = (0, import_local_pkg2.isPackageExists)("astro"),
1945
1988
  componentExts = [],
1946
1989
  gitignore: enableGitignore = true,
1947
- isEditor = !!((import_node_process2.default.env.VSCODE_PID || import_node_process2.default.env.JETBRAINS_IDE) && !import_node_process2.default.env.CI),
1948
- nextjs: enableNextJS = (0, import_local_pkg.isPackageExists)("next"),
1990
+ isEditor = !!((import_node_process3.default.env.VSCODE_PID || import_node_process3.default.env.JETBRAINS_IDE) && !import_node_process3.default.env.CI),
1991
+ nextjs: enableNextJS = false,
1949
1992
  overrides = {},
1950
1993
  perfectionist: enablePerfectionistRules = false,
1951
- react: enableReact = REACT_PACKAGES.some((i) => (0, import_local_pkg.isPackageExists)(i)),
1952
- tailwindcss: enableTailwindCSS = (0, import_local_pkg.isPackageExists)("tailwindcss"),
1953
- typescript: enableTypeScript = (0, import_local_pkg.isPackageExists)("typescript"),
1954
- unocss: enableUnoCSS = UNO_PACKAGES.some((i) => (0, import_local_pkg.isPackageExists)(i)),
1955
- vue: enableVue = VUE_PACKAGES.some((i) => (0, import_local_pkg.isPackageExists)(i))
1994
+ react: enableReact = false,
1995
+ tailwindcss: enableTailwindCSS = false,
1996
+ typescript: enableTypeScript = (0, import_local_pkg2.isPackageExists)("typescript"),
1997
+ unocss: enableUnoCSS = UNO_PACKAGES.some((i) => (0, import_local_pkg2.isPackageExists)(i)),
1998
+ vue: enableVue = VUE_PACKAGES.some((i) => (0, import_local_pkg2.isPackageExists)(i))
1956
1999
  } = options;
1957
2000
  const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? options.stylistic : {};
1958
2001
  if (stylisticOptions && !("jsx" in stylisticOptions)) {
package/dist/index.d.cts CHANGED
@@ -19,7 +19,7 @@ export { tailwindcss } from './configs/tailwindcss.cjs';
19
19
  export { nextjs } from './configs/nextjs.cjs';
20
20
  export { react } from './configs/react.cjs';
21
21
  export { astro } from './configs/astro.cjs';
22
- import { f as OptionsConfig, F as FlatConfigItem, A as Awaitable, U as UserConfigItem } from './types-d6wL74Fv.cjs';
22
+ import { f as OptionsConfig, F as FlatConfigItem, A as Awaitable, U as UserConfigItem } from './types-fxhbVLKI.cjs';
23
23
  import 'eslint-config-flat-gitignore';
24
24
  import '@typescript-eslint/parser';
25
25
  import '@antfu/eslint-define-config';
package/dist/index.d.ts CHANGED
@@ -19,7 +19,7 @@ export { tailwindcss } from './configs/tailwindcss.js';
19
19
  export { nextjs } from './configs/nextjs.js';
20
20
  export { react } from './configs/react.js';
21
21
  export { astro } from './configs/astro.js';
22
- import { f as OptionsConfig, F as FlatConfigItem, A as Awaitable, U as UserConfigItem } from './types-d6wL74Fv.js';
22
+ import { f as OptionsConfig, F as FlatConfigItem, A as Awaitable, U as UserConfigItem } from './types-fxhbVLKI.js';
23
23
  import 'eslint-config-flat-gitignore';
24
24
  import '@typescript-eslint/parser';
25
25
  import '@antfu/eslint-define-config';
package/dist/index.mjs CHANGED
@@ -1,34 +1,34 @@
1
1
  import "./chunk-FKAOMYGL.mjs";
2
2
  import {
3
3
  tailwindcss
4
- } from "./chunk-AP74CKWC.mjs";
4
+ } from "./chunk-4JKENKIP.mjs";
5
5
  import {
6
6
  test
7
- } from "./chunk-P4VCNFV7.mjs";
7
+ } from "./chunk-24KJPXII.mjs";
8
8
  import {
9
9
  typescript
10
- } from "./chunk-AWRK5LBF.mjs";
10
+ } from "./chunk-BAKUP7QM.mjs";
11
11
  import {
12
12
  unicorn
13
13
  } from "./chunk-HE56XDG6.mjs";
14
14
  import {
15
15
  unocss
16
- } from "./chunk-SLYFE6WI.mjs";
16
+ } from "./chunk-CFSYEIE4.mjs";
17
17
  import {
18
18
  vue
19
- } from "./chunk-QPBW5YAJ.mjs";
19
+ } from "./chunk-NUG6FLHN.mjs";
20
20
  import {
21
21
  yaml
22
- } from "./chunk-UTGBMMZF.mjs";
22
+ } from "./chunk-M5WNLLBT.mjs";
23
23
  import {
24
24
  jsonc
25
- } from "./chunk-LGVH5YDV.mjs";
25
+ } from "./chunk-P3N5WLFL.mjs";
26
26
  import {
27
27
  markdown
28
- } from "./chunk-E75NMIPT.mjs";
28
+ } from "./chunk-ERFDRAGW.mjs";
29
29
  import {
30
30
  nextjs
31
- } from "./chunk-KL4WRPMJ.mjs";
31
+ } from "./chunk-I2ECCPNN.mjs";
32
32
  import {
33
33
  node
34
34
  } from "./chunk-NDNDG7BH.mjs";
@@ -37,17 +37,17 @@ import {
37
37
  } from "./chunk-HLDEUDLN.mjs";
38
38
  import {
39
39
  react
40
- } from "./chunk-ODRFH37N.mjs";
40
+ } from "./chunk-UBPIYSHC.mjs";
41
41
  import {
42
42
  sortPackageJson,
43
43
  sortTsconfig
44
44
  } from "./chunk-FOIFEV73.mjs";
45
45
  import {
46
46
  stylistic
47
- } from "./chunk-ZCBXPKVL.mjs";
47
+ } from "./chunk-3QHLEAXK.mjs";
48
48
  import {
49
49
  astro
50
- } from "./chunk-6B53AW4K.mjs";
50
+ } from "./chunk-LQLF2CMA.mjs";
51
51
  import {
52
52
  comments
53
53
  } from "./chunk-4HH6LYJ6.mjs";
@@ -88,11 +88,11 @@ import {
88
88
  import "./chunk-C5VMTRKT.mjs";
89
89
  import {
90
90
  jsdoc
91
- } from "./chunk-NAAUGWPQ.mjs";
91
+ } from "./chunk-FK567E7G.mjs";
92
92
  import {
93
93
  combine,
94
94
  interop
95
- } from "./chunk-4VUK6ART.mjs";
95
+ } from "./chunk-TQ476NL2.mjs";
96
96
 
97
97
  // src/factory.ts
98
98
  import process from "node:process";
@@ -101,7 +101,6 @@ import { isPackageExists } from "local-pkg";
101
101
 
102
102
  // src/constants.ts
103
103
  var VUE_PACKAGES = ["vue", "nuxt", "vitepress", "@slidev/cli"];
104
- var REACT_PACKAGES = ["react", "next", "react-dom"];
105
104
  var UNO_PACKAGES = ["unocss", "@unocss/webpack", "@unocss/nuxt"];
106
105
  var FLAT_CONFIG_PROPS = [
107
106
  "files",
@@ -121,11 +120,11 @@ async function luxass(options = {}, ...userConfigs) {
121
120
  componentExts = [],
122
121
  gitignore: enableGitignore = true,
123
122
  isEditor = !!((process.env.VSCODE_PID || process.env.JETBRAINS_IDE) && !process.env.CI),
124
- nextjs: enableNextJS = isPackageExists("next"),
123
+ nextjs: enableNextJS = false,
125
124
  overrides = {},
126
125
  perfectionist: enablePerfectionistRules = false,
127
- react: enableReact = REACT_PACKAGES.some((i) => isPackageExists(i)),
128
- tailwindcss: enableTailwindCSS = isPackageExists("tailwindcss"),
126
+ react: enableReact = false,
127
+ tailwindcss: enableTailwindCSS = false,
129
128
  typescript: enableTypeScript = isPackageExists("typescript"),
130
129
  unocss: enableUnoCSS = UNO_PACKAGES.some((i) => isPackageExists(i)),
131
130
  vue: enableVue = VUE_PACKAGES.some((i) => isPackageExists(i))
@@ -154,13 +154,13 @@ interface OptionsConfig extends OptionsComponentExts {
154
154
  /**
155
155
  * Enable NextJS support.
156
156
  *
157
- * @default auto-detect based on the dependencies
157
+ * @default false
158
158
  */
159
159
  nextjs?: boolean | NextJSOptions;
160
160
  /**
161
161
  * Enable React support.
162
162
  *
163
- * @default auto-detect based on the dependencies
163
+ * @default false
164
164
  */
165
165
  react?: boolean | ReactOptions;
166
166
  /**
@@ -209,7 +209,7 @@ interface OptionsConfig extends OptionsComponentExts {
209
209
  /**
210
210
  * Enable TailwindCSS support.
211
211
  *
212
- * @default auto-detect based on the dependencies
212
+ * @default false
213
213
  */
214
214
  tailwindcss?: boolean | OptionsTailwindCSS;
215
215
  /**
@@ -154,13 +154,13 @@ interface OptionsConfig extends OptionsComponentExts {
154
154
  /**
155
155
  * Enable NextJS support.
156
156
  *
157
- * @default auto-detect based on the dependencies
157
+ * @default false
158
158
  */
159
159
  nextjs?: boolean | NextJSOptions;
160
160
  /**
161
161
  * Enable React support.
162
162
  *
163
- * @default auto-detect based on the dependencies
163
+ * @default false
164
164
  */
165
165
  react?: boolean | ReactOptions;
166
166
  /**
@@ -209,7 +209,7 @@ interface OptionsConfig extends OptionsComponentExts {
209
209
  /**
210
210
  * Enable TailwindCSS support.
211
211
  *
212
- * @default auto-detect based on the dependencies
212
+ * @default false
213
213
  */
214
214
  tailwindcss?: boolean | OptionsTailwindCSS;
215
215
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@luxass/eslint-config",
3
3
  "type": "module",
4
- "version": "4.0.0-beta.7",
4
+ "version": "4.0.0-beta.8",
5
5
  "packageManager": "pnpm@8.10.5",
6
6
  "description": "ESLint config for @luxass",
7
7
  "author": {
@@ -72,7 +72,6 @@
72
72
  "peerDependencies": {
73
73
  "@next/eslint-plugin-next": "^14.0.3",
74
74
  "eslint": ">=8.0.0",
75
- "eslint-plugin-astro": "^0.29.1",
76
75
  "eslint-plugin-react": "^7.33.2",
77
76
  "eslint-plugin-react-hooks": "^4.6.0",
78
77
  "eslint-plugin-react-refresh": "^0.4.4",
@@ -93,13 +92,11 @@
93
92
  },
94
93
  "eslint-plugin-tailwindcss": {
95
94
  "optional": true
96
- },
97
- "eslint-plugin-astro": {
98
- "optional": true
99
95
  }
100
96
  },
101
97
  "dependencies": {
102
98
  "@antfu/eslint-define-config": "^1.23.0-2",
99
+ "@antfu/install-pkg": "^0.2.0",
103
100
  "@eslint-types/jsdoc": "46.9.0",
104
101
  "@eslint-types/typescript-eslint": "^6.12.0",
105
102
  "@eslint-types/unicorn": "^49.0.0",
@@ -109,6 +106,7 @@
109
106
  "@unocss/eslint-plugin": "^0.57.7",
110
107
  "eslint-config-flat-gitignore": "^0.1.1",
111
108
  "eslint-plugin-antfu": "^1.0.10",
109
+ "eslint-plugin-astro": "^0.29.1",
112
110
  "eslint-plugin-eslint-comments": "^3.2.0",
113
111
  "eslint-plugin-i": "^2.29.0",
114
112
  "eslint-plugin-jsdoc": "^46.9.0",
@@ -128,6 +126,7 @@
128
126
  "jsonc-eslint-parser": "^2.4.0",
129
127
  "local-pkg": "^0.5.0",
130
128
  "parse-gitignore": "^2.0.0",
129
+ "prompts": "^2.4.2",
131
130
  "vue-eslint-parser": "^9.3.2",
132
131
  "yaml-eslint-parser": "^1.2.2"
133
132
  },
@@ -136,8 +135,8 @@
136
135
  "@stylistic/eslint-plugin-migrate": "^1.4.0",
137
136
  "@types/eslint": "^8.44.7",
138
137
  "@types/node": "^18.17.19",
138
+ "@types/prompts": "^2.4.9",
139
139
  "eslint": "^8.54.0",
140
- "eslint-plugin-astro": "^0.29.1",
141
140
  "eslint-plugin-react": "^7.33.2",
142
141
  "eslint-plugin-react-hooks": "^4.6.0",
143
142
  "eslint-plugin-react-refresh": "^0.4.4",
@@ -1,29 +0,0 @@
1
- // src/utils.ts
2
- async function combine(...configs) {
3
- const resolved = await Promise.all(configs);
4
- return resolved.flat();
5
- }
6
- function renameRules(rules, from, to) {
7
- return Object.fromEntries(
8
- Object.entries(rules).map(([key, value]) => {
9
- if (key.startsWith(from)) {
10
- return [to + key.slice(from.length), value];
11
- }
12
- return [key, value];
13
- })
14
- );
15
- }
16
- function toArray(value) {
17
- return Array.isArray(value) ? value : [value];
18
- }
19
- async function interop(m) {
20
- const resolved = await m;
21
- return resolved.default || resolved;
22
- }
23
-
24
- export {
25
- combine,
26
- renameRules,
27
- toArray,
28
- interop
29
- };