@luxass/eslint-config 4.2.6 → 4.2.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 (134) hide show
  1. package/README.md +4 -5
  2. package/dist/index.cjs +165 -446
  3. package/dist/index.d.cts +733 -12
  4. package/dist/index.d.ts +733 -12
  5. package/dist/{configs/index.cjs → index.js} +308 -516
  6. package/package.json +51 -85
  7. package/dist/chunk-2IR43M6N.mjs +0 -48
  8. package/dist/chunk-47ISSTHW.mjs +0 -291
  9. package/dist/chunk-4YBQZLPS.mjs +0 -68
  10. package/dist/chunk-4YT54JFZ.mjs +0 -48
  11. package/dist/chunk-5NK24IKQ.mjs +0 -26
  12. package/dist/chunk-AJS3TMZE.mjs +0 -63
  13. package/dist/chunk-C6FE5KXJ.mjs +0 -104
  14. package/dist/chunk-DAJA5AV3.mjs +0 -29
  15. package/dist/chunk-DCOLHWHC.mjs +0 -269
  16. package/dist/chunk-E4RVBKZB.mjs +0 -207
  17. package/dist/chunk-HZNHG5PB.mjs +0 -45
  18. package/dist/chunk-KOXCJL3C.mjs +0 -109
  19. package/dist/chunk-PFCAWBCD.mjs +0 -93
  20. package/dist/chunk-PFYV2TWZ.mjs +0 -117
  21. package/dist/chunk-QT6FHTFU.mjs +0 -92
  22. package/dist/chunk-RDZJT36Z.mjs +0 -57
  23. package/dist/chunk-RVSUTDCE.mjs +0 -57
  24. package/dist/chunk-TWAETZPX.mjs +0 -149
  25. package/dist/chunk-WSQOWO67.mjs +0 -16
  26. package/dist/chunk-XBASVDU6.mjs +0 -215
  27. package/dist/chunk-XD3UVRU7.mjs +0 -274
  28. package/dist/chunk-XGI647GZ.mjs +0 -81
  29. package/dist/chunk-XMXYE5WC.mjs +0 -183
  30. package/dist/chunk-YNMFVYL6.mjs +0 -69
  31. package/dist/chunk-YO3IYQ2L.mjs +0 -220
  32. package/dist/chunk-YZCJUX6Z.mjs +0 -0
  33. package/dist/configs/comments.cjs +0 -63
  34. package/dist/configs/comments.d.cts +0 -15
  35. package/dist/configs/comments.d.ts +0 -15
  36. package/dist/configs/comments.mjs +0 -6
  37. package/dist/configs/css/tailwindcss.cjs +0 -148
  38. package/dist/configs/css/tailwindcss.d.cts +0 -11
  39. package/dist/configs/css/tailwindcss.d.ts +0 -11
  40. package/dist/configs/css/tailwindcss.mjs +0 -8
  41. package/dist/configs/css/unocss.cjs +0 -133
  42. package/dist/configs/css/unocss.d.cts +0 -11
  43. package/dist/configs/css/unocss.d.ts +0 -11
  44. package/dist/configs/css/unocss.mjs +0 -8
  45. package/dist/configs/data/json.cjs +0 -155
  46. package/dist/configs/data/json.d.cts +0 -11
  47. package/dist/configs/data/json.d.ts +0 -11
  48. package/dist/configs/data/json.mjs +0 -8
  49. package/dist/configs/data/toml.cjs +0 -131
  50. package/dist/configs/data/toml.d.cts +0 -11
  51. package/dist/configs/data/toml.d.ts +0 -11
  52. package/dist/configs/data/toml.mjs +0 -8
  53. package/dist/configs/data/yaml.cjs +0 -143
  54. package/dist/configs/data/yaml.d.cts +0 -11
  55. package/dist/configs/data/yaml.d.ts +0 -11
  56. package/dist/configs/data/yaml.mjs +0 -8
  57. package/dist/configs/docs/jsdoc.cjs +0 -85
  58. package/dist/configs/docs/jsdoc.d.cts +0 -27
  59. package/dist/configs/docs/jsdoc.d.ts +0 -27
  60. package/dist/configs/docs/jsdoc.mjs +0 -7
  61. package/dist/configs/docs/markdown.cjs +0 -164
  62. package/dist/configs/docs/markdown.d.cts +0 -35
  63. package/dist/configs/docs/markdown.d.ts +0 -35
  64. package/dist/configs/docs/markdown.mjs +0 -8
  65. package/dist/configs/formatters.cjs +0 -274
  66. package/dist/configs/formatters.d.cts +0 -11
  67. package/dist/configs/formatters.d.ts +0 -11
  68. package/dist/configs/formatters.mjs +0 -9
  69. package/dist/configs/frameworks/astro.cjs +0 -179
  70. package/dist/configs/frameworks/astro.d.cts +0 -11
  71. package/dist/configs/frameworks/astro.d.ts +0 -11
  72. package/dist/configs/frameworks/astro.mjs +0 -8
  73. package/dist/configs/frameworks/nextjs.cjs +0 -180
  74. package/dist/configs/frameworks/nextjs.d.cts +0 -11
  75. package/dist/configs/frameworks/nextjs.d.ts +0 -11
  76. package/dist/configs/frameworks/nextjs.mjs +0 -8
  77. package/dist/configs/frameworks/react.cjs +0 -377
  78. package/dist/configs/frameworks/react.d.cts +0 -11
  79. package/dist/configs/frameworks/react.d.ts +0 -11
  80. package/dist/configs/frameworks/react.mjs +0 -8
  81. package/dist/configs/frameworks/solid.cjs +0 -360
  82. package/dist/configs/frameworks/solid.d.cts +0 -11
  83. package/dist/configs/frameworks/solid.d.ts +0 -11
  84. package/dist/configs/frameworks/solid.mjs +0 -8
  85. package/dist/configs/frameworks/vue.cjs +0 -293
  86. package/dist/configs/frameworks/vue.d.cts +0 -11
  87. package/dist/configs/frameworks/vue.d.ts +0 -11
  88. package/dist/configs/frameworks/vue.mjs +0 -8
  89. package/dist/configs/ignores.cjs +0 -96
  90. package/dist/configs/ignores.d.cts +0 -15
  91. package/dist/configs/ignores.d.ts +0 -15
  92. package/dist/configs/ignores.mjs +0 -7
  93. package/dist/configs/imports.cjs +0 -104
  94. package/dist/configs/imports.d.cts +0 -23
  95. package/dist/configs/imports.d.ts +0 -23
  96. package/dist/configs/imports.mjs +0 -7
  97. package/dist/configs/index.d.cts +0 -19
  98. package/dist/configs/index.d.ts +0 -19
  99. package/dist/configs/index.mjs +0 -99
  100. package/dist/configs/javascript.cjs +0 -324
  101. package/dist/configs/javascript.d.cts +0 -11
  102. package/dist/configs/javascript.d.ts +0 -11
  103. package/dist/configs/javascript.mjs +0 -7
  104. package/dist/configs/node.cjs +0 -60
  105. package/dist/configs/node.d.cts +0 -15
  106. package/dist/configs/node.d.ts +0 -15
  107. package/dist/configs/node.mjs +0 -6
  108. package/dist/configs/sort.cjs +0 -240
  109. package/dist/configs/sort.d.cts +0 -26
  110. package/dist/configs/sort.d.ts +0 -26
  111. package/dist/configs/sort.mjs +0 -8
  112. package/dist/configs/stylistic.cjs +0 -98
  113. package/dist/configs/stylistic.d.cts +0 -11
  114. package/dist/configs/stylistic.d.ts +0 -11
  115. package/dist/configs/stylistic.mjs +0 -9
  116. package/dist/configs/test.cjs +0 -210
  117. package/dist/configs/test.d.cts +0 -11
  118. package/dist/configs/test.d.ts +0 -11
  119. package/dist/configs/test.mjs +0 -8
  120. package/dist/configs/typescript.cjs +0 -291
  121. package/dist/configs/typescript.d.cts +0 -11
  122. package/dist/configs/typescript.d.ts +0 -11
  123. package/dist/configs/typescript.mjs +0 -8
  124. package/dist/configs/unicorn.cjs +0 -91
  125. package/dist/configs/unicorn.d.cts +0 -15
  126. package/dist/configs/unicorn.d.ts +0 -15
  127. package/dist/configs/unicorn.mjs +0 -6
  128. package/dist/globs.cjs +0 -158
  129. package/dist/globs.d.cts +0 -28
  130. package/dist/globs.d.ts +0 -28
  131. package/dist/globs.mjs +0 -56
  132. package/dist/index.mjs +0 -278
  133. package/dist/types-HqEzZfQU.d.cts +0 -668
  134. package/dist/types-HqEzZfQU.d.ts +0 -668
