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

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 (95) 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-AL47KNVD.mjs +37 -0
  4. package/dist/{chunk-AWRK5LBF.mjs → chunk-BAKUP7QM.mjs} +1 -1
  5. package/dist/{chunk-E75NMIPT.mjs → chunk-ERFDRAGW.mjs} +1 -1
  6. package/dist/{chunk-NAAUGWPQ.mjs → chunk-FK567E7G.mjs} +1 -1
  7. package/dist/{chunk-6B53AW4K.mjs → chunk-LQLF2CMA.mjs} +11 -6
  8. package/dist/{chunk-UTGBMMZF.mjs → chunk-M5WNLLBT.mjs} +1 -1
  9. package/dist/{chunk-QPBW5YAJ.mjs → chunk-NUG6FLHN.mjs} +1 -1
  10. package/dist/{chunk-AP74CKWC.mjs → chunk-O4O6V7LI.mjs} +10 -3
  11. package/dist/{chunk-LGVH5YDV.mjs → chunk-P3N5WLFL.mjs} +1 -1
  12. package/dist/{chunk-KL4WRPMJ.mjs → chunk-QZTI72NS.mjs} +8 -3
  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 +77 -18
  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 +33 -2
  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 +35 -2
  62. package/dist/configs/tailwindcss.d.cts +2 -2
  63. package/dist/configs/tailwindcss.d.ts +2 -2
  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 +46 -2
  76. package/dist/configs/unocss.d.cts +2 -2
  77. package/dist/configs/unocss.d.ts +2 -2
  78. package/dist/configs/unocss.mjs +3 -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 +95 -31
  88. package/dist/index.d.cts +1 -1
  89. package/dist/index.d.ts +1 -1
  90. package/dist/index.mjs +25 -20
  91. package/dist/{types-d6wL74Fv.d.ts → types-h9izbkUX.d.cts} +14 -8
  92. package/dist/{types-d6wL74Fv.d.cts → types-h9izbkUX.d.ts} +14 -8
  93. package/package.json +10 -11
  94. package/dist/chunk-4VUK6ART.mjs +0 -29
  95. package/dist/chunk-SLYFE6WI.mjs +0 -23
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  typescript
3
- } from "../chunk-AWRK5LBF.mjs";
3
+ } from "../chunk-BAKUP7QM.mjs";
4
4
  import "../chunk-R4NSLRAE.mjs";
5
5
  import "../chunk-C5VMTRKT.mjs";
6
- import "../chunk-4VUK6ART.mjs";
6
+ import "../chunk-TQ476NL2.mjs";
7
7
  export {
8
8
  typescript
9
9
  };
@@ -1,4 +1,4 @@
1
- import { F as FlatConfigItem } from '../types-d6wL74Fv.cjs';
1
+ import { F as FlatConfigItem } from '../types-h9izbkUX.cjs';
2
2
  import 'eslint-config-flat-gitignore';
3
3
  import '@typescript-eslint/parser';
4
4
  import '@antfu/eslint-define-config';
@@ -1,4 +1,4 @@
1
- import { F as FlatConfigItem } from '../types-d6wL74Fv.js';
1
+ import { F as FlatConfigItem } from '../types-h9izbkUX.js';
2
2
  import 'eslint-config-flat-gitignore';
3
3
  import '@typescript-eslint/parser';
4
4
  import '@antfu/eslint-define-config';
