@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
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-R4NSLRAE.mjs";
4
4
  import {
5
5
  interop
6
- } from "./chunk-4VUK6ART.mjs";
6
+ } from "./chunk-TQ476NL2.mjs";
7
7
 
8
8
  // src/configs/test.ts
9
9
  async function test(options = {}) {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-C5VMTRKT.mjs";
4
4
  import {
5
5
  interop
6
- } from "./chunk-4VUK6ART.mjs";
6
+ } from "./chunk-TQ476NL2.mjs";
7
7
 
8
8
  // src/configs/stylistic.ts
9
9
  async function stylistic(options = {}) {
@@ -0,0 +1,37 @@
1
+ import {
2
+ GLOB_SRC
3
+ } from "./chunk-R4NSLRAE.mjs";
4
+ import {
5
+ interop
6
+ } from "./chunk-TQ476NL2.mjs";
7
+
8
+ // src/configs/unocss.ts
9
+ async function unocss(options) {
10
+ const pluginUnoCSS = await interop(import("@unocss/eslint-plugin"));
11
+ const {
12
+ attributify = false,
13
+ overrides = {}
14
+ } = options;
15
+ return [
16
+ {
17
+ files: [
18
+ GLOB_SRC
19
+ ],
20
+ name: "luxass:unocss",
21
+ plugins: {
22
+ "@unocss": pluginUnoCSS
23
+ },
24
+ rules: {
25
+ "unocss/order": "error",
26
+ ...attributify && { "unocss/attributify": "error" },
27
+ "unocss/blocklist": "error",
28
+ // overrides
29
+ ...overrides
30
+ }
31
+ }
32
+ ];
33
+ }
34
+
35
+ export {
36
+ unocss
37
+ };
@@ -8,7 +8,7 @@ import {
8
8
  interop,
9
9
  renameRules,
10
10
  toArray
11
- } from "./chunk-4VUK6ART.mjs";
11
+ } from "./chunk-TQ476NL2.mjs";
12
12
 
13
13
  // src/configs/typescript.ts
14
14
  import process from "node:process";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-R4NSLRAE.mjs";
5
5
  import {
6
6
  interop
7
- } from "./chunk-4VUK6ART.mjs";
7
+ } from "./chunk-TQ476NL2.mjs";
8
8
 
9
9
  // src/configs/markdown.ts
10
10
  async function markdown(options = {}) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  interop
3
- } from "./chunk-4VUK6ART.mjs";
3
+ } from "./chunk-TQ476NL2.mjs";
4
4
 
5
5
  // src/configs/jsdoc.ts
6
6
  async function jsdoc(options = {}) {
@@ -3,10 +3,20 @@ import {
3
3
  } from "./chunk-R4NSLRAE.mjs";
4
4
  import {
5
5
  interop
6
- } from "./chunk-4VUK6ART.mjs";
6
+ } from "./chunk-TQ476NL2.mjs";
7
7
 
8
8
  // src/configs/astro.ts
