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

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 (149) hide show
  1. package/README.md +351 -48
  2. package/dist/{chunk-TQ476NL2.mjs → chunk-4YBQZLPS.mjs} +13 -2
  3. package/dist/{chunk-NDNDG7BH.mjs → chunk-5NK24IKQ.mjs} +2 -5
  4. package/dist/{chunk-2SW2E3TH.mjs → chunk-5SDSWPKR.mjs} +14 -4
  5. package/dist/chunk-6T7MXPCT.mjs +17 -0
  6. package/dist/{chunk-ADP4MYOS.mjs → chunk-ANUYBAYV.mjs} +1 -1
  7. package/dist/{chunk-R4NSLRAE.mjs → chunk-ATRL3UZP.mjs} +14 -8
  8. package/dist/{chunk-P3N5WLFL.mjs → chunk-BXBN56WI.mjs} +11 -7
  9. package/dist/chunk-CJ3ZUYUJ.mjs +183 -0
  10. package/dist/chunk-DAJA5AV3.mjs +29 -0
  11. package/dist/{chunk-FK567E7G.mjs → chunk-DVQQVCGF.mjs} +7 -3
  12. package/dist/chunk-DZCXT6HT.mjs +288 -0
  13. package/dist/chunk-FU5SRKZU.mjs +104 -0
  14. package/dist/{chunk-LQLF2CMA.mjs → chunk-GBLPCM3X.mjs} +14 -17
  15. package/dist/chunk-KJ7ZCBK4.mjs +48 -0
  16. package/dist/{chunk-BAKUP7QM.mjs → chunk-P3QUAOFO.mjs} +36 -34
  17. package/dist/{chunk-I2ECCPNN.mjs → chunk-PYS26PF3.mjs} +15 -10
  18. package/dist/chunk-Q57BF3CR.mjs +63 -0
  19. package/dist/{chunk-SPQZTV4E.mjs → chunk-QK56GX3F.mjs} +12 -14
  20. package/dist/{chunk-3QHLEAXK.mjs → chunk-RDZJT36Z.mjs} +22 -8
  21. package/dist/{chunk-HE56XDG6.mjs → chunk-RVSUTDCE.mjs} +15 -5
  22. package/dist/chunk-UMUUVFB7.mjs +69 -0
  23. package/dist/{chunk-NUG6FLHN.mjs → chunk-VZ2YFMWH.mjs} +54 -11
  24. package/dist/chunk-WDSV2EFG.mjs +7 -0
  25. package/dist/{chunk-M5WNLLBT.mjs → chunk-WOYZWHPM.mjs} +20 -7
  26. package/dist/chunk-WRURTO5T.mjs +144 -0
  27. package/dist/configs/astro.cjs +11 -21
  28. package/dist/configs/astro.d.cts +3 -6
  29. package/dist/configs/astro.d.ts +3 -6
  30. package/dist/configs/astro.mjs +3 -3
  31. package/dist/configs/comments.cjs +9 -12
  32. package/dist/configs/comments.d.cts +3 -2
  33. package/dist/configs/comments.d.ts +3 -2
  34. package/dist/configs/comments.mjs +1 -2
  35. package/dist/configs/formatters.cjs +274 -0
  36. package/dist/configs/formatters.d.cts +11 -0
  37. package/dist/configs/formatters.d.ts +11 -0
  38. package/dist/configs/formatters.mjs +9 -0
  39. package/dist/configs/ignores.cjs +1 -8
  40. package/dist/configs/ignores.d.cts +3 -2
  41. package/dist/configs/ignores.d.ts +3 -2
  42. package/dist/configs/ignores.mjs +2 -2
  43. package/dist/configs/imports.cjs +35 -9
  44. package/dist/configs/imports.d.cts +13 -4
  45. package/dist/configs/imports.d.ts +13 -4
  46. package/dist/configs/imports.mjs +2 -2
  47. package/dist/configs/index.cjs +1116 -707
  48. package/dist/configs/index.d.cts +7 -18
  49. package/dist/configs/index.d.ts +7 -18
  50. package/dist/configs/index.mjs +40 -36
  51. package/dist/configs/javascript.cjs +9 -23
  52. package/dist/configs/javascript.d.cts +3 -6
  53. package/dist/configs/javascript.d.ts +3 -6
  54. package/dist/configs/javascript.mjs +2 -3
  55. package/dist/configs/jsdoc.cjs +6 -2
  56. package/dist/configs/jsdoc.d.cts +17 -4
  57. package/dist/configs/jsdoc.d.ts +17 -4
  58. package/dist/configs/jsdoc.mjs +2 -2
  59. package/dist/configs/jsonc.cjs +8 -11
  60. package/dist/configs/jsonc.d.cts +3 -6
  61. package/dist/configs/jsonc.d.ts +3 -6
  62. package/dist/configs/jsonc.mjs +3 -3
  63. package/dist/configs/markdown.cjs +46 -35
  64. package/dist/configs/markdown.d.cts +25 -4
  65. package/dist/configs/markdown.d.ts +25 -4
  66. package/dist/configs/markdown.mjs +3 -3
  67. package/dist/configs/nextjs.cjs +15 -12
  68. package/dist/configs/nextjs.d.cts +3 -6
  69. package/dist/configs/nextjs.d.ts +3 -6
  70. package/dist/configs/nextjs.mjs +3 -3
  71. package/dist/configs/node.cjs +0 -10
  72. package/dist/configs/node.d.cts +3 -2
  73. package/dist/configs/node.d.ts +3 -2
  74. package/dist/configs/node.mjs +1 -2
  75. package/dist/configs/perfectionist.cjs +2 -20
  76. package/dist/configs/perfectionist.d.cts +4 -3
  77. package/dist/configs/perfectionist.d.ts +4 -3
  78. package/dist/configs/perfectionist.mjs +1 -2
  79. package/dist/configs/react.cjs +201 -203
  80. package/dist/configs/react.d.cts +3 -6
  81. package/dist/configs/react.d.ts +3 -6
  82. package/dist/configs/react.mjs +3 -3
  83. package/dist/configs/sort.cjs +6 -6
  84. package/dist/configs/sort.d.cts +3 -2
  85. package/dist/configs/sort.d.ts +3 -2
  86. package/dist/configs/sort.mjs +1 -1
  87. package/dist/configs/stylistic.cjs +20 -11
  88. package/dist/configs/stylistic.d.cts +4 -7
  89. package/dist/configs/stylistic.d.ts +4 -7
  90. package/dist/configs/stylistic.mjs +4 -3
  91. package/dist/configs/tailwindcss.cjs +34 -45
  92. package/dist/configs/tailwindcss.d.cts +3 -6
  93. package/dist/configs/tailwindcss.d.ts +3 -6
  94. package/dist/configs/tailwindcss.mjs +3 -3
  95. package/dist/configs/test.cjs +103 -16
  96. package/dist/configs/test.d.cts +3 -6
  97. package/dist/configs/test.d.ts +3 -6
  98. package/dist/configs/test.mjs +4 -3
  99. package/dist/configs/toml.cjs +131 -0
  100. package/dist/configs/toml.d.cts +11 -0
  101. package/dist/configs/toml.d.ts +11 -0
  102. package/dist/configs/toml.mjs +8 -0
  103. package/dist/configs/typescript.cjs +32 -43
  104. package/dist/configs/typescript.d.cts +3 -6
  105. package/dist/configs/typescript.d.ts +3 -6
  106. package/dist/configs/typescript.mjs +3 -4
  107. package/dist/configs/unicorn.cjs +13 -10
  108. package/dist/configs/unicorn.d.cts +3 -2
  109. package/dist/configs/unicorn.d.ts +3 -2
  110. package/dist/configs/unicorn.mjs +1 -2
  111. package/dist/configs/unocss.cjs +74 -4
  112. package/dist/configs/unocss.d.cts +3 -6
  113. package/dist/configs/unocss.d.ts +3 -6
  114. package/dist/configs/unocss.mjs +3 -2
  115. package/dist/configs/vue.cjs +51 -15
  116. package/dist/configs/vue.d.cts +3 -6
  117. package/dist/configs/vue.d.ts +3 -6
  118. package/dist/configs/vue.mjs +3 -3
  119. package/dist/configs/yaml.cjs +17 -11
  120. package/dist/configs/yaml.d.cts +3 -6
  121. package/dist/configs/yaml.d.ts +3 -6
  122. package/dist/configs/yaml.mjs +3 -3
  123. package/dist/custom-rules/utils.cjs +31 -0
  124. package/dist/custom-rules/utils.d.cts +6 -0
  125. package/dist/custom-rules/utils.d.ts +6 -0
  126. package/dist/custom-rules/utils.mjs +6 -0
  127. package/dist/globs.cjs +157 -0
  128. package/dist/globs.d.cts +28 -0
  129. package/dist/globs.d.ts +28 -0
  130. package/dist/globs.mjs +56 -0
  131. package/dist/index.cjs +1470 -1040
  132. package/dist/index.d.cts +10 -44
  133. package/dist/index.d.ts +10 -44
  134. package/dist/index.mjs +106 -140
  135. package/dist/types-spTEGSaV.d.cts +632 -0
  136. package/dist/types-spTEGSaV.d.ts +632 -0
  137. package/package.json +69 -37
  138. package/dist/chunk-24KJPXII.mjs +0 -51
  139. package/dist/chunk-4HH6LYJ6.mjs +0 -25
  140. package/dist/chunk-4JKENKIP.mjs +0 -67
  141. package/dist/chunk-C5VMTRKT.mjs +0 -18
  142. package/dist/chunk-CFSYEIE4.mjs +0 -23
  143. package/dist/chunk-ERFDRAGW.mjs +0 -86
  144. package/dist/chunk-HLDEUDLN.mjs +0 -28
  145. package/dist/chunk-UBPIYSHC.mjs +0 -284
  146. package/dist/types-fxhbVLKI.d.cts +0 -235
  147. package/dist/types-fxhbVLKI.d.ts +0 -235
  148. package/dist/{chunk-FKAOMYGL.mjs → chunk-ME2OAMS3.mjs} +0 -0
  149. package/dist/{chunk-FOIFEV73.mjs → chunk-XBASVDU6.mjs} +6 -6
