@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
@@ -0,0 +1,632 @@
1
+ import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
2
+ import { FlatESLintConfigItem, MergeIntersection, RenamePrefix, VitestRules, YmlRules, NRules, Prefix, ReactHooksRules, ReactRules, ImportRules, EslintRules, JsoncRules, VueRules, EslintCommentsRules, RuleConfig } from '@antfu/eslint-define-config';
3
+ import { RuleOptions as RuleOptions$1 } from '@eslint-types/jsdoc/types';
4
+ import { RuleOptions } from '@eslint-types/typescript-eslint/types';
5
+ import { RuleOptions as RuleOptions$2 } from '@eslint-types/unicorn/types';
6
+ import { Rules as Rules$1 } from 'eslint-plugin-antfu';
7
+ import { StylisticCustomizeOptions, UnprefixedRuleOptions } from '@stylistic/eslint-plugin';
8
+ import { Linter } from 'eslint';
9
+ import { ParserOptions } from '@typescript-eslint/parser';
10
+ import { Options } from 'eslint-processor-vue-blocks';
11
+
12
+ type StylisticConfig = Pick<StylisticCustomizeOptions, "jsx" | "indent" | "quotes" | "semi">;
13
+ declare const StylisticConfigDefaults: StylisticConfig;
14
+ interface StylisticOptions {
15
+ /**
16
+ * Enable stylistic rules.
17
+ *
18
+ * @default true
19
+ */
20
+ stylistic?: boolean | StylisticConfig;
21
+ /**
22
+ * Overrides for the config.
23
+ */
24
+ overrides?: FlatConfigItem["rules"];
25
+ }
26
+ declare function stylistic(options?: StylisticOptions): Promise<FlatConfigItem[]>;
27
+
28
+ interface JavaScriptOptions {
29
+ /**
30
+ * Whether the config is for an editor.
31
+ * @default false
32
+ */
33
+ editor?: boolean;
34
+ /**
35
+ * Overrides for the config.
36
+ */
37
+ overrides?: FlatConfigItem["rules"];
38
+ }
39
+ declare function javascript(options?: JavaScriptOptions): Promise<FlatConfigItem[]>;
40
+
41
+ interface JSONOptions {
42
+ /**
43
+ * Override rules.
44
+ */
45
+ overrides?: FlatConfigItem["rules"];
46
+ /**
47
+ * Enable stylistic rules.
48
+ *
49
+ * @default true
50
+ */
51
+ stylistic?: boolean | StylisticConfig;
52
+ /**
53
+ * Glob patterns for JSON files.
54
+ *
55
+ * @default [GLOB_JSON, GLOB_JSON5, GLOB_JSONC]
56
+ * @see https://github.com/luxass/eslint-config/blob/ba9952eeb0737ff96444b1aa814e2a35b3cf2c74/src/globs.ts#L30
57
+ */
58
+ files?: string[];
59
+ }
60
+ declare function jsonc(options?: JSONOptions): Promise<FlatConfigItem[]>;
61
+
62
+ interface TypeScriptOptions {
63
+ /**
64
+ * Additional extensions for components.
65
+ *
66
+ * @example ["vue"]
67
+ * @default []
68
+ */
69
+ exts?: string[];
70
+ /**
71
+ * Additional parser options for TypeScript.
72
+ */
73
+ parserOptions?: Partial<ParserOptions>;
74
+ /**
75
+ * When this options is provided, type aware rules will be enabled.
76
+ * @see https://typescript-eslint.io/linting/typed-linting/
77
+ */
78
+ tsconfigPath?: string | string[];
79
+ /**
80
+ * Glob patterns for TypeScript files.
81
+ *
82
+ * @default GLOB_SRC
83
+ * @see https://github.com/luxass/eslint-config/blob/ba9952eeb0737ff96444b1aa814e2a35b3cf2c74/src/globs.ts#L30
84
+ */
85
+ files?: string[];
86
+ /**
87
+ * Glob patterns for files that should be type aware.
88
+ * @default ['**\/*.{ts,tsx}']
89
+ */
90
+ typeAwareFileS?: string[];
91
+ /**
92
+ * Overrides for the config.
93
+ */
94
+ overrides?: FlatConfigItem["rules"];
95
+ }
96
+ declare function typescript(options?: TypeScriptOptions): Promise<FlatConfigItem[]>;
97
+
98
+ interface VueOptions {
99
+ /**
100
+ * Override rules.
101
+ */
102
+ overrides?: FlatConfigItem["rules"];
103
+ /**
104
+ * Enable stylistic rules.
105
+ *
106
+ * @default true
107
+ */
108
+ stylistic?: boolean | StylisticConfig;
109
+ /**
110
+ * Enable TypeScript support.
111
+ *
112
+ * @default false
113
+ */
114
+ typescript?: boolean;
115
+ /**
116
+ * Create virtual files for Vue SFC blocks to enable linting.
117
+ *
118
+ * @see https://github.com/antfu/eslint-processor-vue-blocks
119
+ * @default true
120
+ */
121
+ sfcBlocks?: boolean | Options;
122
+ /**
123
+ * Enable Vue A11y support.
124
+ *
125
+ * @default true
126
+ */
127
+ a11y?: boolean;
128
+ /**
129
+ * Glob patterns for Vue files.
130
+ *
131
+ * @default GLOB_VUE
132
+ * @see https://github.com/luxass/eslint-config/blob/ba9952eeb0737ff96444b1aa814e2a35b3cf2c74/src/globs.ts#L30
133
+ */
134
+ files?: string[];
135
+ }
136
+ declare function vue(options?: VueOptions): Promise<FlatConfigItem[]>;
137
+
138
+ interface YAMLOptions {
139
+ /**
140
+ * Override rules.
141
+ */
142
+ overrides?: FlatConfigItem["rules"];
143
+ /**
144
+ * Enable stylistic rules.
145
+ *
146
+ * @default true
147
+ */
148
+ stylistic?: boolean | StylisticConfig;
149
+ /**
150
+ * Glob patterns for YAML files.
151
+ *
152
+ * @default GLOB_YAML
153
+ * @see https://github.com/luxass/eslint-config/blob/ba9952eeb0737ff96444b1aa814e2a35b3cf2c74/src/globs.ts#L30
154
+ */
155
+ files?: string[];
156
+ }
157
+ declare function yaml(options?: YAMLOptions): Promise<FlatConfigItem[]>;
158
+
159
+ interface TestOptions {
160
+ /**
161
+ * Disable some rules when eslint is run in an editor.
162
+ *
163
+ * @default false
164
+ */
165
+ editor?: boolean;
166
+ /**
167
+ * Glob patterns for test files.
168
+ *
169
+ * @default GLOB_TESTS
170
+ * @see https://github.com/luxass/eslint-config/blob/ba9952eeb0737ff96444b1aa814e2a35b3cf2c74/src/globs.ts#L30
171
+ */
172
+ files?: string[];
173
+ /**
174
+ * Override rules for for test files.
175
+ */
176
+ overrides?: FlatConfigItem["rules"];
177
+ }
178
+ declare function test(options?: TestOptions): Promise<FlatConfigItem[]>;
179
+
180
+ interface UnoCSSOptions {
181
+ /**
182
+ * Enable strict mode.
183
+ *
184
+ * @default false
185
+ */
186
+ strict?: boolean;
187
+ /**
188
+ * Enable attributify mode.
189
+ *
190
+ * @default true
191
+ */
192
+ attributify?: boolean;
193
+ /**
194
+ * Glob patterns for files that includes unocss classes.
195
+ *
196
+ * @default GLOB_SRC
197
+ * @see https://github.com/luxass/eslint-config/blob/ba9952eeb0737ff96444b1aa814e2a35b3cf2c74/src/globs.ts#L30
198
+ */
199
+ files?: string[];
200
+ /**
201
+ * Override rules for for files with unocss classes.
202
+ */
203
+ overrides?: FlatConfigItem["rules"];
204
+ }
205
+ declare function unocss(options?: UnoCSSOptions): Promise<FlatConfigItem[]>;
206
+
207
+ interface NextJSOptions {
208
+ /**
209
+ * Tell the plugin where the root directory is.
210
+ * @see https://nextjs.org/docs/app/building-your-application/configuring/eslint#rootdir
211
+ *
212
+ * @default true
213
+ */
214
+ rootDir?: boolean | string;
215
+ /**
216
+ * Override rules.
217
+ */
218
+ overrides?: FlatConfigItem["rules"];
219
+ /**
220
+ * Glob patterns for Next.js files.
221
+ *
222
+ * @default [GLOB_SRC]
223
+ * @see https://github.com/luxass/eslint-config/blob/ba9952eeb0737ff96444b1aa814e2a35b3cf2c74/src/globs.ts#L30
224
+ */
225
+ files?: string[];
226
+ }
227
+ declare function nextjs(options?: NextJSOptions): Promise<FlatConfigItem[]>;
228
+
229
+ interface ReactOptions {
230
+ /**
231
+ * Override rules.
232
+ */
233
+ overrides?: FlatConfigItem["rules"];
234
+ /**
235
+ * Enable TypeScript support.
236
+ *
237
+ * @default false
238
+ */
239
+ typescript?: boolean;
240
+ /**
241
+ * Enable React A11y support.
242
+ *
243
+ * @default true
244
+ */
245
+ a11y?: boolean;
246
+ /**
247
+ * Glob patterns for JSX & TSX files.
248
+ *
249
+ * @default [GLOB_JSX, GLOB_TSX]
250
+ * @see https://github.com/luxass/eslint-config/blob/ba9952eeb0737ff96444b1aa814e2a35b3cf2c74/src/globs.ts#L30
251
+ */
252
+ files?: string[];
253
+ }
254
+ declare function react(options?: ReactOptions): Promise<FlatConfigItem[]>;
255
+
256
+ interface AstroOptions {
257
+ /**
258
+ * Override rules.
259
+ */
260
+ overrides?: FlatConfigItem["rules"];
261
+ /**
262
+ * Enable TypeScript support.
263
+ *
264
+ * @default true
265
+ */
266
+ typescript?: boolean;
267
+ /**
268
+ * Enable React A11y support.
269
+ *
270
+ * @default false
271
+ */
272
+ a11y?: boolean;
273
+ /**
274
+ * Glob patterns for Astro files.
275
+ *
276
+ * @default [GLOB_ASTRO]
277
+ * @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts#L27
278
+ */
279
+ files?: string[];
280
+ }
281
+ declare function astro(options: AstroOptions): Promise<FlatConfigItem[]>;
282
+
283
+ interface TailwindCSSOptions {
284
+ /**
285
+ * Glob patterns for files that includes tailwind classes.
286
+ *
287
+ * @default [GLOB_SRC]
288
+ * @see https://github.com/luxass/eslint-config/blob/ba9952eeb0737ff96444b1aa814e2a35b3cf2c74/src/globs.ts#L30
289
+ */
290
+ files?: string[];
291
+ /**
292
+ * Override rules for for files with tailwind classes.
293
+ */
294
+ overrides?: FlatConfigItem["rules"];
295
+ }
296
+ declare function tailwindcss(options?: TailwindCSSOptions): Promise<FlatConfigItem[]>;
297
+
298
+ /**
299
+ * Vendor types from Prettier so we don't rely on the dependency.
300
+ */
301
+ type VendoredPrettierOptions = Partial<VendoredPrettierOptionsRequired>;
302
+ interface VendoredPrettierOptionsRequired {
303
+ /**
304
+ * Specify the line length that the printer will wrap on.
305
+ * @default 120
306
+ */
307
+ printWidth: number;
308
+ /**
309
+ * Specify the number of spaces per indentation-level.
310
+ */
311
+ tabWidth: number;
312
+ /**
313
+ * Indent lines with tabs instead of spaces
314
+ */
315
+ useTabs?: boolean;
316
+ /**
317
+ * Print semicolons at the ends of statements.
318
+ */
319
+ semi: boolean;
320
+ /**
321
+ * Use single quotes instead of double quotes.
322
+ */
323
+ singleQuote: boolean;
324
+ /**
325
+ * Use single quotes in JSX.
326
+ */
327
+ jsxSingleQuote: boolean;
328
+ /**
329
+ * Print trailing commas wherever possible.
330
+ */
331
+ trailingComma: "none" | "es5" | "all";
332
+ /**
333
+ * Print spaces between brackets in object literals.
334
+ */
335
+ bracketSpacing: boolean;
336
+ /**
337
+ * Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being
338
+ * alone on the next line (does not apply to self closing elements).
339
+ */
340
+ bracketSameLine: boolean;
341
+ /**
342
+ * Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line.
343
+ * @deprecated use bracketSameLine instead
344
+ */
345
+ jsxBracketSameLine: boolean;
346
+ /**
347
+ * Format only a segment of a file.
348
+ */
349
+ rangeStart: number;
350
+ /**
351
+ * Format only a segment of a file.
352
+ * @default Number.POSITIVE_INFINITY
353
+ */
354
+ rangeEnd: number;
355
+ /**
356
+ * By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer.
357
+ * In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out.
358
+ * @default "preserve"
359
+ */
360
+ proseWrap: "always" | "never" | "preserve";
361
+ /**
362
+ * Include parentheses around a sole arrow function parameter.
363
+ * @default "always"
364
+ */
365
+ arrowParens: "avoid" | "always";
366
+ /**
367
+ * Provide ability to support new languages to prettier.
368
+ */
369
+ plugins: Array<string | any>;
370
+ /**
371
+ * How to handle whitespaces in HTML.
372
+ * @default "css"
373
+ */
374
+ htmlWhitespaceSensitivity: "css" | "strict" | "ignore";
375
+ /**
376
+ * Which end of line characters to apply.
377
+ * @default "lf"
378
+ */
379
+ endOfLine: "auto" | "lf" | "crlf" | "cr";
380
+ /**
381
+ * Change when properties in objects are quoted.
382
+ * @default "as-needed"
383
+ */
384
+ quoteProps: "as-needed" | "consistent" | "preserve";
385
+ /**
386
+ * Whether or not to indent the code inside <script> and <style> tags in Vue files.
387
+ * @default false
388
+ */
389
+ vueIndentScriptAndStyle: boolean;
390
+ /**
391
+ * Enforce single attribute per line in HTML, Vue and JSX.
392
+ * @default false
393
+ */
394
+ singleAttributePerLine: boolean;
395
+ }
396
+
397
+ interface FormattersOptions {
398
+ /**
399
+ * Enable formatting support for CSS, Less, Sass, and SCSS.
400
+ *
401
+ * Currently only support Prettier.
402
+ */
403
+ css?: "prettier" | boolean;
404
+ /**
405
+ * Enable formatting support for HTML.
406
+ *
407
+ * Currently only support Prettier.
408
+ */
409
+ html?: "prettier" | boolean;
410
+ /**
411
+ * Enable formatting support for Markdown.
412
+ *
413
+ * Support both Prettier and dprint.
414
+ *
415
+ * When set to `true`, it will use Prettier.
416
+ */
417
+ markdown?: "prettier" | "dprint" | boolean;
418
+ /**
419
+ * Enable formatting support for GraphQL.
420
+ */
421
+ graphql?: "prettier" | boolean;
422
+ /**
423
+ * Custom options for Prettier.
424
+ *
425
+ * By default it's controlled by our own config.
426
+ */
427
+ prettierOptions?: VendoredPrettierOptions;
428
+ /**
429
+ * Custom options for dprint.
430
+ *
431
+ * By default it's controlled by our own config.
432
+ */
433
+ dprintOptions?: boolean;
434
+ }
435
+ declare function formatters(options?: FormattersOptions | true, stylistic?: StylisticConfig): Promise<FlatConfigItem[]>;
436
+
437
+ interface NoOnlyTestsOptions {
438
+ blocks?: string[];
439
+ focus?: string[];
440
+ }
441
+
442
+ interface TOMLOptions {
443
+ /**
444
+ * Override rules.
445
+ */
446
+ overrides?: FlatConfigItem["rules"];
447
+ /**
448
+ * Enable stylistic rules.
449
+ *
450
+ * @default true
451
+ */
452
+ stylistic?: boolean | StylisticConfig;
453
+ /**
454
+ * Glob patterns for TOML files.
455
+ *
456
+ * @default [GLOB_TOML]
457
+ * @see https://github.com/luxass/eslint-config/blob/ba9952eeb0737ff96444b1aa814e2a35b3cf2c74/src/globs.ts#L30
458
+ */
459
+ files?: string[];
460
+ }
461
+ declare function toml(options?: TOMLOptions): Promise<FlatConfigItem[]>;
462
+
463
+ type WrapRuleConfig<T extends {
464
+ [key: string]: any;
465
+ }> = {
466
+ [K in keyof T]: T[K] extends RuleConfig ? T[K] : RuleConfig<T[K]>;
467
+ };
468
+ type Awaitable<T> = T | Promise<T>;
469
+ type Rules = WrapRuleConfig<MergeIntersection<RenamePrefix<RuleOptions, "@typescript-eslint/", "ts/"> & RenamePrefix<VitestRules, "vitest/", "test/"> & RenamePrefix<YmlRules, "yml/", "yaml/"> & RenamePrefix<NRules, "n/", "node/"> & Prefix<UnprefixedRuleOptions, "style/"> & Prefix<Rules$1, "antfu/"> & ReactHooksRules & ReactRules & RuleOptions$1 & ImportRules & EslintRules & JsoncRules & VueRules & RuleOptions$2 & EslintCommentsRules & {
470
+ "test/no-only-tests": RuleConfig<[NoOnlyTestsOptions]>;
471
+ }>>;
472
+ type FlatConfigItem = Omit<FlatESLintConfigItem<Rules, false>, "plugins"> & {
473
+ /**
474
+ * Custom name of each config item
475
+ */
476
+ name?: string;
477
+ /**
478
+ * An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
479
+ *
480
+ * @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
481
+ */
482
+ plugins?: Record<string, any>;
483
+ };
484
+ type UserConfigItem = FlatConfigItem | Linter.FlatConfig;
485
+ interface ConfigOptions {
486
+ /**
487
+ * Enable gitignore support.
488
+ *
489
+ * Passing an object to configure the options.
490
+ *
491
+ * @see https://github.com/antfu/eslint-config-flat-gitignore
492
+ * @default true
493
+ */
494
+ gitignore?: FlatGitignoreOptions | boolean;
495
+ /**
496
+ * Control to disable some rules in editors.
497
+ * @default auto-detect based on the process.env
498
+ */
499
+ editor?: boolean;
500
+ /**
501
+ * JavaScript options
502
+ *
503
+ * NOTE: Can't be disabled.
504
+ */
505
+ javascript?: JavaScriptOptions;
506
+ /**
507
+ * Enable JSONC support.
508
+ *
509
+ * @default true
510
+ */
511
+ jsonc?: boolean | JSONOptions;
512
+ /**
513
+ * Enable JSX related rules.
514
+ *
515
+ * Currently only stylistic rules are included.
516
+ *
517
+ * @default true
518
+ */
519
+ jsx?: boolean;
520
+ /**
521
+ * Enable linting for **code snippets** in Markdown.
522
+ *
523
+ * For formatting Markdown content, enable also `formatters.markdown`.
524
+ *
525
+ * @default true
526
+ */
527
+ markdown?: boolean;
528
+ /**
529
+ * Enable NextJS support.
530
+ *
531
+ * Requires installing:
532
+ * - `@next/eslint-plugin-next`
533
+ *
534
+ * @default false
535
+ *
536
+ * Note: By enabling this, the `react` option will be enabled automatically.
537
+ */
538
+ nextjs?: boolean | NextJSOptions;
539
+ /**
540
+ * Enable react rules.
541
+ *
542
+ * Requires installing:
543
+ * - `eslint-plugin-react`
544
+ * - `eslint-plugin-react-hooks`
545
+ * - `eslint-plugin-react-refresh`
546
+ *
547
+ * @default false
548
+ */
549
+ react?: boolean | ReactOptions;
550
+ /**
551
+ * Use external formatters to format files.
552
+ *
553
+ * Requires installing:
554
+ * - `eslint-plugin-format`
555
+ *
556
+ * When set to `true`, it will enable all formatters.
557
+ *
558
+ * @default false
559
+ */
560
+ formatters?: boolean | FormattersOptions;
561
+ /**
562
+ * Enable stylistic rules.
563
+ *
564
+ * @default true
565
+ */
566
+ stylistic?: boolean | StylisticConfig;
567
+ /**
568
+ * Enable test support.
569
+ *
570
+ * @default true
571
+ */
572
+ test?: boolean | TestOptions;
573
+ /**
574
+ * Enable TypeScript support.
575
+ *
576
+ * Passing an object to enable TypeScript Language Server support.
577
+ *
578
+ * @default auto-detect based on the dependencies
579
+ */
580
+ typescript?: boolean | TypeScriptOptions;
581
+ /**
582
+ * Enable UnoCSS support.
583
+ *
584
+ * Requires installing:
585
+ * - `@unocss/eslint-plugin`
586
+ *
587
+ * @default false
588
+ */
589
+ unocss?: boolean | UnoCSSOptions;
590
+ /**
591
+ * Enable TailwindCSS support.
592
+ *
593
+ * Requires installing:
594
+ * - `eslint-plugin-tailwindcss`
595
+ *
596
+ * @default false
597
+ */
598
+ tailwindcss?: boolean | TailwindCSSOptions;
599
+ /**
600
+ * Enable Vue support.
601
+ *
602
+ * @default auto-detect based on the dependencies
603
+ */
604
+ vue?: boolean | VueOptions;
605
+ /**
606
+ * Enable Astro support.
607
+ *
608
+ * @default auto-detect based on the dependencies
609
+ */
610
+ astro?: boolean | AstroOptions;
611
+ /**
612
+ * Enable YAML support.
613
+ *
614
+ * @default true
615
+ */
616
+ yaml?: boolean | YAMLOptions;
617
+ /**
618
+ * Enable TOML support.
619
+ *
620
+ * @default true
621
+ */
622
+ toml?: boolean | TOMLOptions;
623
+ /**
624
+ * Additional extensions for components.
625
+ *
626
+ * @example ["vue"]
627
+ * @default []
628
+ */
629
+ exts?: string[];
630
+ }
631
+
632
+ export { type AstroOptions as A, type ConfigOptions as C, type FormattersOptions as F, type JavaScriptOptions as J, type NextJSOptions as N, type ReactOptions as R, type StylisticConfig as S, type TypeScriptOptions as T, type UnoCSSOptions as U, type VueOptions as V, type YAMLOptions as Y, jsonc as a, type JSONOptions as b, type StylisticOptions as c, test as d, type TestOptions as e, astro as f, tailwindcss as g, type TailwindCSSOptions as h, formatters as i, javascript as j, type FlatConfigItem as k, type Awaitable as l, type UserConfigItem as m, nextjs as n, StylisticConfigDefaults as o, type TOMLOptions as p, toml as q, react as r, stylistic as s, typescript as t, unocss as u, vue as v, yaml as y };