9
9
  async function astro(options) {
10
+ const {
11
+ a11y = false,
12
+ overrides = {}
13
+ // typescript = true,
14
+ } = options;
15
+ await interop([
16
+ "eslint-plugin-astro",
17
+ "astro-eslint-parser",
18
+ ...options.a11y ? ["eslint-plugin-jsx-a11y"] : []
19
+ ]);
10
20
  const [
11
21
  pluginAstro,
12
22
  parserAstro,
@@ -16,11 +26,6 @@ async function astro(options) {
16
26
  interop(import("astro-eslint-parser")),
17
27
  ...options.a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
18
28
  ]);
19
- const {
20
- a11y = false,
21
- overrides = {}
22
- // typescript = true,
23
- } = options;
24
29
  return [
25
30
  {
26
31
  name: "luxass:astro:setup",
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-R4NSLRAE.mjs";
4
4
  import {
5
5
  interop
6
- } from "./chunk-4VUK6ART.mjs";
6
+ } from "./chunk-TQ476NL2.mjs";
7
7
 
8
8
  // src/configs/yaml.ts
9
9
  async function yaml(options = {}) {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-R4NSLRAE.mjs";
4
4
  import {
5
5
  interop
6
- } from "./chunk-4VUK6ART.mjs";
6
+ } from "./chunk-TQ476NL2.mjs";
7
7
 
8
8
  // src/configs/vue.ts
9
9
  async function vue(options = {}) {
@@ -3,21 +3,26 @@ import {
3
3
  GLOB_SRC
4
4
  } from "./chunk-R4NSLRAE.mjs";
5
5
  import {
6
+ ensure,
6
7
  interop
7
- } from "./chunk-4VUK6ART.mjs";
8
+ } from "./chunk-TQ476NL2.mjs";
8
9
 
9
10
  // src/configs/tailwindcss.ts
10
11
  var DEFAULT_TAILWIND_CALLEES = ["classnames", "clsx", "cx", "cn"];
11
12
  var DEFAULT_CLASS_REGEX = "^class(Name)?$";
12
13
  async function tailwindcss(options = {}) {
13
- const pluginTailwindCSS = await interop(import("eslint-plugin-tailwindcss"));
14
14
  const {
15
15
  callees = DEFAULT_TAILWIND_CALLEES,
16
16
  classRegex = DEFAULT_CLASS_REGEX,
17
17
  config = void 0,
18
18
  nextjs,
19
+ overrides,
19
20
  removeDuplicates = true
20
21
  } = options;
22
+ await ensure([
23
+ "eslint-plugin-tailwindcss"
24
+ ]);
25
+ const pluginTailwindCSS = await interop(import("eslint-plugin-tailwindcss"));
21
26
  const tailwindCSSCallee = callees ?? DEFAULT_TAILWIND_CALLEES;
22
27
  return [
23
28
  {
@@ -36,7 +41,9 @@ async function tailwindcss(options = {}) {
36
41
  "tailwindcss/migration-from-tailwind-2": ["warn"],
37
42
  "tailwindcss/no-arbitrary-value": ["off"],
38
43
  "tailwindcss/no-contradicting-classname": ["error"],
39
- "tailwindcss/no-custom-classname": ["warn"]
44
+ "tailwindcss/no-custom-classname": ["warn"],
45
+ // overrides
46
+ ...overrides
40
47
  },
41
48
  settings: {
42
49
  tailwindcss: {
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-R4NSLRAE.mjs";
6
6
  import {
7
7
  interop
8
- } from "./chunk-4VUK6ART.mjs";
8
+ } from "./chunk-TQ476NL2.mjs";
9
9
 
10
10
  // src/configs/jsonc.ts
11
11
  async function jsonc(options = {}) {
@@ -4,13 +4,17 @@ import {
4
4
  GLOB_SRC
5
5
  } from "./chunk-R4NSLRAE.mjs";
6
6
  import {
7
+ ensure,
7
8
  interop
8
- } from "./chunk-4VUK6ART.mjs";
9
+ } from "./chunk-TQ476NL2.mjs";
9
10
 
10
11
  // src/configs/nextjs.ts
11
12
  async function nextjs(options = {}) {
12
- const pluginNextjs = await interop(import("@next/eslint-plugin-next"));
13
13
  const { overrides, rootDir } = options;
14
+ await ensure([
15
+ "@next/eslint-plugin-next"
16
+ ]);
17
+ const pluginNextjs = await interop(import("@next/eslint-plugin-next"));
14
18
  return [
15
19
  {
16
20
  name: "luxass:nextjs:setup",
@@ -62,7 +66,8 @@ async function nextjs(options = {}) {
62
66
  files: GLOB_NEXTJS_ROUTES,
63
67
  name: "luxass:nextjs:default-export-override",
64
68
  rules: {
65
- "import/prefer-default-export": "error"
69
+ "import/prefer-default-export": "error",
70
+ "react-refresh/only-export-components": "off"
66
71
  }
67
72
  },
68
73
  {
@@ -0,0 +1,57 @@
1
+ // src/utils.ts
2
+ import process from "node:process";
3
+ import { isPackageExists } from "local-pkg";
4
+ async function combine(...configs) {
5
+ const resolved = await Promise.all(configs);
6
+ return resolved.flat();
7
+ }
8
+ function renameRules(rules, from, to) {
9
+ return Object.fromEntries(
10
+ Object.entries(rules).map(([key, value]) => {
11
+ if (key.startsWith(from)) {
12
+ return [to + key.slice(from.length), value];
13
+ }
14
+ return [key, value];
15
+ })
16
+ );
17
+ }
18
+ function toArray(value) {
19
+ return Array.isArray(value) ? value : [value];
20
+ }
21
+ async function interop(m) {
22
+ const resolved = await m;
23
+ return resolved.default || resolved;
24
+ }
25
+ async function ensure(packages) {
26
+ if (process.env.CI || process.stdout.isTTY === false) {
27
+ return;
28
+ }
29
+ ;
30
+ const nonExistingPackages = packages.filter((i) => !isPackageExists(i));
31
+ if (nonExistingPackages.length === 0) {
32
+ return;
33
+ }
34
+ ;
35
+ const { default: prompts } = await import("prompts");
36
+ const { result } = await prompts([
37
+ {
38
+ message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`,
39
+ name: "result",
40
+ type: "confirm"
41
+ }
42
+ ]);
43
+ if (result) {
44
+ await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, {
45
+ dev: true
46
+ }));
47
+ }
48
+ ;
49
+ }
50
+
51
+ export {
52
+ combine,
53
+ renameRules,
54
+ toArray,
55
+ interop,
56
+ ensure
57
+ };
@@ -2,11 +2,23 @@ import {
2
2
  GLOB_JSX
3
3
  } from "./chunk-R4NSLRAE.mjs";
4
4
  import {
5
+ ensure,
5
6
  interop
6
- } from "./chunk-4VUK6ART.mjs";
7
+ } from "./chunk-TQ476NL2.mjs";
7
8
 
8
9
  // src/configs/react.ts
9
10
  async function react(options) {
11
+ const {
12
+ a11y = false,
13
+ overrides = {},
14
+ typescript = true
15
+ } = options;
16
+ await ensure([
17
+ "eslint-plugin-react",
18
+ "eslint-plugin-react-hooks",
19
+ "eslint-plugin-react-refresh",
20
+ ...options.a11y ? ["eslint-plugin-jsx-a11y"] : []
21
+ ]);
10
22
  const [
11
23
  pluginReact,
12
24
  pluginReactHooks,
@@ -18,11 +30,6 @@ async function react(options) {
18
30
  interop(import("eslint-plugin-react-refresh")),
19
31
  ...options.a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
20
32
  ]);
21
- const {
22
- a11y = false,
23
- overrides = {},
24
- typescript = true
25
- } = options;
26
33
  return [
27
34
  {
28
35
  name: "luxass:react:setup",
@@ -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;
@@ -74,6 +76,16 @@ async function interop(m) {
74
76
 
75
77
  // src/configs/astro.ts
76
78
  async function astro(options) {
79
+ const {
80
+ a11y = false,
81
+ overrides = {}
82
+ // typescript = true,
83
+ } = options;
84
+ await interop([
85
+ "eslint-plugin-astro",
86
+ "astro-eslint-parser",
87
+ ...options.a11y ? ["eslint-plugin-jsx-a11y"] : []
88
+ ]);
77
89
  const [
78
90
  pluginAstro,
79
91
  parserAstro,
@@ -83,11 +95,6 @@ async function astro(options) {
83
95
  interop(import("astro-eslint-parser")),
84
96
  ...options.a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
85
97
  ]);
86
- const {
87
- a11y = false,
88
- overrides = {}
89
- // typescript = true,
90
- } = options;
91
98
  return [
92
99
  {
93
100
  name: "luxass:astro:setup",
@@ -1,4 +1,4 @@
1
- import { C as ConfigurationOptions, O as OverrideOptions, R as ReactOptions, F as FlatConfigItem } from '../types-d6wL74Fv.cjs';
1
+ import { C as ConfigurationOptions, O as OverrideOptions, R as ReactOptions, 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, R as ReactOptions, F as FlatConfigItem } from '../types-d6wL74Fv.js';
1
+ import { C as ConfigurationOptions, O as OverrideOptions, R as ReactOptions, 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
  astro
3
- } from "../chunk-6B53AW4K.mjs";
3
+ } from "../chunk-LQLF2CMA.mjs";
4
4
  import "../chunk-R4NSLRAE.mjs";
5
- import "../chunk-4VUK6ART.mjs";
5
+ import "../chunk-TQ476NL2.mjs";
6
6
  export {
7
7
  astro
8
8
  };
@@ -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';
@@ -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';
@@ -1,4 +1,4 @@
1
- import { S as StylisticOptions, F as FlatConfigItem } from '../types-d6wL74Fv.cjs';
1
+ import { 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 { S as StylisticOptions, F as FlatConfigItem } from '../types-d6wL74Fv.js';
1
+ import { 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';
@@ -449,6 +449,8 @@ async function javascript(options = {}) {
449
449
  }
450
450
 
451
451
  // src/utils.ts
452
+ var import_node_process = __toESM(require("process"), 1);
453
+ var import_local_pkg = require("local-pkg");
452
454
  function renameRules(rules, from, to) {
453
455
  return Object.fromEntries(
454
456
  Object.entries(rules).map(([key, value]) => {
@@ -466,6 +468,31 @@ async function interop(m) {
466
468
  const resolved = await m;
467
469
  return resolved.default || resolved;
468
470
  }
471
+ async function ensure(packages) {
472
+ if (import_node_process.default.env.CI || import_node_process.default.stdout.isTTY === false) {
473
+ return;
474
+ }
475
+ ;
476
+ const nonExistingPackages = packages.filter((i) => !(0, import_local_pkg.isPackageExists)(i));
477
+ if (nonExistingPackages.length === 0) {
478
+ return;
479
+ }
480
+ ;
481
+ const { default: prompts } = await import("prompts");
482
+ const { result } = await prompts([
483
+ {
484
+ message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`,
485
+ name: "result",
486
+ type: "confirm"
487
+ }
488
+ ]);
489
+ if (result) {
490
+ await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, {
491
+ dev: true
492
+ }));
493
+ }
494
+ ;
495
+ }
469
496
 
470
497
  // src/configs/jsdoc.ts
471
498
  async function jsdoc(options = {}) {
@@ -920,7 +947,7 @@ async function stylistic(options = {}) {
920
947
  }
921
948
 
922
949
  // src/configs/typescript.ts
923
- var import_node_process = __toESM(require("process"), 1);
950
+ var import_node_process2 = __toESM(require("process"), 1);
924
951
  async function typescript(options) {
925
952
  const {
926
953
  componentExts = [],
@@ -974,7 +1001,7 @@ async function typescript(options) {
974
1001
  sourceType: "module",
975
1002
  ...tsconfigPath ? {
976
1003
  project: tsconfigPath,
977
- tsconfigRootDir: import_node_process.default.cwd()
1004
+ tsconfigRootDir: import_node_process2.default.cwd()
978
1005
  } : {},
979
1006
  ...parserOptions
980
1007
  }
@@ -1412,16 +1439,27 @@ async function perfectionist(options = {}) {
1412
1439
  }
1413
1440
 
1414
1441
  // src/configs/unocss.ts
1415
- async function unocss() {
1442
+ async function unocss(options) {
1416
1443
  const pluginUnoCSS = await interop(import("@unocss/eslint-plugin"));
1444
+ const {
1445
+ attributify = false,
1446
+ overrides = {}
1447
+ } = options;
1417
1448
  return [
1418
1449
  {
1450
+ files: [
1451
+ GLOB_SRC
1452
+ ],
1419
1453
  name: "luxass:unocss",
1420
1454
  plugins: {
1421
1455
  "@unocss": pluginUnoCSS
1422
1456
  },
1423
1457
  rules: {
1424
- ...pluginUnoCSS.configs.recommended.rules
1458
+ "unocss/order": "error",
1459
+ ...attributify && { "unocss/attributify": "error" },
1460
+ "unocss/blocklist": "error",
1461
+ // overrides
1462
+ ...overrides
1425
1463
  }
1426
1464
  }
1427
1465
  ];
@@ -1431,14 +1469,18 @@ async function unocss() {
1431
1469
  var DEFAULT_TAILWIND_CALLEES = ["classnames", "clsx", "cx", "cn"];
1432
1470
  var DEFAULT_CLASS_REGEX = "^class(Name)?$";
1433
1471
  async function tailwindcss(options = {}) {
1434
- const pluginTailwindCSS = await interop(import("eslint-plugin-tailwindcss"));
1435
1472
  const {
1436
1473
  callees = DEFAULT_TAILWIND_CALLEES,
1437
1474
  classRegex = DEFAULT_CLASS_REGEX,
1438
1475
  config = void 0,
1439
1476
  nextjs: nextjs2,
1477
+ overrides,
1440
1478
  removeDuplicates = true
1441
1479
  } = options;
1480
+ await ensure([
1481
+ "eslint-plugin-tailwindcss"
1482
+ ]);
1483
+ const pluginTailwindCSS = await interop(import("eslint-plugin-tailwindcss"));
1442
1484
  const tailwindCSSCallee = callees ?? DEFAULT_TAILWIND_CALLEES;
1443
1485
  return [
1444
1486
  {
@@ -1457,7 +1499,9 @@ async function tailwindcss(options = {}) {
1457
1499
  "tailwindcss/migration-from-tailwind-2": ["warn"],
1458
1500
  "tailwindcss/no-arbitrary-value": ["off"],
1459
1501
  "tailwindcss/no-contradicting-classname": ["error"],
1460
- "tailwindcss/no-custom-classname": ["warn"]
1502
+ "tailwindcss/no-custom-classname": ["warn"],
1503
+ // overrides
1504
+ ...overrides
1461
1505
  },
1462
1506
  settings: {
1463
1507
  tailwindcss: {
@@ -1481,8 +1525,11 @@ async function tailwindcss(options = {}) {
1481
1525
 
1482
1526
  // src/configs/nextjs.ts
1483
1527
  async function nextjs(options = {}) {
1484
- const pluginNextjs = await interop(import("@next/eslint-plugin-next"));
1485
1528
  const { overrides, rootDir } = options;
1529
+ await ensure([
1530
+ "@next/eslint-plugin-next"
1531
+ ]);
1532
+ const pluginNextjs = await interop(import("@next/eslint-plugin-next"));
1486
1533
  return [
1487
1534
  {
1488
1535
  name: "luxass:nextjs:setup",
@@ -1534,7 +1581,8 @@ async function nextjs(options = {}) {
1534
1581
  files: GLOB_NEXTJS_ROUTES,
1535
1582
  name: "luxass:nextjs:default-export-override",
1536
1583
  rules: {
1537
- "import/prefer-default-export": "error"
1584
+ "import/prefer-default-export": "error",
1585
+ "react-refresh/only-export-components": "off"
1538
1586
  }
1539
1587
  },
1540
1588
  {
@@ -1552,6 +1600,17 @@ async function nextjs(options = {}) {
1552
1600
 
1553
1601
  // src/configs/react.ts
1554
1602
  async function react(options) {
1603
+ const {
1604
+ a11y = false,
1605
+ overrides = {},
1606
+ typescript: typescript2 = true
1607
+ } = options;
1608
+ await ensure([
1609
+ "eslint-plugin-react",
1610
+ "eslint-plugin-react-hooks",
1611
+ "eslint-plugin-react-refresh",
1612
+ ...options.a11y ? ["eslint-plugin-jsx-a11y"] : []
1613
+ ]);
1555
1614
  const [
1556
1615
  pluginReact,
1557
1616
  pluginReactHooks,
@@ -1563,11 +1622,6 @@ async function react(options) {
1563
1622
  interop(import("eslint-plugin-react-refresh")),
1564
1623
  ...options.a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
1565
1624
  ]);
1566
- const {
1567
- a11y = false,
1568
- overrides = {},
1569
- typescript: typescript2 = true
1570
- } = options;
1571
1625
  return [
1572
1626
  {
1573
1627
  name: "luxass:react:setup",
@@ -1819,6 +1873,16 @@ async function react(options) {
1819
1873
 
1820
1874
  // src/configs/astro.ts
1821
1875
  async function astro(options) {
1876
+ const {
1877
+ a11y = false,
1878
+ overrides = {}
1879
+ // typescript = true,
1880
+ } = options;
1881
+ await interop([
1882
+ "eslint-plugin-astro",
1883
+ "astro-eslint-parser",
1884
+ ...options.a11y ? ["eslint-plugin-jsx-a11y"] : []
1885
+ ]);
1822
1886
  const [
1823
1887
  pluginAstro,
1824
1888
  parserAstro,
@@ -1828,11 +1892,6 @@ async function astro(options) {
1828
1892
  interop(import("astro-eslint-parser")),
1829
1893
  ...options.a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
1830
1894
  ]);
1831
- const {
1832
- a11y = false,
1833
- overrides = {}
1834
- // typescript = true,
1835
- } = options;
1836
1895
  return [
1837
1896
  {
1838
1897
  name: "luxass:astro:setup",
@@ -19,7 +19,7 @@ export { tailwindcss } from './tailwindcss.cjs';
19
19
  export { nextjs } from './nextjs.cjs';
20
20
  export { react } from './react.cjs';
21
21
  export { astro } from './astro.cjs';
22
- import '../types-d6wL74Fv.cjs';
22
+ import '../types-h9izbkUX.cjs';
23
23
  import 'eslint-config-flat-gitignore';
24
24
  import '@typescript-eslint/parser';
25
25
  import '@antfu/eslint-define-config';
@@ -19,7 +19,7 @@ export { tailwindcss } from './tailwindcss.js';
19
19
  export { nextjs } from './nextjs.js';
20
20
  export { react } from './react.js';
21
21
  export { astro } from './astro.js';
22
- import '../types-d6wL74Fv.js';
22
+ import '../types-h9izbkUX.js';
23
23
  import 'eslint-config-flat-gitignore';
24
24
  import '@typescript-eslint/parser';
25
25
  import '@antfu/eslint-define-config';