@@ -34,23 +34,67 @@ __export(unocss_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(unocss_exports);
36
36
 
37
+ // src/globs.ts
38
+ var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
39
+ var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
40
+ var GLOB_JSX_EXT = "[jt]sx";
41
+ var GLOB_JSX = `**/*.${GLOB_JSX_EXT}`;
42
+ var GLOB_MARKDOWN = "**/*.md";
43
+ var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
44
+ var GLOB_TESTS = [
45
+ `**/__tests__/**/*.${GLOB_SRC_EXT}`,
46
+ `**/*.spec.${GLOB_SRC_EXT}`,
47
+ `**/*.test.${GLOB_SRC_EXT}`,
48
+ `**/*.bench.${GLOB_SRC_EXT}`,
49
+ `**/*.benchmark.${GLOB_SRC_EXT}`
50
+ ];
51
+ var GLOB_NEXTJS_OG = [
52
+ `**/app/**/opengraph-image.${GLOB_JSX_EXT}`,
53
+ `**/app/**/twitter-image.${GLOB_JSX_EXT}`,
54
+ `**/app/**/route.${GLOB_JSX_EXT}`
55
+ ];
56
+ var GLOB_NEXTJS_ROUTES = [
57
+ `**/app/**/page.${GLOB_SRC_EXT}`,
58
+ `**/app/**/layout.${GLOB_SRC_EXT}`,
59
+ `**/app/**/error.${GLOB_SRC_EXT}`,
60
+ `**/app/**/template.${GLOB_SRC_EXT}`,
61
+ `**/app/**/not-found.${GLOB_SRC_EXT}`,
62
+ `**/app/**/loading.${GLOB_SRC_EXT}`,
63
+ `**/app/**/robots.${GLOB_SRC_EXT}`,
64
+ `**/app/**/sitemap.${GLOB_SRC_EXT}`,
65
+ `**/pages/**/*.${GLOB_SRC_EXT}`
66
+ ];
67
+
37
68
  // src/utils.ts
69
+ var import_node_process = __toESM(require("process"), 1);
70
+ var import_local_pkg = require("local-pkg");
38
71
  async function interop(m) {
39
72
  const resolved = await m;
40
73
  return resolved.default || resolved;
41
74
  }
42
75
 
43
76
  // src/configs/unocss.ts
44
- async function unocss() {
77
+ async function unocss(options) {
45
78
  const pluginUnoCSS = await interop(import("@unocss/eslint-plugin"));
79
+ const {
80
+ attributify = false,
81
+ overrides = {}
82
+ } = options;
46
83
  return [
47
84
  {
85
+ files: [
86
+ GLOB_SRC
87
+ ],
48
88
  name: "luxass:unocss",
49
89
  plugins: {
50
90
  "@unocss": pluginUnoCSS
51
91
  },
52
92
  rules: {
53
- ...pluginUnoCSS.configs.recommended.rules
93
+ "unocss/order": "error",
94
+ ...attributify && { "unocss/attributify": "error" },
95
+ "unocss/blocklist": "error",
96
+ // overrides
97
+ ...overrides
54
98
  }
55
99
  }
56
100
  ];
@@ -1,4 +1,4 @@
1
- import { F as FlatConfigItem } from '../types-d6wL74Fv.cjs';
1
+ import { U as UnoCSSOptions, O as OverrideOptions, F as FlatConfigItem } from '../types-h9izbkUX.cjs';
2
2
  import 'eslint-config-flat-gitignore';
3
3
  import '@typescript-eslint/parser';
4
4
  import '@antfu/eslint-define-config';
@@ -9,6 +9,6 @@ import 'eslint-plugin-antfu';
9
9
  import '@stylistic/eslint-plugin';
10
10
  import 'eslint';
11
11
 
12
- declare function unocss(): Promise<FlatConfigItem[]>;
12
+ declare function unocss(options: UnoCSSOptions & OverrideOptions): Promise<FlatConfigItem[]>;
13
13
 
14
14
  export { unocss };
@@ -1,4 +1,4 @@
1
- import { F as FlatConfigItem } from '../types-d6wL74Fv.js';
1
+ import { U as UnoCSSOptions, O as OverrideOptions, F as FlatConfigItem } from '../types-h9izbkUX.js';
2
2
  import 'eslint-config-flat-gitignore';
3
3
  import '@typescript-eslint/parser';
4
4
  import '@antfu/eslint-define-config';
@@ -9,6 +9,6 @@ import 'eslint-plugin-antfu';
9
9
  import '@stylistic/eslint-plugin';
10
10
  import 'eslint';
11
11
 
12
- declare function unocss(): Promise<FlatConfigItem[]>;
12
+ declare function unocss(options: UnoCSSOptions & OverrideOptions): Promise<FlatConfigItem[]>;
13
13
 
14
14
  export { unocss };
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  unocss
3
- } from "../chunk-SLYFE6WI.mjs";
4
- import "../chunk-4VUK6ART.mjs";
3
+ } from "../chunk-AL47KNVD.mjs";
4
+ import "../chunk-R4NSLRAE.mjs";
5
+ import "../chunk-TQ476NL2.mjs";
5
6
  export {
6
7
  unocss
7
8
  };
@@ -67,6 +67,8 @@ var GLOB_NEXTJS_ROUTES = [
67
67
  ];
68
68
 
69
69
  // src/utils.ts
70
+ var import_node_process = __toESM(require("process"), 1);
71
+ var import_local_pkg = require("local-pkg");
70
72
  async function interop(m) {
71
73
  const resolved = await m;
72
74
  return resolved.default || resolved;
@@ -1,4 +1,4 @@
1
- import { C as ConfigurationOptions, O as OverrideOptions, S as StylisticOptions, F as FlatConfigItem } from '../types-d6wL74Fv.cjs';
1
+ import { C as ConfigurationOptions, O as OverrideOptions, S as StylisticOptions, F as FlatConfigItem } from '../types-h9izbkUX.cjs';
2
2
  import 'eslint-config-flat-gitignore';
3
3
  import '@typescript-eslint/parser';
4
4
  import '@antfu/eslint-define-config';
@@ -1,4 +1,4 @@
1
- import { C as ConfigurationOptions, O as OverrideOptions, S as StylisticOptions, F as FlatConfigItem } from '../types-d6wL74Fv.js';
1
+ import { C as ConfigurationOptions, O as OverrideOptions, S as StylisticOptions, F as FlatConfigItem } from '../types-h9izbkUX.js';
2
2
  import 'eslint-config-flat-gitignore';
3
3
  import '@typescript-eslint/parser';
4
4
  import '@antfu/eslint-define-config';
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  vue
3
- } from "../chunk-QPBW5YAJ.mjs";
3
+ } from "../chunk-NUG6FLHN.mjs";
4
4
  import "../chunk-R4NSLRAE.mjs";
