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