package/dist/index.d.cts CHANGED
@@ -1,27 +1,15 @@
1
+ import { C as ConfigOptions, k as FlatConfigItem, l as Awaitable, m as UserConfigItem } from './types-spTEGSaV.cjs';
2
+ export { A as AstroOptions, F as FormattersOptions, b as JSONOptions, J as JavaScriptOptions, N as NextJSOptions, R as ReactOptions, S as StylisticConfig, c as StylisticOptions, 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, s as stylistic, g as tailwindcss, d as test, t as typescript, u as unocss, v as vue, y as yaml } from './types-spTEGSaV.cjs';
1
3
  export { comments } from './configs/comments.cjs';
4
+ export { unicorn } from './configs/unicorn.cjs';
2
5
  export { ignores } from './configs/ignores.cjs';
3
- export { imports } from './configs/imports.cjs';
4
- export { javascript } from './configs/javascript.cjs';
5
- export { jsdoc } from './configs/jsdoc.cjs';
6
- export { jsonc } from './configs/jsonc.cjs';
7
- export { markdown } from './configs/markdown.cjs';
8
6
  export { node } from './configs/node.cjs';
9
7
  export { sortPackageJson, sortTsconfig } from './configs/sort.cjs';
10
- export { stylistic } from './configs/stylistic.cjs';
11
- export { typescript } from './configs/typescript.cjs';
12
- export { unicorn } from './configs/unicorn.cjs';
13
- export { vue } from './configs/vue.cjs';
14
- export { yaml } from './configs/yaml.cjs';
15
- export { test } from './configs/test.cjs';
16
8
  export { perfectionist } from './configs/perfectionist.cjs';