5
- import "../chunk-4VUK6ART.mjs";
5
+ import "../chunk-TQ476NL2.mjs";
6
6
  export {
7
7
  vue
8
8
  };
@@ -67,6 +67,8 @@ var GLOB_NEXTJS_ROUTES = [
67
67
  ];
68
68
 
69
69
  // src/utils.ts
70
+ var import_node_process = __toESM(require("process"), 1);
71
+ var import_local_pkg = require("local-pkg");
70
72
  async function interop(m) {
71
73
  const resolved = await m;
72
74
  return resolved.default || resolved;
@@ -1,4 +1,4 @@
1
- import { O as OverrideOptions, S as StylisticOptions, F as FlatConfigItem } from '../types-d6wL74Fv.cjs';
1
+ import { O as OverrideOptions, S as StylisticOptions, F as FlatConfigItem } from '../types-h9izbkUX.cjs';
2
2
  import 'eslint-config-flat-gitignore';
3
3
  import '@typescript-eslint/parser';
4
4
  import '@antfu/eslint-define-config';
@@ -1,4 +1,4 @@
1
- import { O as OverrideOptions, S as StylisticOptions, F as FlatConfigItem } from '../types-d6wL74Fv.js';
1
+ import { O as OverrideOptions, S as StylisticOptions, F as FlatConfigItem } from '../types-h9izbkUX.js';
2
2
  import 'eslint-config-flat-gitignore';
3
3
  import '@typescript-eslint/parser';
4
4
  import '@antfu/eslint-define-config';
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  yaml
3
- } from "../chunk-UTGBMMZF.mjs";
3
+ } from "../chunk-M5WNLLBT.mjs";
4
4
  import "../chunk-R4NSLRAE.mjs";
5
- import "../chunk-4VUK6ART.mjs";
5
+ import "../chunk-TQ476NL2.mjs";
6
6
  export {
7
7
  yaml
8
8
  };
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
  }