package/dist/globs.mjs DELETED
@@ -1,56 +0,0 @@
1
- import {
2
- GLOB_ASTRO,
3
- GLOB_CSS,
4
- GLOB_EXCLUDE,
5
- GLOB_HTML,
6
- GLOB_JS,
7
- GLOB_JSON,
8
- GLOB_JSON5,
9
- GLOB_JSONC,
10
- GLOB_JSX,
11
- GLOB_LESS,
12
- GLOB_MARKDOWN,
13
- GLOB_MARKDOWN_CODE,
14
- GLOB_MARKDOWN_IN_MARKDOWN,
15
- GLOB_NEXTJS_OG,
16
- GLOB_NEXTJS_ROUTES,
17
- GLOB_POSTCSS,
18
- GLOB_SCSS,
19
- GLOB_SRC,
20
- GLOB_SRC_EXT,
21
- GLOB_STYLE,
22
- GLOB_TESTS,
23
- GLOB_TOML,
24
- GLOB_TS,
25
- GLOB_TSX,
26
- GLOB_VUE,
27
- GLOB_YAML
28
- } from "./chunk-KOXCJL3C.mjs";
29
- export {
30
- GLOB_ASTRO,
31
- GLOB_CSS,
32
- GLOB_EXCLUDE,
33
- GLOB_HTML,
34
- GLOB_JS,
35
- GLOB_JSON,
36
- GLOB_JSON5,
37
- GLOB_JSONC,
38
- GLOB_JSX,
39
- GLOB_LESS,
40
- GLOB_MARKDOWN,
41
- GLOB_MARKDOWN_CODE,
42
- GLOB_MARKDOWN_IN_MARKDOWN,
43
- GLOB_NEXTJS_OG,
44
- GLOB_NEXTJS_ROUTES,
45
- GLOB_POSTCSS,
46
- GLOB_SCSS,
47
- GLOB_SRC,
48
- GLOB_SRC_EXT,
49
- GLOB_STYLE,
50
- GLOB_TESTS,
51
- GLOB_TOML,
52
- GLOB_TS,
53
- GLOB_TSX,
54
- GLOB_VUE,
55
- GLOB_YAML
56
- };
package/dist/index.mjs DELETED
@@ -1,278 +0,0 @@
1
- import "./chunk-YZCJUX6Z.mjs";
2
- import {
3
- solid
4
- } from "./chunk-XD3UVRU7.mjs";
5
- import {
6
- vue
7
- } from "./chunk-E4RVBKZB.mjs";
8
- import {
9
- jsonc
10
- } from "./chunk-PFCAWBCD.mjs";
11
- import {
12
- toml
13
- } from "./chunk-YNMFVYL6.mjs";
14
- import {
15
- yaml
16
- } from "./chunk-XGI647GZ.mjs";
17
- import {
18
- jsdoc
19
- } from "./chunk-HZNHG5PB.mjs";
20
- import {
21
- markdown
22
- } from "./chunk-C6FE5KXJ.mjs";
23
- import {
24
- astro
25
- } from "./chunk-PFYV2TWZ.mjs";
26
- import {
27
- nextjs
28
- } from "./chunk-QT6FHTFU.mjs";
29
- import {
30
- react
31
- } from "./chunk-47ISSTHW.mjs";
32
- import {
33
- node
34
- } from "./chunk-5NK24IKQ.mjs";
35
- import {
36
- sortPackageJson,
37
- sortTsconfig
38
- } from "./chunk-XBASVDU6.mjs";
39
- import {
40
- test
41
- } from "./chunk-TWAETZPX.mjs";
42
- import {
43
- typescript
44
- } from "./chunk-YO3IYQ2L.mjs";
45
- import {
46
- unicorn
47
- } from "./chunk-RVSUTDCE.mjs";
48
- import {
49
- tailwindcss
50
- } from "./chunk-AJS3TMZE.mjs";
51
- import {
52
- unocss
53
- } from "./chunk-2IR43M6N.mjs";
54
- import {
55
- comments
56
- } from "./chunk-DAJA5AV3.mjs";
57
- import {
58
- formatters
59
- } from "./chunk-XMXYE5WC.mjs";
60
- import {
61
- stylistic
62
- } from "./chunk-RDZJT36Z.mjs";
63
- import {
64
- combine,
65
- getOverrides,
66
- interop,
67
- resolveSubOptions
68
- } from "./chunk-4YBQZLPS.mjs";
69
- import {
70
- ignores
71
- } from "./chunk-WSQOWO67.mjs";
72
- import {
73
- imports
74
- } from "./chunk-4YT54JFZ.mjs";
75
- import {
76
- javascript
77
- } from "./chunk-DCOLHWHC.mjs";
78
- import "./chunk-KOXCJL3C.mjs";
79
-
80
- // src/factory.ts
81
- import process from "node:process";
82
- import { existsSync } from "node:fs";
83
- import { isPackageExists } from "local-pkg";
84
- var FLAT_CONFIG_PROPS = [
85
- "name",
86
- "files",
87
- "ignores",
88
- "languageOptions",
89
- "linterOptions",
90
- "processor",
91
- "plugins",
92
- "rules",
93
- "settings"
94
- ];
95
- async function luxass(options = {}, ...userConfigs) {
96
- const {
97
- astro: enableAstro = false,
98
- editor = !!((process.env.VSCODE_PID || process.env.JETBRAINS_IDE || process.env.VIM) && !process.env.CI),
99
- exts = [],
100
- gitignore: enableGitignore = true,
101
- nextjs: enableNextJS = false,
102
- react: enableReact = false,
103
- solid: enableSolid = false,
104
- tailwindcss: enableTailwindCSS = false,
105
- typescript: enableTypeScript = isPackageExists("typescript"),
106
- unocss: enableUnoCSS = false,
107
- vue: enableVue = false
108
- } = options;
109
- const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? options.stylistic : {};
110
- if (stylisticOptions && !("jsx" in stylisticOptions)) {
111
- stylisticOptions.jsx = options.jsx ?? true;
112
- }
113
- const configs = [];
114
- if (enableGitignore) {
115
- if (typeof enableGitignore !== "boolean") {
116
- configs.push(interop(import("eslint-config-flat-gitignore")).then((plugin) => [plugin(enableGitignore)]));
117
- } else {
118
- if (existsSync(".gitignore")) {
119
- configs.push(interop(import("eslint-config-flat-gitignore")).then((plugin) => [plugin()]));
120
- }
121
- }
122
- }
123
- configs.push(
124
- ignores(),
125
- javascript({
126
- editor,
127
- overrides: getOverrides(options, "javascript")
128
- }),
129
- comments(),
130
- node(),
131
- jsdoc({
132
- stylistic: stylisticOptions
133
- }),
134
- imports({
135
- stylistic: stylisticOptions
136
- }),
137
- unicorn()
138
- );
139
- if (enableVue) {
140
- exts.push("vue");
141
- }
142
- if (enableTypeScript) {
143
- configs.push(typescript({
144
- ...resolveSubOptions(options, "typescript"),
145
- exts,
146
- overrides: getOverrides(options, "typescript")
147
- }));
148
- }
149
- if (stylisticOptions) {
150
- configs.push(stylistic({
151
- ...stylisticOptions,
152
- overrides: getOverrides(options, "stylistic")
153
- }));
154
- }
155
- if (options.test ?? true) {
156
- configs.push(test({
157
- editor,
158
- overrides: getOverrides(options, "test")
159
- }));
160
- }
161
- if (enableReact || enableNextJS) {
162
- configs.push(react({
163
- overrides: getOverrides(options, "react"),
164
- typescript: !!enableTypeScript
165
- }));
166
- }
167
- if (enableNextJS) {
168
- configs.push(
169
- nextjs({
170
- ...resolveSubOptions(options, "nextjs"),
171
- overrides: getOverrides(options, "nextjs")
172
- })
173
- );
174
- }
175
- if (enableSolid) {
176
- configs.push(
177
- // TODO: Analyze if this way is better for performance
178
- // await interop(import("./configs/solid")).then((plugin) => plugin.solid({
179
- // ...resolveSubOptions(options, "solid"),
180
- // overrides: getOverrides(options, "solid"),
181
- // typescript: !!enableTypeScript,
182
- // })),
183
- solid({
184
- ...resolveSubOptions(options, "solid"),
185
- overrides: getOverrides(options, "solid"),
186
- typescript: !!enableTypeScript
187
- })
188
- );
189
- }
190
- if (enableVue) {
191
- configs.push(
192
- vue({
193
- ...resolveSubOptions(options, "vue"),
194
- overrides: getOverrides(options, "vue"),
195
- stylistic: stylisticOptions,
196
- typescript: !!enableTypeScript
197
- })
198
- );
199
- }
200
- if (enableAstro) {
201
- configs.push(
202
- astro({
203
- ...resolveSubOptions(options, "astro"),
204
- overrides: getOverrides(options, "astro"),
205
- typescript: !!enableTypeScript
206
- })
207
- );
208
- }
209
- if (enableUnoCSS) {
210
- configs.push(unocss({
211
- ...resolveSubOptions(options, "unocss"),
212
- overrides: getOverrides(options, "unocss")
213
- }));
214
- }
215
- if (enableTailwindCSS) {
216
- configs.push(tailwindcss({
217
- ...resolveSubOptions(options, "tailwindcss"),
218
- overrides: getOverrides(options, "tailwindcss")
219
- }));
220
- }
221
- if (options.jsonc ?? true) {
222
- configs.push(
223
- jsonc({
224
- overrides: getOverrides(options, "jsonc"),
225
- stylistic: stylisticOptions
226
- }),
227
- sortPackageJson(),
228
- sortTsconfig()
229
- );
230
- }
231
- if (options.yaml ?? true) {
232
- configs.push(yaml({
233
- overrides: getOverrides(options, "yaml"),
234
- stylistic: stylisticOptions
235
- }));
236
- }
237
- if (options.toml ?? true) {
238
- configs.push(toml({
239
- overrides: getOverrides(options, "toml"),
240
- stylistic: stylisticOptions
241
- }));
242
- }
243
- if (options.markdown ?? true) {
244
- configs.push(
245
- markdown({
246
- exts,
247
- overrides: getOverrides(options, "markdown")
248
- })
249
- );
250
- }
251
- if (options.formatters) {
252
- configs.push(formatters(
253
- options.formatters,
254
- typeof stylisticOptions === "boolean" ? {} : stylisticOptions
255
- ));
256
- }
257
- const fusedConfig = FLAT_CONFIG_PROPS.reduce((acc, key) => {
258
- if (key in options) {
259
- acc[key] = options[key];
260
- }
261
- return acc;
262
- }, {});
263
- if (Object.keys(fusedConfig).length) {
264
- configs.push([fusedConfig]);
265
- }
266
- const merged = combine(
267
- ...configs,
268
- ...userConfigs
269
- );
270
- return merged;
271
- }
272
-
273
- // src/index.ts
274
- var src_default = luxass;
275
- export {
276
- src_default as default,
277
- luxass
278
- };