17
- export { unocss } from './configs/unocss.cjs';
18
- export { tailwindcss } from './configs/tailwindcss.cjs';
19
- export { nextjs } from './configs/nextjs.cjs';
20
- export { react } from './configs/react.cjs';
21
- export { astro } from './configs/astro.cjs';
22
- import { f as OptionsConfig, F as FlatConfigItem, A as Awaitable, U as UserConfigItem } from './types-fxhbVLKI.cjs';
9
+ export { ImportsOptions, imports } from './configs/imports.cjs';
10
+ export { JSDOCOptions, jsdoc } from './configs/jsdoc.cjs';
11
+ export { MarkdownOptions, markdown } from './configs/markdown.cjs';
23
12
  import 'eslint-config-flat-gitignore';
24
- import '@typescript-eslint/parser';
25
13
  import '@antfu/eslint-define-config';
26
14
  import '@eslint-types/jsdoc/types';
27
15
  import '@eslint-types/typescript-eslint/types';
@@ -29,31 +17,9 @@ import '@eslint-types/unicorn/types';
29
17
  import 'eslint-plugin-antfu';
30
18
  import '@stylistic/eslint-plugin';
31
19
  import 'eslint';
20
+ import '@typescript-eslint/parser';
21
+ import 'eslint-processor-vue-blocks';
32
22
 
