@wongxy/eslint-config 3.0.0 → 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.
package/dist/index.d.ts DELETED
@@ -1,680 +0,0 @@
1
- import { OptionsOverrides, antfu } from "@antfu/eslint-config";
2
- import { Linter } from "eslint";
3
-
4
- //#region src/typegen.d.ts
5
- interface RuleOptions {
6
- /**
7
- * Enforce a consistent order for tailwind classes.
8
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md
9
- */
10
- 'tw/enforce-consistent-class-order'?: Linter.RuleEntry<TwEnforceConsistentClassOrder>;
11
- /**
12
- * Enforce consistent important position for classes.
13
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-important-position.md
14
- */
15
- 'tw/enforce-consistent-important-position'?: Linter.RuleEntry<TwEnforceConsistentImportantPosition>;
16
- /**
17
- * Enforce consistent line wrapping for tailwind classes.
18
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/multiline.md
19
- */
20
- 'tw/enforce-consistent-line-wrapping'?: Linter.RuleEntry<TwEnforceConsistentLineWrapping>;
21
- /**
22
- * Enforce consistent syntax for css variables.
23
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-variable-syntax.md
24
- */
25
- 'tw/enforce-consistent-variable-syntax'?: Linter.RuleEntry<TwEnforceConsistentVariableSyntax>;
26
- /**
27
- * Enforce shorthand class names instead of longhand class names.
28
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-shorthand-classes.md
29
- */
30
- 'tw/enforce-shorthand-classes'?: Linter.RuleEntry<TwEnforceShorthandClasses>;
31
- /**
32
- * Enforce consistent line wrapping for tailwind classes.
33
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/multiline.md
34
- * @deprecated
35
- */
36
- 'tw/multiline'?: Linter.RuleEntry<TwMultiline>;
37
- /**
38
- * Disallow classes that produce conflicting styles.
39
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-conflicting-classes.md
40
- */
41
- 'tw/no-conflicting-classes'?: Linter.RuleEntry<TwNoConflictingClasses>;
42
- /**
43
- * Disallow the use of deprecated Tailwind CSS classes.
44
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-deprecated-classes.md
45
- */
46
- 'tw/no-deprecated-classes'?: Linter.RuleEntry<TwNoDeprecatedClasses>;
47
- /**
48
- * Disallow duplicate class names in tailwind classes.
49
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-duplicate-classes.md
50
- */
51
- 'tw/no-duplicate-classes'?: Linter.RuleEntry<TwNoDuplicateClasses>;
52
- /**
53
- * Disallow restricted classes.
54
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-restricted-classes.md
55
- */
56
- 'tw/no-restricted-classes'?: Linter.RuleEntry<TwNoRestrictedClasses>;
57
- /**
58
- * Disallow unnecessary whitespace between Tailwind CSS classes.
59
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unnecessary-whitespace.md
60
- */
61
- 'tw/no-unnecessary-whitespace'?: Linter.RuleEntry<TwNoUnnecessaryWhitespace>;
62
- /**
63
- * Disallow any css classes that are not registered in tailwindcss.
64
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unregistered-classes.md
65
- */
66
- 'tw/no-unregistered-classes'?: Linter.RuleEntry<TwNoUnregisteredClasses>;
67
- /**
68
- * Enforce a consistent order for tailwind classes.
69
- * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md
70
- * @deprecated
71
- */
72
- 'tw/sort-classes'?: Linter.RuleEntry<TwSortClasses>;
73
- }
74
-
75
- /* ======= Declarations ======= */
76
- // ----- tw/enforce-consistent-class-order -----
77
- type TwEnforceConsistentClassOrder = [] | [{
78
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
79
- match?: "strings";
80
- } | {
81
- match?: "objectKeys";
82
- pathPattern?: string;
83
- } | {
84
- match?: "objectValues";
85
- pathPattern?: string;
86
- })[]] | string)[];
87
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
88
- match?: "strings";
89
- } | {
90
- match?: "objectKeys";
91
- pathPattern?: string;
92
- } | {
93
- match?: "objectValues";
94
- pathPattern?: string;
95
- })[]])[];
96
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
97
- match?: "strings";
98
- } | {
99
- match?: "objectKeys";
100
- pathPattern?: string;
101
- } | {
102
- match?: "objectValues";
103
- pathPattern?: string;
104
- })[]] | string)[];
105
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
106
- match?: "strings";
107
- } | {
108
- match?: "objectKeys";
109
- pathPattern?: string;
110
- } | {
111
- match?: "objectValues";
112
- pathPattern?: string;
113
- })[]] | string)[];
114
- entryPoint?: string;
115
- tailwindConfig?: string;
116
- tsconfig?: string;
117
- order?: ("asc" | "desc" | "official" | "improved");
118
- }];
119
- // ----- tw/enforce-consistent-important-position -----
120
- type TwEnforceConsistentImportantPosition = [] | [{
121
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
122
- match?: "strings";
123
- } | {
124
- match?: "objectKeys";
125
- pathPattern?: string;
126
- } | {
127
- match?: "objectValues";
128
- pathPattern?: string;
129
- })[]] | string)[];
130
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
131
- match?: "strings";
132
- } | {
133
- match?: "objectKeys";
134
- pathPattern?: string;
135
- } | {
136
- match?: "objectValues";
137
- pathPattern?: string;
138
- })[]])[];
139
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
140
- match?: "strings";
141
- } | {
142
- match?: "objectKeys";
143
- pathPattern?: string;
144
- } | {
145
- match?: "objectValues";
146
- pathPattern?: string;
147
- })[]] | string)[];
148
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
149
- match?: "strings";
150
- } | {
151
- match?: "objectKeys";
152
- pathPattern?: string;
153
- } | {
154
- match?: "objectValues";
155
- pathPattern?: string;
156
- })[]] | string)[];
157
- entryPoint?: string;
158
- tailwindConfig?: string;
159
- tsconfig?: string;
160
- position?: ("legacy" | "recommended");
161
- }];
162
- // ----- tw/enforce-consistent-line-wrapping -----
163
- type TwEnforceConsistentLineWrapping = [] | [{
164
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
165
- match?: "strings";
166
- } | {
167
- match?: "objectKeys";
168
- pathPattern?: string;
169
- } | {
170
- match?: "objectValues";
171
- pathPattern?: string;
172
- })[]] | string)[];
173
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
174
- match?: "strings";
175
- } | {
176
- match?: "objectKeys";
177
- pathPattern?: string;
178
- } | {
179
- match?: "objectValues";
180
- pathPattern?: string;
181
- })[]])[];
182
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
183
- match?: "strings";
184
- } | {
185
- match?: "objectKeys";
186
- pathPattern?: string;
187
- } | {
188
- match?: "objectValues";
189
- pathPattern?: string;
190
- })[]] | string)[];
191
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
192
- match?: "strings";
193
- } | {
194
- match?: "objectKeys";
195
- pathPattern?: string;
196
- } | {
197
- match?: "objectValues";
198
- pathPattern?: string;
199
- })[]] | string)[];
200
- entryPoint?: string;
201
- tailwindConfig?: string;
202
- tsconfig?: string;
203
- classesPerLine?: number;
204
- group?: ("emptyLine" | "never" | "newLine");
205
- indent?: ("tab" | number);
206
- lineBreakStyle?: ("unix" | "windows");
207
- preferSingleLine?: boolean;
208
- printWidth?: number;
209
- }];
210
- // ----- tw/enforce-consistent-variable-syntax -----
211
- type TwEnforceConsistentVariableSyntax = [] | [{
212
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
213
- match?: "strings";
214
- } | {
215
- match?: "objectKeys";
216
- pathPattern?: string;
217
- } | {
218
- match?: "objectValues";
219
- pathPattern?: string;
220
- })[]] | string)[];
221
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
222
- match?: "strings";
223
- } | {
224
- match?: "objectKeys";
225
- pathPattern?: string;
226
- } | {
227
- match?: "objectValues";
228
- pathPattern?: string;
229
- })[]])[];
230
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
231
- match?: "strings";
232
- } | {
233
- match?: "objectKeys";
234
- pathPattern?: string;
235
- } | {
236
- match?: "objectValues";
237
- pathPattern?: string;
238
- })[]] | string)[];
239
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
240
- match?: "strings";
241
- } | {
242
- match?: "objectKeys";
243
- pathPattern?: string;
244
- } | {
245
- match?: "objectValues";
246
- pathPattern?: string;
247
- })[]] | string)[];
248
- syntax?: ("arbitrary" | "parentheses" | "shorthand" | "variable");
249
- }];
250
- // ----- tw/enforce-shorthand-classes -----
251
- type TwEnforceShorthandClasses = [] | [{
252
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
253
- match?: "strings";
254
- } | {
255
- match?: "objectKeys";
256
- pathPattern?: string;
257
- } | {
258
- match?: "objectValues";
259
- pathPattern?: string;
260
- })[]] | string)[];
261
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
262
- match?: "strings";
263
- } | {
264
- match?: "objectKeys";
265
- pathPattern?: string;
266
- } | {
267
- match?: "objectValues";
268
- pathPattern?: string;
269
- })[]])[];
270
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
271
- match?: "strings";
272
- } | {
273
- match?: "objectKeys";
274
- pathPattern?: string;
275
- } | {
276
- match?: "objectValues";
277
- pathPattern?: string;
278
- })[]] | string)[];
279
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
280
- match?: "strings";
281
- } | {
282
- match?: "objectKeys";
283
- pathPattern?: string;
284
- } | {
285
- match?: "objectValues";
286
- pathPattern?: string;
287
- })[]] | string)[];
288
- entryPoint?: string;
289
- tailwindConfig?: string;
290
- tsconfig?: string;
291
- }];
292
- // ----- tw/multiline -----
293
- type TwMultiline = [] | [{
294
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
295
- match?: "strings";
296
- } | {
297
- match?: "objectKeys";
298
- pathPattern?: string;
299
- } | {
300
- match?: "objectValues";
301
- pathPattern?: string;
302
- })[]] | string)[];
303
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
304
- match?: "strings";
305
- } | {
306
- match?: "objectKeys";
307
- pathPattern?: string;
308
- } | {
309
- match?: "objectValues";
310
- pathPattern?: string;
311
- })[]])[];
312
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
313
- match?: "strings";
314
- } | {
315
- match?: "objectKeys";
316
- pathPattern?: string;
317
- } | {
318
- match?: "objectValues";
319
- pathPattern?: string;
320
- })[]] | string)[];
321
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
322
- match?: "strings";
323
- } | {
324
- match?: "objectKeys";
325
- pathPattern?: string;
326
- } | {
327
- match?: "objectValues";
328
- pathPattern?: string;
329
- })[]] | string)[];
330
- entryPoint?: string;
331
- tailwindConfig?: string;
332
- tsconfig?: string;
333
- classesPerLine?: number;
334
- group?: ("emptyLine" | "never" | "newLine");
335
- indent?: ("tab" | number);
336
- lineBreakStyle?: ("unix" | "windows");
337
- preferSingleLine?: boolean;
338
- printWidth?: number;
339
- }];
340
- // ----- tw/no-conflicting-classes -----
341
- type TwNoConflictingClasses = [] | [{
342
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
343
- match?: "strings";
344
- } | {
345
- match?: "objectKeys";
346
- pathPattern?: string;
347
- } | {
348
- match?: "objectValues";
349
- pathPattern?: string;
350
- })[]] | string)[];
351
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
352
- match?: "strings";
353
- } | {
354
- match?: "objectKeys";
355
- pathPattern?: string;
356
- } | {
357
- match?: "objectValues";
358
- pathPattern?: string;
359
- })[]])[];
360
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
361
- match?: "strings";
362
- } | {
363
- match?: "objectKeys";
364
- pathPattern?: string;
365
- } | {
366
- match?: "objectValues";
367
- pathPattern?: string;
368
- })[]] | string)[];
369
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
370
- match?: "strings";
371
- } | {
372
- match?: "objectKeys";
373
- pathPattern?: string;
374
- } | {
375
- match?: "objectValues";
376
- pathPattern?: string;
377
- })[]] | string)[];
378
- entryPoint?: string;
379
- tailwindConfig?: string;
380
- tsconfig?: string;
381
- }];
382
- // ----- tw/no-deprecated-classes -----
383
- type TwNoDeprecatedClasses = [] | [{
384
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
385
- match?: "strings";
386
- } | {
387
- match?: "objectKeys";
388
- pathPattern?: string;
389
- } | {
390
- match?: "objectValues";
391
- pathPattern?: string;
392
- })[]] | string)[];
393
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
394
- match?: "strings";
395
- } | {
396
- match?: "objectKeys";
397
- pathPattern?: string;
398
- } | {
399
- match?: "objectValues";
400
- pathPattern?: string;
401
- })[]])[];
402
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
403
- match?: "strings";
404
- } | {
405
- match?: "objectKeys";
406
- pathPattern?: string;
407
- } | {
408
- match?: "objectValues";
409
- pathPattern?: string;
410
- })[]] | string)[];
411
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
412
- match?: "strings";
413
- } | {
414
- match?: "objectKeys";
415
- pathPattern?: string;
416
- } | {
417
- match?: "objectValues";
418
- pathPattern?: string;
419
- })[]] | string)[];
420
- entryPoint?: string;
421
- tailwindConfig?: string;
422
- tsconfig?: string;
423
- }];
424
- // ----- tw/no-duplicate-classes -----
425
- type TwNoDuplicateClasses = [] | [{
426
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
427
- match?: "strings";
428
- } | {
429
- match?: "objectKeys";
430
- pathPattern?: string;
431
- } | {
432
- match?: "objectValues";
433
- pathPattern?: string;
434
- })[]] | string)[];
435
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
436
- match?: "strings";
437
- } | {
438
- match?: "objectKeys";
439
- pathPattern?: string;
440
- } | {
441
- match?: "objectValues";
442
- pathPattern?: string;
443
- })[]])[];
444
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
445
- match?: "strings";
446
- } | {
447
- match?: "objectKeys";
448
- pathPattern?: string;
449
- } | {
450
- match?: "objectValues";
451
- pathPattern?: string;
452
- })[]] | string)[];
453
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
454
- match?: "strings";
455
- } | {
456
- match?: "objectKeys";
457
- pathPattern?: string;
458
- } | {
459
- match?: "objectValues";
460
- pathPattern?: string;
461
- })[]] | string)[];
462
- }];
463
- // ----- tw/no-restricted-classes -----
464
- type TwNoRestrictedClasses = [] | [{
465
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
466
- match?: "strings";
467
- } | {
468
- match?: "objectKeys";
469
- pathPattern?: string;
470
- } | {
471
- match?: "objectValues";
472
- pathPattern?: string;
473
- })[]] | string)[];
474
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
475
- match?: "strings";
476
- } | {
477
- match?: "objectKeys";
478
- pathPattern?: string;
479
- } | {
480
- match?: "objectValues";
481
- pathPattern?: string;
482
- })[]])[];
483
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
484
- match?: "strings";
485
- } | {
486
- match?: "objectKeys";
487
- pathPattern?: string;
488
- } | {
489
- match?: "objectValues";
490
- pathPattern?: string;
491
- })[]] | string)[];
492
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
493
- match?: "strings";
494
- } | {
495
- match?: "objectKeys";
496
- pathPattern?: string;
497
- } | {
498
- match?: "objectValues";
499
- pathPattern?: string;
500
- })[]] | string)[];
501
- restrict?: ({
502
- fix?: string;
503
- message?: string;
504
- pattern: string;
505
- } | string)[];
506
- }];
507
- // ----- tw/no-unnecessary-whitespace -----
508
- type TwNoUnnecessaryWhitespace = [] | [{
509
- allowMultiline?: boolean;
510
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
511
- match?: "strings";
512
- } | {
513
- match?: "objectKeys";
514
- pathPattern?: string;
515
- } | {
516
- match?: "objectValues";
517
- pathPattern?: string;
518
- })[]] | string)[];
519
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
520
- match?: "strings";
521
- } | {
522
- match?: "objectKeys";
523
- pathPattern?: string;
524
- } | {
525
- match?: "objectValues";
526
- pathPattern?: string;
527
- })[]])[];
528
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
529
- match?: "strings";
530
- } | {
531
- match?: "objectKeys";
532
- pathPattern?: string;
533
- } | {
534
- match?: "objectValues";
535
- pathPattern?: string;
536
- })[]] | string)[];
537
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
538
- match?: "strings";
539
- } | {
540
- match?: "objectKeys";
541
- pathPattern?: string;
542
- } | {
543
- match?: "objectValues";
544
- pathPattern?: string;
545
- })[]] | string)[];
546
- }];
547
- // ----- tw/no-unregistered-classes -----
548
- type TwNoUnregisteredClasses = [] | [{
549
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
550
- match?: "strings";
551
- } | {
552
- match?: "objectKeys";
553
- pathPattern?: string;
554
- } | {
555
- match?: "objectValues";
556
- pathPattern?: string;
557
- })[]] | string)[];
558
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
559
- match?: "strings";
560
- } | {
561
- match?: "objectKeys";
562
- pathPattern?: string;
563
- } | {
564
- match?: "objectValues";
565
- pathPattern?: string;
566
- })[]])[];
567
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
568
- match?: "strings";
569
- } | {
570
- match?: "objectKeys";
571
- pathPattern?: string;
572
- } | {
573
- match?: "objectValues";
574
- pathPattern?: string;
575
- })[]] | string)[];
576
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
577
- match?: "strings";
578
- } | {
579
- match?: "objectKeys";
580
- pathPattern?: string;
581
- } | {
582
- match?: "objectValues";
583
- pathPattern?: string;
584
- })[]] | string)[];
585
- entryPoint?: string;
586
- tailwindConfig?: string;
587
- tsconfig?: string;
588
- detectComponentClasses?: boolean;
589
- ignore?: string[];
590
- }];
591
- // ----- tw/sort-classes -----
592
- type TwSortClasses = [] | [{
593
- callees?: ([] | [string] | [string, string] | [] | [string] | [string, ({
594
- match?: "strings";
595
- } | {
596
- match?: "objectKeys";
597
- pathPattern?: string;
598
- } | {
599
- match?: "objectValues";
600
- pathPattern?: string;
601
- })[]] | string)[];
602
- attributes?: (string | [] | [string] | [string, string] | [] | [string] | [string, ({
603
- match?: "strings";
604
- } | {
605
- match?: "objectKeys";
606
- pathPattern?: string;
607
- } | {
608
- match?: "objectValues";
609
- pathPattern?: string;
610
- })[]])[];
611
- variables?: ([] | [string] | [string, string] | [] | [string] | [string, ({
612
- match?: "strings";
613
- } | {
614
- match?: "objectKeys";
615
- pathPattern?: string;
616
- } | {
617
- match?: "objectValues";
618
- pathPattern?: string;
619
- })[]] | string)[];
620
- tags?: ([] | [string] | [string, string] | [] | [string] | [string, ({
621
- match?: "strings";
622
- } | {
623
- match?: "objectKeys";
624
- pathPattern?: string;
625
- } | {
626
- match?: "objectValues";
627
- pathPattern?: string;
628
- })[]] | string)[];
629
- entryPoint?: string;
630
- tailwindConfig?: string;
631
- tsconfig?: string;
632
- order?: ("asc" | "desc" | "official" | "improved");
633
- }];
634
- // Names of all the configs
635
- //#endregion
636
- //#region src/types.d.ts
637
- type Options = Parameters<typeof antfu>[0] & {
638
- /**
639
- * Enable Tailwind rules.
640
- *
641
- * @default auto-detect based on the dependencies
642
- */
643
- tailwindcss?: boolean | OptionsTailwindCSS;
644
- /**
645
- * Enable React Native support.
646
- *
647
- * Will enable `react` support automatically.
648
- *
649
- * @default auto-detect based on the dependencies
650
- */
651
- reactnative?: boolean;
652
- /**
653
- * Enable react rules.
654
- *
655
- * @default auto-detect based on the dependencies
656
- */
657
- react?: boolean | OptionsOverrides;
658
- };
659
- type UserConfig = Parameters<typeof antfu>[1] & {
660
- rules?: RuleOptions;
661
- };
662
- type OptionsReturn = ReturnType<typeof antfu>;
663
- type PickKeysByPrefix<T extends object, P extends string> = { [K in keyof T as K extends `${P}${string}` ? K : never]: T[K] };
664
- type RuleOptionsTailwindCSS = PickKeysByPrefix<RuleOptions, 'tw/'>;
665
- interface OptionsTailwindCSS {
666
- overrides?: Partial<RuleOptionsTailwindCSS>;
667
- settings?: {
668
- entryPoint?: string;
669
- tailwindConfig?: string;
670
- attributes?: string[];
671
- callees?: string[];
672
- variables?: string[];
673
- tags?: string[];
674
- };
675
- }
676
- //#endregion
677
- //#region src/index.d.ts
678
- declare function wongxy(options?: Options, ...userConfigs: UserConfig[]): OptionsReturn;
679
- //#endregion
680
- export { wongxy as default };