@@ -1446,16 +1473,27 @@ async function perfectionist(options = {}) {
1446
1473
  }
1447
1474
 
1448
1475
  // src/configs/unocss.ts
1449
- async function unocss() {
1476
+ async function unocss(options) {
1450
1477
  const pluginUnoCSS = await interop(import("@unocss/eslint-plugin"));
1478
+ const {
1479
+ attributify = false,
1480
+ overrides = {}
1481
+ } = options;
1451
1482
  return [
1452
1483
  {
1484
+ files: [
1485
+ GLOB_SRC
1486
+ ],
1453
1487
  name: "luxass:unocss",
1454
1488
  plugins: {
1455
1489
  "@unocss": pluginUnoCSS
1456
1490
  },
1457
1491
  rules: {
1458
- ...pluginUnoCSS.configs.recommended.rules
1492
+ "unocss/order": "error",
1493
+ ...attributify && { "unocss/attributify": "error" },
1494
+ "unocss/blocklist": "error",
1495
+ // overrides
1496
+ ...overrides
1459
1497
  }
1460
1498
  }
1461
1499
  ];
@@ -1465,14 +1503,18 @@ async function unocss() {
1465
1503
  var DEFAULT_TAILWIND_CALLEES = ["classnames", "clsx", "cx", "cn"];
1466
1504
  var DEFAULT_CLASS_REGEX = "^class(Name)?$";
1467
1505
  async function tailwindcss(options = {}) {
1468
- const pluginTailwindCSS = await interop(import("eslint-plugin-tailwindcss"));
1469
1506
  const {
1470
1507
  callees = DEFAULT_TAILWIND_CALLEES,
1471
1508
  classRegex = DEFAULT_CLASS_REGEX,
1472
1509
  config = void 0,
1473
1510
  nextjs: nextjs2,
1511
+ overrides,
1474
1512
  removeDuplicates = true
1475
1513
  } = options;
1514
+ await ensure([
1515
+ "eslint-plugin-tailwindcss"
1516
+ ]);
1517
+ const pluginTailwindCSS = await interop(import("eslint-plugin-tailwindcss"));
1476
1518
  const tailwindCSSCallee = callees ?? DEFAULT_TAILWIND_CALLEES;
1477
1519
  return [
1478
1520
  {
@@ -1491,7 +1533,9 @@ async function tailwindcss(options = {}) {
1491
1533
  "tailwindcss/migration-from-tailwind-2": ["warn"],
1492
1534
  "tailwindcss/no-arbitrary-value": ["off"],
1493
1535
  "tailwindcss/no-contradicting-classname": ["error"],
1494
- "tailwindcss/no-custom-classname": ["warn"]
1536
+ "tailwindcss/no-custom-classname": ["warn"],
1537
+ // overrides
1538
+ ...overrides
1495
1539
  },
1496
1540
  settings: {
1497
1541
  tailwindcss: {
@@ -1515,8 +1559,11 @@ async function tailwindcss(options = {}) {
1515
1559
 
1516
1560
  // src/configs/nextjs.ts
1517
1561
  async function nextjs(options = {}) {
1518
- const pluginNextjs = await interop(import("@next/eslint-plugin-next"));
1519
1562
  const { overrides, rootDir } = options;
1563
+ await ensure([
1564
+ "@next/eslint-plugin-next"
1565
+ ]);
1566
+ const pluginNextjs = await interop(import("@next/eslint-plugin-next"));
1520
1567
  return [
1521
1568
  {
1522
1569
  name: "luxass:nextjs:setup",
@@ -1568,7 +1615,8 @@ async function nextjs(options = {}) {
1568
1615
  files: GLOB_NEXTJS_ROUTES,
1569
1616
  name: "luxass:nextjs:default-export-override",
1570
1617
  rules: {
1571
- "import/prefer-default-export": "error"
1618
+ "import/prefer-default-export": "error",
1619
+ "react-refresh/only-export-components": "off"
1572
1620
  }
1573
1621
  },
1574
1622
  {
@@ -1586,6 +1634,17 @@ async function nextjs(options = {}) {
1586
1634
 
1587
1635
  // src/configs/react.ts
1588
1636
  async function react(options) {
1637
+ const {
1638
+ a11y = false,
1639
+ overrides = {},
1640
+ typescript: typescript2 = true
1641
+ } = options;
1642
+ await ensure([
1643
+ "eslint-plugin-react",
1644
+ "eslint-plugin-react-hooks",
1645
+ "eslint-plugin-react-refresh",
1646
+ ...options.a11y ? ["eslint-plugin-jsx-a11y"] : []
1647
+ ]);
1589
1648
  const [
1590
1649
  pluginReact,
1591
1650
  pluginReactHooks,
@@ -1597,11 +1656,6 @@ async function react(options) {
1597
1656
  interop(import("eslint-plugin-react-refresh")),
1598
1657
  ...options.a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
1599
1658
  ]);
1600
- const {
1601
- a11y = false,
1602
- overrides = {},
1603
- typescript: typescript2 = true
1604
- } = options;
1605
1659
  return [
1606
1660
  {
1607
1661
  name: "luxass:react:setup",
@@ -1853,6 +1907,16 @@ async function react(options) {
1853
1907
 
1854
1908
  // src/configs/astro.ts
1855
1909
  async function astro(options) {
1910
+ const {
1911
+ a11y = false,
1912
+ overrides = {}
1913
+ // typescript = true,
1914
+ } = options;
1915
+ await interop([
1916
+ "eslint-plugin-astro",
1917
+ "astro-eslint-parser",
1918
+ ...options.a11y ? ["eslint-plugin-jsx-a11y"] : []
1919
+ ]);
1856
1920
  const [
1857
1921
  pluginAstro,
1858
1922
  parserAstro,
@@ -1862,11 +1926,6 @@ async function astro(options) {
1862
1926
  interop(import("astro-eslint-parser")),
1863
1927
  ...options.a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
1864
1928
  ]);
1865
- const {
1866
- a11y = false,
1867
- overrides = {}
1868
- // typescript = true,
1869
- } = options;
1870
1929
  return [
1871
1930
  {
1872
1931
  name: "luxass:astro:setup",
@@ -1919,13 +1978,12 @@ async function astro(options) {
1919
1978
  }
1920
1979
 
1921
1980
  // src/factory.ts
1922
- var import_node_process2 = __toESM(require("process"), 1);
1981
+ var import_node_process3 = __toESM(require("process"), 1);
1923
1982
  var import_node_fs = require("fs");
1924
- var import_local_pkg = require("local-pkg");
1983
+ var import_local_pkg2 = require("local-pkg");
1925
1984
 
1926
1985
  // src/constants.ts
1927
1986
  var VUE_PACKAGES = ["vue", "nuxt", "vitepress", "@slidev/cli"];
1928
- var REACT_PACKAGES = ["react", "next", "react-dom"];
1929
1987
  var UNO_PACKAGES = ["unocss", "@unocss/webpack", "@unocss/nuxt"];
1930
1988
  var FLAT_CONFIG_PROPS = [
1931
1989
  "files",
@@ -1941,18 +1999,18 @@ var FLAT_CONFIG_PROPS = [
1941
1999
  // src/factory.ts
1942
2000
  async function luxass(options = {}, ...userConfigs) {
1943
2001
  const {
1944
- astro: enableAstro = (0, import_local_pkg.isPackageExists)("astro"),
2002
+ astro: enableAstro = (0, import_local_pkg2.isPackageExists)("astro"),
1945
2003
  componentExts = [],
1946
2004
  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"),
2005
+ isEditor = !!((import_node_process3.default.env.VSCODE_PID || import_node_process3.default.env.JETBRAINS_IDE) && !import_node_process3.default.env.CI),
2006
+ nextjs: enableNextJS = false,
1949
2007
  overrides = {},
1950
2008
  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))
2009
+ react: enableReact = false,
2010
+ tailwindcss: enableTailwindCSS = false,
2011
+ typescript: enableTypeScript = (0, import_local_pkg2.isPackageExists)("typescript"),
2012
+ unocss: enableUnoCSS = UNO_PACKAGES.some((i) => (0, import_local_pkg2.isPackageExists)(i)),
2013
+ vue: enableVue = VUE_PACKAGES.some((i) => (0, import_local_pkg2.isPackageExists)(i))
1956
2014
  } = options;
1957
2015
  const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? options.stylistic : {};
1958
2016
  if (stylisticOptions && !("jsx" in stylisticOptions)) {
@@ -2010,7 +2068,7 @@ async function luxass(options = {}, ...userConfigs) {
2010
2068
  })
2011
2069
  );
2012
2070
  }
2013
- if (enableReact) {
2071
+ if (enableReact || enableNextJS) {
2014
2072
  configs.push(
2015
2073
  react({
2016
2074
  ...typeof enableReact !== "boolean" ? enableReact : {},
@@ -2046,7 +2104,12 @@ async function luxass(options = {}, ...userConfigs) {
2046
2104
  );
2047
2105
  }
2048
2106
  if (enableUnoCSS) {
2049
- configs.push(unocss());
2107
+ configs.push(
2108
+ unocss({
2109
+ ...typeof enableUnoCSS !== "boolean" ? enableUnoCSS : {},
2110
+ overrides: overrides.unocss
2111
+ })
2112
+ );
2050
2113
  }
2051
2114
  if (enableTailwindCSS) {
2052
2115
  configs.push(tailwindcss({
@@ -2054,6 +2117,7 @@ async function luxass(options = {}, ...userConfigs) {
2054
2117
  classRegex: typeof enableTailwindCSS === "object" ? enableTailwindCSS.classRegex : "^class(Name)?$",
2055
2118
  config: typeof enableTailwindCSS === "object" ? enableTailwindCSS.config : void 0,
2056
2119
  nextjs: typeof enableNextJS === "object" ? true : enableNextJS,
2120
+ overrides: overrides.tailwindCSS,
2057
2121
  removeDuplicates: typeof enableTailwindCSS === "object" ? enableTailwindCSS.removeDuplicates : true
2058
2122
  }));
2059
2123
  }
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 { e as OptionsConfig, F as FlatConfigItem, A as Awaitable, f as UserConfigItem } from './types-h9izbkUX.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 { e as OptionsConfig, F as FlatConfigItem, A as Awaitable, f as UserConfigItem } from './types-h9izbkUX.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-O4O6V7LI.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-AL47KNVD.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-QZTI72NS.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))
@@ -186,7 +185,7 @@ async function luxass(options = {}, ...userConfigs) {
186
185
  })
187
186
  );
188
187
  }
189
- if (enableReact) {
188
+ if (enableReact || enableNextJS) {
190
189
  configs.push(
191
190
  react({
192
191
  ...typeof enableReact !== "boolean" ? enableReact : {},
@@ -222,7 +221,12 @@ async function luxass(options = {}, ...userConfigs) {
222
221
  );
223
222
  }
224
223
  if (enableUnoCSS) {
225
- configs.push(unocss());
224
+ configs.push(
225
+ unocss({
226
+ ...typeof enableUnoCSS !== "boolean" ? enableUnoCSS : {},
227
+ overrides: overrides.unocss
228
+ })
229
+ );
226
230
  }
227
231
  if (enableTailwindCSS) {
228
232
  configs.push(tailwindcss({
@@ -230,6 +234,7 @@ async function luxass(options = {}, ...userConfigs) {
230
234
  classRegex: typeof enableTailwindCSS === "object" ? enableTailwindCSS.classRegex : "^class(Name)?$",
231
235
  config: typeof enableTailwindCSS === "object" ? enableTailwindCSS.config : void 0,
232
236
  nextjs: typeof enableNextJS === "object" ? true : enableNextJS,
237
+ overrides: overrides.tailwindCSS,
233
238
  removeDuplicates: typeof enableTailwindCSS === "object" ? enableTailwindCSS.removeDuplicates : true
234
239
  }));
235
240
  }