33
- declare function luxass(options?: OptionsConfig & FlatConfigItem, ...userConfigs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
34
-
35
- declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
36
- declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
37
- declare const GLOB_JS = "**/*.?([cm])js";
38
- declare const GLOB_TS = "**/*.?([cm])ts";
39
- declare const GLOB_JSX_EXT = "[jt]sx";
40
- declare const GLOB_JSX = "**/*.[jt]sx";
41
- declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
42
- declare const GLOB_CSS = "**/*.css";
43
- declare const GLOB_LESS = "**/*.less";
44
- declare const GLOB_SCSS = "**/*.scss";
45
- declare const GLOB_JSON = "**/*.json";
46
- declare const GLOB_JSON5 = "**/*.json5";
47
- declare const GLOB_JSONC = "**/*.jsonc";
48
- declare const GLOB_MARKDOWN = "**/*.md";
49
- declare const GLOB_VUE = "**/*.vue";
50
- declare const GLOB_YAML = "**/*.y?(a)ml";
51
- declare const GLOB_HTML = "**/*.htm?(l)";
52
- declare const GLOB_ASTRO = "**/*.astro";
53
- declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
54
- declare const GLOB_TESTS: string[];
55
- declare const GLOB_NEXTJS_OG: string[];
56
- declare const GLOB_NEXTJS_ROUTES: string[];
57
- declare const GLOB_EXCLUDE: string[];
23
+ declare function luxass(options?: ConfigOptions & FlatConfigItem, ...userConfigs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
58
24
 
59
- export { GLOB_ASTRO, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_JSX_EXT, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_NEXTJS_OG, GLOB_NEXTJS_ROUTES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_VUE, GLOB_YAML, luxass };
25
+ export { ConfigOptions, luxass as default, luxass };
package/dist/index.d.ts CHANGED
@@ -1,27 +1,15 @@
1
+ import { C as ConfigOptions, k as FlatConfigItem, l as Awaitable, m as UserConfigItem } from './types-spTEGSaV.js';
2
+ export { A as AstroOptions, F as FormattersOptions, b as JSONOptions, J as JavaScriptOptions, N as NextJSOptions, R as ReactOptions, S as StylisticConfig, c as StylisticOptions, 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, s as stylistic, g as tailwindcss, d as test, t as typescript, u as unocss, v as vue, y as yaml } from './types-spTEGSaV.js';
1
3
  export { comments } from './configs/comments.js';
4
+ export { unicorn } from './configs/unicorn.js';
2
5
  export { ignores } from './configs/ignores.js';
3
- export { imports } from './configs/imports.js';
4
- export { javascript } from './configs/javascript.js';
5
- export { jsdoc } from './configs/jsdoc.js';
6
- export { jsonc } from './configs/jsonc.js';
7
- export { markdown } from './configs/markdown.js';
8
6
  export { node } from './configs/node.js';
9
7
  export { sortPackageJson, sortTsconfig } from './configs/sort.js';
10
- export { stylistic } from './configs/stylistic.js';
11
- export { typescript } from './configs/typescript.js';
12
- export { unicorn } from './configs/unicorn.js';
13
- export { vue } from './configs/vue.js';
14
- export { yaml } from './configs/yaml.js';
15
- export { test } from './configs/test.js';
16
8
  export { perfectionist } from './configs/perfectionist.js';
17
- export { unocss } from './configs/unocss.js';
18
- export { tailwindcss } from './configs/tailwindcss.js';
19
- export { nextjs } from './configs/nextjs.js';
20
- export { react } from './configs/react.js';
21
- export { astro } from './configs/astro.js';
22
- import { f as OptionsConfig, F as FlatConfigItem, A as Awaitable, U as UserConfigItem } from './types-fxhbVLKI.js';
9
+ export { ImportsOptions, imports } from './configs/imports.js';
10
+ export { JSDOCOptions, jsdoc } from './configs/jsdoc.js';
11
+ export { MarkdownOptions, markdown } from './configs/markdown.js';
23
12
  import 'eslint-config-flat-gitignore';
24
- import '@typescript-eslint/parser';
25
13
  import '@antfu/eslint-define-config';
26
14
  import '@eslint-types/jsdoc/types';
27
15
  import '@eslint-types/typescript-eslint/types';
@@ -29,31 +17,9 @@ import '@eslint-types/unicorn/types';
29
17
  import 'eslint-plugin-antfu';
30
18
  import '@stylistic/eslint-plugin';
31
19
  import 'eslint';
20
+ import '@typescript-eslint/parser';
21
+ import 'eslint-processor-vue-blocks';
32
22
 
33
- declare function luxass(options?: OptionsConfig & FlatConfigItem, ...userConfigs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
34
-
35
- declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
36
- declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
37
- declare const GLOB_JS = "**/*.?([cm])js";
38
- declare const GLOB_TS = "**/*.?([cm])ts";
39
- declare const GLOB_JSX_EXT = "[jt]sx";
40
- declare const GLOB_JSX = "**/*.[jt]sx";
41
- declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
42
- declare const GLOB_CSS = "**/*.css";
43
- declare const GLOB_LESS = "**/*.less";
44
- declare const GLOB_SCSS = "**/*.scss";
45
- declare const GLOB_JSON = "**/*.json";
46
- declare const GLOB_JSON5 = "**/*.json5";
47
- declare const GLOB_JSONC = "**/*.jsonc";
48
- declare const GLOB_MARKDOWN = "**/*.md";
49
- declare const GLOB_VUE = "**/*.vue";
50
- declare const GLOB_YAML = "**/*.y?(a)ml";
51
- declare const GLOB_HTML = "**/*.htm?(l)";
52
- declare const GLOB_ASTRO = "**/*.astro";
53
- declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
54
- declare const GLOB_TESTS: string[];
55
- declare const GLOB_NEXTJS_OG: string[];
56
- declare const GLOB_NEXTJS_ROUTES: string[];
57
- declare const GLOB_EXCLUDE: string[];
23
+ declare function luxass(options?: ConfigOptions & FlatConfigItem, ...userConfigs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
58
24
 
59
- export { GLOB_ASTRO, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_JSX_EXT, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_NEXTJS_OG, GLOB_NEXTJS_ROUTES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_VUE, GLOB_YAML, luxass };
25
+ export { ConfigOptions, luxass as default, luxass };
package/dist/index.mjs CHANGED
@@ -1,98 +1,82 @@
1
- import "./chunk-FKAOMYGL.mjs";
1
+ import {
2
+ toml
3
+ } from "./chunk-UMUUVFB7.mjs";
4
+ import "./chunk-ME2OAMS3.mjs";
5
+ import {
6
+ vue
7
+ } from "./chunk-VZ2YFMWH.mjs";
8
+ import {
9
+ yaml
10
+ } from "./chunk-WOYZWHPM.mjs";
11
+ import {
12
+ sortPackageJson,
13
+ sortTsconfig
14
+ } from "./chunk-XBASVDU6.mjs";
2
15
  import {
3
16
  tailwindcss
4
- } from "./chunk-4JKENKIP.mjs";
17
+ } from "./chunk-Q57BF3CR.mjs";
5
18
  import {
6
19
  test
7
- } from "./chunk-24KJPXII.mjs";
20
+ } from "./chunk-WRURTO5T.mjs";
21
+ import "./chunk-WDSV2EFG.mjs";
8
22
  import {
9
23
  typescript
10
- } from "./chunk-BAKUP7QM.mjs";
24
+ } from "./chunk-P3QUAOFO.mjs";
11
25
  import {
12
26
  unicorn
13
- } from "./chunk-HE56XDG6.mjs";
27
+ } from "./chunk-RVSUTDCE.mjs";
14
28
  import {
15
29
  unocss
16
- } from "./chunk-CFSYEIE4.mjs";
30
+ } from "./chunk-KJ7ZCBK4.mjs";
17
31
  import {
18
- vue
19
- } from "./chunk-NUG6FLHN.mjs";
32
+ javascript
33
+ } from "./chunk-QK56GX3F.mjs";
20
34
  import {
21
- yaml
22
- } from "./chunk-M5WNLLBT.mjs";
35
+ jsdoc
36
+ } from "./chunk-DVQQVCGF.mjs";
23
37
  import {
24
38
  jsonc
25
- } from "./chunk-P3N5WLFL.mjs";
39
+ } from "./chunk-BXBN56WI.mjs";
26
40
  import {
27
41
  markdown
28
- } from "./chunk-ERFDRAGW.mjs";
42
+ } from "./chunk-FU5SRKZU.mjs";
29
43
  import {
30
44
  nextjs
31
- } from "./chunk-I2ECCPNN.mjs";
45
+ } from "./chunk-PYS26PF3.mjs";
32
46
  import {
33
47
  node
34
- } from "./chunk-NDNDG7BH.mjs";
48
+ } from "./chunk-5NK24IKQ.mjs";
35
49
  import {
36
50
  perfectionist
37
- } from "./chunk-HLDEUDLN.mjs";
51
+ } from "./chunk-6T7MXPCT.mjs";
38
52
  import {
39
53
  react
40
- } from "./chunk-UBPIYSHC.mjs";
41
- import {
42
- sortPackageJson,
43
- sortTsconfig
44
- } from "./chunk-FOIFEV73.mjs";
45
- import {
46
- stylistic
47
- } from "./chunk-3QHLEAXK.mjs";
54
+ } from "./chunk-DZCXT6HT.mjs";
48
55
  import {
49
56
  astro
50
- } from "./chunk-LQLF2CMA.mjs";
57
+ } from "./chunk-GBLPCM3X.mjs";
51
58
  import {
52
59
  comments
53
- } from "./chunk-4HH6LYJ6.mjs";
60
+ } from "./chunk-DAJA5AV3.mjs";
54
61
  import {
55
- ignores
56
- } from "./chunk-ADP4MYOS.mjs";
62
+ formatters
63
+ } from "./chunk-CJ3ZUYUJ.mjs";
57
64
  import {
58
- imports
59
- } from "./chunk-2SW2E3TH.mjs";
60
- import {
61
- javascript
62
- } from "./chunk-SPQZTV4E.mjs";
65
+ stylistic
66
+ } from "./chunk-RDZJT36Z.mjs";
63
67
  import {
64
- GLOB_ASTRO,
65
- GLOB_CSS,
66
- GLOB_EXCLUDE,
67
- GLOB_HTML,
68
- GLOB_JS,
69
- GLOB_JSON,
70
- GLOB_JSON5,
71
- GLOB_JSONC,
72
- GLOB_JSX,
73
- GLOB_JSX_EXT,
74
- GLOB_LESS,
75
- GLOB_MARKDOWN,
76
- GLOB_MARKDOWN_CODE,
77
- GLOB_NEXTJS_OG,
78
- GLOB_NEXTJS_ROUTES,
79
- GLOB_SCSS,
80
- GLOB_SRC,
81
- GLOB_SRC_EXT,
82
- GLOB_STYLE,
83
- GLOB_TESTS,
84
- GLOB_TS,
85
- GLOB_VUE,
86
- GLOB_YAML
87
- } from "./chunk-R4NSLRAE.mjs";
88
- import "./chunk-C5VMTRKT.mjs";
68
+ combine,
69
+ getOverrides,
70
+ interop,
71
+ resolveSubOptions
72
+ } from "./chunk-4YBQZLPS.mjs";
89
73
  import {
90
- jsdoc
91
- } from "./chunk-FK567E7G.mjs";
74
+ ignores
75
+ } from "./chunk-ANUYBAYV.mjs";
92
76
  import {
93
- combine,
94
- interop
95
- } from "./chunk-TQ476NL2.mjs";
77
+ imports
78
+ } from "./chunk-5SDSWPKR.mjs";
79
+ import "./chunk-ATRL3UZP.mjs";
96
80
 
97
81
  // src/factory.ts
98
82
  import process from "node:process";
@@ -101,7 +85,6 @@ import { isPackageExists } from "local-pkg";
101
85
 
102
86
  // src/constants.ts
103
87
  var VUE_PACKAGES = ["vue", "nuxt", "vitepress", "@slidev/cli"];
104
- var UNO_PACKAGES = ["unocss", "@unocss/webpack", "@unocss/nuxt"];
105
88
  var FLAT_CONFIG_PROPS = [
106
89
  "files",
107
90
  "ignores",
@@ -117,16 +100,14 @@ var FLAT_CONFIG_PROPS = [
117
100
  async function luxass(options = {}, ...userConfigs) {
118
101
  const {
119
102
  astro: enableAstro = isPackageExists("astro"),
120
- componentExts = [],
103
+ editor = !!((process.env.VSCODE_PID || process.env.JETBRAINS_IDE || process.env.VIM) && !process.env.CI),
104
+ exts = [],
121
105
  gitignore: enableGitignore = true,
122
- isEditor = !!((process.env.VSCODE_PID || process.env.JETBRAINS_IDE) && !process.env.CI),
123
106
  nextjs: enableNextJS = false,
124
- overrides = {},
125
- perfectionist: enablePerfectionistRules = false,
126
107
  react: enableReact = false,
127
108
  tailwindcss: enableTailwindCSS = false,
128
109
  typescript: enableTypeScript = isPackageExists("typescript"),
129
- unocss: enableUnoCSS = UNO_PACKAGES.some((i) => isPackageExists(i)),
110
+ unocss: enableUnoCSS = false,
130
111
  vue: enableVue = VUE_PACKAGES.some((i) => isPackageExists(i))
131
112
  } = options;
132
113
  const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? options.stylistic : {};
@@ -146,8 +127,8 @@ async function luxass(options = {}, ...userConfigs) {
146
127
  configs.push(
147
128
  ignores(),
148
129
  javascript({
149
- isEditor,
150
- overrides: overrides.javascript
130
+ editor,
131
+ overrides: getOverrides(options, "javascript")
151
132
  }),
152
133
  comments(),
153
134
  node(),
@@ -158,54 +139,46 @@ async function luxass(options = {}, ...userConfigs) {
158
139
  stylistic: stylisticOptions
159
140
  }),
160
141
  unicorn(),
161
- perfectionist({
162
- enableAllRules: enablePerfectionistRules
163
- })
142
+ perfectionist()
164
143
  );
165
144
  if (enableVue) {
166
- componentExts.push("vue");
145
+ exts.push("vue");
167
146
  }
168
147
  if (enableTypeScript) {
169
- configs.push(
170
- typescript({
171
- ...typeof enableTypeScript !== "boolean" ? enableTypeScript : {},
172
- componentExts,
173
- overrides: overrides.typescript
174
- })
175
- );
148
+ configs.push(typescript({
149
+ ...resolveSubOptions(options, "typescript"),
150
+ exts
151
+ }));
176
152
  }
177
153
  if (stylisticOptions) {
178
- configs.push(stylistic(stylisticOptions));
154
+ configs.push(stylistic({
155
+ ...stylisticOptions,
156
+ overrides: getOverrides(options, "stylistic")
157
+ }));
179
158
  }
180
159
  if (options.test ?? true) {
181
- configs.push(
182
- test({
183
- isEditor,
184
- overrides: overrides.test
185
- })
186
- );
160
+ configs.push(test({
161
+ editor,
162
+ overrides: getOverrides(options, "test")
163
+ }));
187
164
  }
188
165
  if (enableReact) {
189
- configs.push(
190
- react({
191
- ...typeof enableReact !== "boolean" ? enableReact : {},
192
- overrides: overrides.react,
193
- typescript: !!enableTypeScript
194
- })
195
- );
166
+ configs.push(react({
167
+ overrides: getOverrides(options, "react"),
168
+ typescript: !!enableTypeScript
169
+ }));
196
170
  }
197
171
  if (enableNextJS) {
198
172
  configs.push(
199
173
  nextjs({
200
- ...typeof enableNextJS !== "boolean" ? enableNextJS : {},
201
- overrides: overrides.nextjs
174
+ ...resolveSubOptions(options, "nextjs")
202
175
  })
203
176
  );
204
177
  }
205
178
  if (enableVue) {
206
179
  configs.push(
207
180
  vue({
208
- overrides: overrides.vue,
181
+ ...resolveSubOptions(options, "vue"),
209
182
  stylistic: stylisticOptions,
210
183
  typescript: !!enableTypeScript
211
184
  })
@@ -214,28 +187,27 @@ async function luxass(options = {}, ...userConfigs) {
214
187
  if (enableAstro) {
215
188
  configs.push(
216
189
  astro({
217
- ...typeof enableAstro !== "boolean" ? enableAstro : {},
218
- overrides: overrides.astro,
190
+ ...resolveSubOptions(options, "astro"),
219
191
  typescript: !!enableTypeScript
220
192
  })
221
193
  );
222
194
  }
223
195
  if (enableUnoCSS) {
224
- configs.push(unocss());
196
+ configs.push(unocss({
197
+ ...resolveSubOptions(options, "unocss"),
198
+ overrides: getOverrides(options, "unocss")
199
+ }));
225
200
  }
226
201
  if (enableTailwindCSS) {
227
202
  configs.push(tailwindcss({
228
- callees: typeof enableTailwindCSS === "object" ? enableTailwindCSS.callees : ["classnames", "clsx", "cx", "cn"],
229
- classRegex: typeof enableTailwindCSS === "object" ? enableTailwindCSS.classRegex : "^class(Name)?$",
230
- config: typeof enableTailwindCSS === "object" ? enableTailwindCSS.config : void 0,
231
- nextjs: typeof enableNextJS === "object" ? true : enableNextJS,
232
- removeDuplicates: typeof enableTailwindCSS === "object" ? enableTailwindCSS.removeDuplicates : true
203
+ ...resolveSubOptions(options, "tailwindcss"),
204
+ overrides: getOverrides(options, "tailwindcss")
233
205
  }));
234
206
  }
235
207
  if (options.jsonc ?? true) {
236
208
  configs.push(
237
209
  jsonc({
238
- overrides: overrides.jsonc,
210
+ overrides: getOverrides(options, "jsonc"),
239
211
  stylistic: stylisticOptions
240
212
  }),
241
213
  sortPackageJson(),
@@ -243,21 +215,33 @@ async function luxass(options = {}, ...userConfigs) {
243
215
  );
244
216
  }
245
217
  if (options.yaml ?? true) {
246
- configs.push(
247
- yaml({
248
- overrides: overrides.yaml,
249
- stylistic: stylisticOptions
250
- })
251
- );
218
+ configs.push(yaml({
219
+ overrides: getOverrides(options, "yaml"),
220
+ stylistic: stylisticOptions
221
+ }));
222
+ }
223
+ if (options.toml ?? true) {
224
+ configs.push(toml({
225
+ overrides: getOverrides(options, "toml"),
226
+ stylistic: stylisticOptions
227
+ }));
252
228
  }
253
229
  if (options.markdown ?? true) {
254
230
  configs.push(
255
- markdown({
256
- componentExts,
257
- overrides: overrides.markdown
258
- })
231
+ markdown(
232
+ {
233
+ exts,
234
+ overrides: getOverrides(options, "markdown")
235
+ }
236
+ )
259
237
  );
260
238
  }
239
+ if (options.formatters) {
240
+ configs.push(formatters(
241
+ options.formatters,
242
+ typeof stylisticOptions === "boolean" ? {} : stylisticOptions
243
+ ));
244
+ }
261
245
  const fusedConfig = FLAT_CONFIG_PROPS.reduce((acc, key) => {
262
246
  if (key in options) {
263
247
  acc[key] = options[key];
@@ -270,32 +254,14 @@ async function luxass(options = {}, ...userConfigs) {
270
254
  const merged = combine(...configs, ...userConfigs);
271
255
  return merged;
272
256
  }
257
+
258
+ // src/index.ts
259
+ var src_default = luxass;
273
260
  export {
274
- GLOB_ASTRO,
275
- GLOB_CSS,
276
- GLOB_EXCLUDE,
277
- GLOB_HTML,
278
- GLOB_JS,
279
- GLOB_JSON,
280
- GLOB_JSON5,
281
- GLOB_JSONC,
282
- GLOB_JSX,
283
- GLOB_JSX_EXT,
284
- GLOB_LESS,
285
- GLOB_MARKDOWN,
286
- GLOB_MARKDOWN_CODE,
287
- GLOB_NEXTJS_OG,
288
- GLOB_NEXTJS_ROUTES,
289
- GLOB_SCSS,
290
- GLOB_SRC,
291
- GLOB_SRC_EXT,
292
- GLOB_STYLE,
293
- GLOB_TESTS,
294
- GLOB_TS,
295
- GLOB_VUE,
296
- GLOB_YAML,
297
261
  astro,
298
262
  comments,
263
+ src_default as default,
264
+ formatters,
299
265
  ignores,
300
266
  imports,
301
267
  javascript,