@wongxy/eslint-config 3.0.1 → 4.0.1

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.
@@ -0,0 +1,3079 @@
1
+ import { OptionsOverrides, antfu } from "@antfu/eslint-config";
2
+ import { Linter } from "eslint";
3
+ //#region src/typegen.d.ts
4
+ interface RuleOptions {
5
+ /**
6
+ * Enforce canonical class names.
7
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md
8
+ */
9
+ 'tw/enforce-canonical-classes'?: Linter.RuleEntry<TwEnforceCanonicalClasses>;
10
+ /**
11
+ * Enforce a consistent order for tailwind classes.
12
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md
13
+ */
14
+ 'tw/enforce-consistent-class-order'?: Linter.RuleEntry<TwEnforceConsistentClassOrder>;
15
+ /**
16
+ * Enforce consistent important position for classes.
17
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-important-position.md
18
+ */
19
+ 'tw/enforce-consistent-important-position'?: Linter.RuleEntry<TwEnforceConsistentImportantPosition>;
20
+ /**
21
+ * Enforce consistent line wrapping for tailwind classes.
22
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-line-wrapping.md
23
+ */
24
+ 'tw/enforce-consistent-line-wrapping'?: Linter.RuleEntry<TwEnforceConsistentLineWrapping>;
25
+ /**
26
+ * Enforce consistent syntax for css variables.
27
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-variable-syntax.md
28
+ */
29
+ 'tw/enforce-consistent-variable-syntax'?: Linter.RuleEntry<TwEnforceConsistentVariableSyntax>;
30
+ /**
31
+ * Enforce a consistent variant order for Tailwind classes.
32
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-variant-order.md
33
+ */
34
+ 'tw/enforce-consistent-variant-order'?: Linter.RuleEntry<TwEnforceConsistentVariantOrder>;
35
+ /**
36
+ * Enforce logical property class names instead of physical directions.
37
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-logical-properties.md
38
+ */
39
+ 'tw/enforce-logical-properties'?: Linter.RuleEntry<TwEnforceLogicalProperties>;
40
+ /**
41
+ * Enforce shorthand class names instead of longhand class names.
42
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-shorthand-classes.md
43
+ */
44
+ 'tw/enforce-shorthand-classes'?: Linter.RuleEntry<TwEnforceShorthandClasses>;
45
+ /**
46
+ * Disallow concatenated classes in Tailwind CSS class strings.
47
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-concatenated-classes.md
48
+ */
49
+ 'tw/no-concatenated-classes'?: Linter.RuleEntry<TwNoConcatenatedClasses>;
50
+ /**
51
+ * Disallow classes that produce conflicting styles.
52
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-conflicting-classes.md
53
+ */
54
+ 'tw/no-conflicting-classes'?: Linter.RuleEntry<TwNoConflictingClasses>;
55
+ /**
56
+ * Disallow the use of deprecated Tailwind CSS classes.
57
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-deprecated-classes.md
58
+ */
59
+ 'tw/no-deprecated-classes'?: Linter.RuleEntry<TwNoDeprecatedClasses>;
60
+ /**
61
+ * Disallow duplicate class names in tailwind classes.
62
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-duplicate-classes.md
63
+ */
64
+ 'tw/no-duplicate-classes'?: Linter.RuleEntry<TwNoDuplicateClasses>;
65
+ /**
66
+ * Disallow restricted classes.
67
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-restricted-classes.md
68
+ */
69
+ 'tw/no-restricted-classes'?: Linter.RuleEntry<TwNoRestrictedClasses>;
70
+ /**
71
+ * Disallow any css classes that are not registered in tailwindcss.
72
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unknown-classes.md
73
+ */
74
+ 'tw/no-unknown-classes'?: Linter.RuleEntry<TwNoUnknownClasses>;
75
+ /**
76
+ * Disallow unnecessary whitespace between Tailwind CSS classes.
77
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unnecessary-whitespace.md
78
+ */
79
+ 'tw/no-unnecessary-whitespace'?: Linter.RuleEntry<TwNoUnnecessaryWhitespace>;
80
+ }
81
+ /* ======= Declarations ======= */
82
+ // ----- tw/enforce-canonical-classes -----
83
+ type TwEnforceCanonicalClasses = [] | [{
84
+ selectors?: ({
85
+ kind: "attribute";
86
+ match?: ({
87
+ type: "strings";
88
+ } | {
89
+ path?: string;
90
+ type: "objectKeys";
91
+ } | {
92
+ path?: string;
93
+ type: "objectValues";
94
+ } | {
95
+ match: ({
96
+ type: "strings";
97
+ } | {
98
+ path?: string;
99
+ type: "objectKeys";
100
+ } | {
101
+ path?: string;
102
+ type: "objectValues";
103
+ })[];
104
+ type: "anonymousFunctionReturn";
105
+ })[];
106
+ name: string;
107
+ } | ({
108
+ callTarget?: ("all" | "first" | "last" | number);
109
+ kind: "callee";
110
+ match?: ({
111
+ type: "strings";
112
+ } | {
113
+ path?: string;
114
+ type: "objectKeys";
115
+ } | {
116
+ path?: string;
117
+ type: "objectValues";
118
+ } | {
119
+ match: ({
120
+ type: "strings";
121
+ } | {
122
+ path?: string;
123
+ type: "objectKeys";
124
+ } | {
125
+ path?: string;
126
+ type: "objectValues";
127
+ })[];
128
+ type: "anonymousFunctionReturn";
129
+ })[];
130
+ name: string;
131
+ path?: string;
132
+ targetArgument?: ("all" | "first" | "last" | number);
133
+ targetCall?: ("all" | "first" | "last" | number);
134
+ } | {
135
+ callTarget?: ("all" | "first" | "last" | number);
136
+ kind: "callee";
137
+ match?: ({
138
+ type: "strings";
139
+ } | {
140
+ path?: string;
141
+ type: "objectKeys";
142
+ } | {
143
+ path?: string;
144
+ type: "objectValues";
145
+ } | {
146
+ match: ({
147
+ type: "strings";
148
+ } | {
149
+ path?: string;
150
+ type: "objectKeys";
151
+ } | {
152
+ path?: string;
153
+ type: "objectValues";
154
+ })[];
155
+ type: "anonymousFunctionReturn";
156
+ })[];
157
+ name?: string;
158
+ path: string;
159
+ targetArgument?: ("all" | "first" | "last" | number);
160
+ targetCall?: ("all" | "first" | "last" | number);
161
+ }) | ({
162
+ kind: "tag";
163
+ match?: ({
164
+ type: "strings";
165
+ } | {
166
+ path?: string;
167
+ type: "objectKeys";
168
+ } | {
169
+ path?: string;
170
+ type: "objectValues";
171
+ } | {
172
+ match: ({
173
+ type: "strings";
174
+ } | {
175
+ path?: string;
176
+ type: "objectKeys";
177
+ } | {
178
+ path?: string;
179
+ type: "objectValues";
180
+ })[];
181
+ type: "anonymousFunctionReturn";
182
+ })[];
183
+ name: string;
184
+ path?: string;
185
+ } | {
186
+ kind: "tag";
187
+ match?: ({
188
+ type: "strings";
189
+ } | {
190
+ path?: string;
191
+ type: "objectKeys";
192
+ } | {
193
+ path?: string;
194
+ type: "objectValues";
195
+ } | {
196
+ match: ({
197
+ type: "strings";
198
+ } | {
199
+ path?: string;
200
+ type: "objectKeys";
201
+ } | {
202
+ path?: string;
203
+ type: "objectValues";
204
+ })[];
205
+ type: "anonymousFunctionReturn";
206
+ })[];
207
+ name?: string;
208
+ path: string;
209
+ }) | {
210
+ kind: "variable";
211
+ match?: ({
212
+ type: "strings";
213
+ } | {
214
+ path?: string;
215
+ type: "objectKeys";
216
+ } | {
217
+ path?: string;
218
+ type: "objectValues";
219
+ } | {
220
+ match: ({
221
+ type: "strings";
222
+ } | {
223
+ path?: string;
224
+ type: "objectKeys";
225
+ } | {
226
+ path?: string;
227
+ type: "objectValues";
228
+ })[];
229
+ type: "anonymousFunctionReturn";
230
+ })[];
231
+ name: string;
232
+ })[];
233
+ callees?: ([string, ({
234
+ match: "strings";
235
+ } | {
236
+ match: "objectKeys";
237
+ pathPattern?: string;
238
+ } | {
239
+ match: "objectValues";
240
+ pathPattern?: string;
241
+ })[]] | string)[];
242
+ attributes?: (string | [string, ({
243
+ match: "strings";
244
+ } | {
245
+ match: "objectKeys";
246
+ pathPattern?: string;
247
+ } | {
248
+ match: "objectValues";
249
+ pathPattern?: string;
250
+ })[]])[];
251
+ variables?: ([string, ({
252
+ match: "strings";
253
+ } | {
254
+ match: "objectKeys";
255
+ pathPattern?: string;
256
+ } | {
257
+ match: "objectValues";
258
+ pathPattern?: string;
259
+ })[]] | string)[];
260
+ tags?: ([string, ({
261
+ match: "strings";
262
+ } | {
263
+ match: "objectKeys";
264
+ pathPattern?: string;
265
+ } | {
266
+ match: "objectValues";
267
+ pathPattern?: string;
268
+ })[]] | string)[];
269
+ entryPoint?: string;
270
+ messageStyle?: ("visual" | "compact" | "raw");
271
+ tailwindConfig?: string;
272
+ tsconfig?: string;
273
+ detectComponentClasses?: boolean;
274
+ rootFontSize?: number;
275
+ cwd?: string;
276
+ collapse?: boolean;
277
+ ignore?: string[];
278
+ logical?: boolean;
279
+ }];
280
+ // ----- tw/enforce-consistent-class-order -----
281
+ type TwEnforceConsistentClassOrder = [] | [{
282
+ selectors?: ({
283
+ kind: "attribute";
284
+ match?: ({
285
+ type: "strings";
286
+ } | {
287
+ path?: string;
288
+ type: "objectKeys";
289
+ } | {
290
+ path?: string;
291
+ type: "objectValues";
292
+ } | {
293
+ match: ({
294
+ type: "strings";
295
+ } | {
296
+ path?: string;
297
+ type: "objectKeys";
298
+ } | {
299
+ path?: string;
300
+ type: "objectValues";
301
+ })[];
302
+ type: "anonymousFunctionReturn";
303
+ })[];
304
+ name: string;
305
+ } | ({
306
+ callTarget?: ("all" | "first" | "last" | number);
307
+ kind: "callee";
308
+ match?: ({
309
+ type: "strings";
310
+ } | {
311
+ path?: string;
312
+ type: "objectKeys";
313
+ } | {
314
+ path?: string;
315
+ type: "objectValues";
316
+ } | {
317
+ match: ({
318
+ type: "strings";
319
+ } | {
320
+ path?: string;
321
+ type: "objectKeys";
322
+ } | {
323
+ path?: string;
324
+ type: "objectValues";
325
+ })[];
326
+ type: "anonymousFunctionReturn";
327
+ })[];
328
+ name: string;
329
+ path?: string;
330
+ targetArgument?: ("all" | "first" | "last" | number);
331
+ targetCall?: ("all" | "first" | "last" | number);
332
+ } | {
333
+ callTarget?: ("all" | "first" | "last" | number);
334
+ kind: "callee";
335
+ match?: ({
336
+ type: "strings";
337
+ } | {
338
+ path?: string;
339
+ type: "objectKeys";
340
+ } | {
341
+ path?: string;
342
+ type: "objectValues";
343
+ } | {
344
+ match: ({
345
+ type: "strings";
346
+ } | {
347
+ path?: string;
348
+ type: "objectKeys";
349
+ } | {
350
+ path?: string;
351
+ type: "objectValues";
352
+ })[];
353
+ type: "anonymousFunctionReturn";
354
+ })[];
355
+ name?: string;
356
+ path: string;
357
+ targetArgument?: ("all" | "first" | "last" | number);
358
+ targetCall?: ("all" | "first" | "last" | number);
359
+ }) | ({
360
+ kind: "tag";
361
+ match?: ({
362
+ type: "strings";
363
+ } | {
364
+ path?: string;
365
+ type: "objectKeys";
366
+ } | {
367
+ path?: string;
368
+ type: "objectValues";
369
+ } | {
370
+ match: ({
371
+ type: "strings";
372
+ } | {
373
+ path?: string;
374
+ type: "objectKeys";
375
+ } | {
376
+ path?: string;
377
+ type: "objectValues";
378
+ })[];
379
+ type: "anonymousFunctionReturn";
380
+ })[];
381
+ name: string;
382
+ path?: string;
383
+ } | {
384
+ kind: "tag";
385
+ match?: ({
386
+ type: "strings";
387
+ } | {
388
+ path?: string;
389
+ type: "objectKeys";
390
+ } | {
391
+ path?: string;
392
+ type: "objectValues";
393
+ } | {
394
+ match: ({
395
+ type: "strings";
396
+ } | {
397
+ path?: string;
398
+ type: "objectKeys";
399
+ } | {
400
+ path?: string;
401
+ type: "objectValues";
402
+ })[];
403
+ type: "anonymousFunctionReturn";
404
+ })[];
405
+ name?: string;
406
+ path: string;
407
+ }) | {
408
+ kind: "variable";
409
+ match?: ({
410
+ type: "strings";
411
+ } | {
412
+ path?: string;
413
+ type: "objectKeys";
414
+ } | {
415
+ path?: string;
416
+ type: "objectValues";
417
+ } | {
418
+ match: ({
419
+ type: "strings";
420
+ } | {
421
+ path?: string;
422
+ type: "objectKeys";
423
+ } | {
424
+ path?: string;
425
+ type: "objectValues";
426
+ })[];
427
+ type: "anonymousFunctionReturn";
428
+ })[];
429
+ name: string;
430
+ })[];
431
+ callees?: ([string, ({
432
+ match: "strings";
433
+ } | {
434
+ match: "objectKeys";
435
+ pathPattern?: string;
436
+ } | {
437
+ match: "objectValues";
438
+ pathPattern?: string;
439
+ })[]] | string)[];
440
+ attributes?: (string | [string, ({
441
+ match: "strings";
442
+ } | {
443
+ match: "objectKeys";
444
+ pathPattern?: string;
445
+ } | {
446
+ match: "objectValues";
447
+ pathPattern?: string;
448
+ })[]])[];
449
+ variables?: ([string, ({
450
+ match: "strings";
451
+ } | {
452
+ match: "objectKeys";
453
+ pathPattern?: string;
454
+ } | {
455
+ match: "objectValues";
456
+ pathPattern?: string;
457
+ })[]] | string)[];
458
+ tags?: ([string, ({
459
+ match: "strings";
460
+ } | {
461
+ match: "objectKeys";
462
+ pathPattern?: string;
463
+ } | {
464
+ match: "objectValues";
465
+ pathPattern?: string;
466
+ })[]] | string)[];
467
+ entryPoint?: string;
468
+ messageStyle?: ("visual" | "compact" | "raw");
469
+ tailwindConfig?: string;
470
+ tsconfig?: string;
471
+ detectComponentClasses?: boolean;
472
+ rootFontSize?: number;
473
+ cwd?: string;
474
+ componentClassOrder?: ("asc" | "desc" | "preserve");
475
+ componentClassPosition?: ("start" | "end");
476
+ order?: ("asc" | "desc" | "official" | "strict");
477
+ unknownClassOrder?: ("asc" | "desc" | "preserve");
478
+ unknownClassPosition?: ("start" | "end");
479
+ }];
480
+ // ----- tw/enforce-consistent-important-position -----
481
+ type TwEnforceConsistentImportantPosition = [] | [{
482
+ selectors?: ({
483
+ kind: "attribute";
484
+ match?: ({
485
+ type: "strings";
486
+ } | {
487
+ path?: string;
488
+ type: "objectKeys";
489
+ } | {
490
+ path?: string;
491
+ type: "objectValues";
492
+ } | {
493
+ match: ({
494
+ type: "strings";
495
+ } | {
496
+ path?: string;
497
+ type: "objectKeys";
498
+ } | {
499
+ path?: string;
500
+ type: "objectValues";
501
+ })[];
502
+ type: "anonymousFunctionReturn";
503
+ })[];
504
+ name: string;
505
+ } | ({
506
+ callTarget?: ("all" | "first" | "last" | number);
507
+ kind: "callee";
508
+ match?: ({
509
+ type: "strings";
510
+ } | {
511
+ path?: string;
512
+ type: "objectKeys";
513
+ } | {
514
+ path?: string;
515
+ type: "objectValues";
516
+ } | {
517
+ match: ({
518
+ type: "strings";
519
+ } | {
520
+ path?: string;
521
+ type: "objectKeys";
522
+ } | {
523
+ path?: string;
524
+ type: "objectValues";
525
+ })[];
526
+ type: "anonymousFunctionReturn";
527
+ })[];
528
+ name: string;
529
+ path?: string;
530
+ targetArgument?: ("all" | "first" | "last" | number);
531
+ targetCall?: ("all" | "first" | "last" | number);
532
+ } | {
533
+ callTarget?: ("all" | "first" | "last" | number);
534
+ kind: "callee";
535
+ match?: ({
536
+ type: "strings";
537
+ } | {
538
+ path?: string;
539
+ type: "objectKeys";
540
+ } | {
541
+ path?: string;
542
+ type: "objectValues";
543
+ } | {
544
+ match: ({
545
+ type: "strings";
546
+ } | {
547
+ path?: string;
548
+ type: "objectKeys";
549
+ } | {
550
+ path?: string;
551
+ type: "objectValues";
552
+ })[];
553
+ type: "anonymousFunctionReturn";
554
+ })[];
555
+ name?: string;
556
+ path: string;
557
+ targetArgument?: ("all" | "first" | "last" | number);
558
+ targetCall?: ("all" | "first" | "last" | number);
559
+ }) | ({
560
+ kind: "tag";
561
+ match?: ({
562
+ type: "strings";
563
+ } | {
564
+ path?: string;
565
+ type: "objectKeys";
566
+ } | {
567
+ path?: string;
568
+ type: "objectValues";
569
+ } | {
570
+ match: ({
571
+ type: "strings";
572
+ } | {
573
+ path?: string;
574
+ type: "objectKeys";
575
+ } | {
576
+ path?: string;
577
+ type: "objectValues";
578
+ })[];
579
+ type: "anonymousFunctionReturn";
580
+ })[];
581
+ name: string;
582
+ path?: string;
583
+ } | {
584
+ kind: "tag";
585
+ match?: ({
586
+ type: "strings";
587
+ } | {
588
+ path?: string;
589
+ type: "objectKeys";
590
+ } | {
591
+ path?: string;
592
+ type: "objectValues";
593
+ } | {
594
+ match: ({
595
+ type: "strings";
596
+ } | {
597
+ path?: string;
598
+ type: "objectKeys";
599
+ } | {
600
+ path?: string;
601
+ type: "objectValues";
602
+ })[];
603
+ type: "anonymousFunctionReturn";
604
+ })[];
605
+ name?: string;
606
+ path: string;
607
+ }) | {
608
+ kind: "variable";
609
+ match?: ({
610
+ type: "strings";
611
+ } | {
612
+ path?: string;
613
+ type: "objectKeys";
614
+ } | {
615
+ path?: string;
616
+ type: "objectValues";
617
+ } | {
618
+ match: ({
619
+ type: "strings";
620
+ } | {
621
+ path?: string;
622
+ type: "objectKeys";
623
+ } | {
624
+ path?: string;
625
+ type: "objectValues";
626
+ })[];
627
+ type: "anonymousFunctionReturn";
628
+ })[];
629
+ name: string;
630
+ })[];
631
+ callees?: ([string, ({
632
+ match: "strings";
633
+ } | {
634
+ match: "objectKeys";
635
+ pathPattern?: string;
636
+ } | {
637
+ match: "objectValues";
638
+ pathPattern?: string;
639
+ })[]] | string)[];
640
+ attributes?: (string | [string, ({
641
+ match: "strings";
642
+ } | {
643
+ match: "objectKeys";
644
+ pathPattern?: string;
645
+ } | {
646
+ match: "objectValues";
647
+ pathPattern?: string;
648
+ })[]])[];
649
+ variables?: ([string, ({
650
+ match: "strings";
651
+ } | {
652
+ match: "objectKeys";
653
+ pathPattern?: string;
654
+ } | {
655
+ match: "objectValues";
656
+ pathPattern?: string;
657
+ })[]] | string)[];
658
+ tags?: ([string, ({
659
+ match: "strings";
660
+ } | {
661
+ match: "objectKeys";
662
+ pathPattern?: string;
663
+ } | {
664
+ match: "objectValues";
665
+ pathPattern?: string;
666
+ })[]] | string)[];
667
+ entryPoint?: string;
668
+ messageStyle?: ("visual" | "compact" | "raw");
669
+ tailwindConfig?: string;
670
+ tsconfig?: string;
671
+ detectComponentClasses?: boolean;
672
+ rootFontSize?: number;
673
+ cwd?: string;
674
+ position?: ("legacy" | "recommended");
675
+ }];
676
+ // ----- tw/enforce-consistent-line-wrapping -----
677
+ type TwEnforceConsistentLineWrapping = [] | [{
678
+ selectors?: ({
679
+ kind: "attribute";
680
+ match?: ({
681
+ type: "strings";
682
+ } | {
683
+ path?: string;
684
+ type: "objectKeys";
685
+ } | {
686
+ path?: string;
687
+ type: "objectValues";
688
+ } | {
689
+ match: ({
690
+ type: "strings";
691
+ } | {
692
+ path?: string;
693
+ type: "objectKeys";
694
+ } | {
695
+ path?: string;
696
+ type: "objectValues";
697
+ })[];
698
+ type: "anonymousFunctionReturn";
699
+ })[];
700
+ name: string;
701
+ } | ({
702
+ callTarget?: ("all" | "first" | "last" | number);
703
+ kind: "callee";
704
+ match?: ({
705
+ type: "strings";
706
+ } | {
707
+ path?: string;
708
+ type: "objectKeys";
709
+ } | {
710
+ path?: string;
711
+ type: "objectValues";
712
+ } | {
713
+ match: ({
714
+ type: "strings";
715
+ } | {
716
+ path?: string;
717
+ type: "objectKeys";
718
+ } | {
719
+ path?: string;
720
+ type: "objectValues";
721
+ })[];
722
+ type: "anonymousFunctionReturn";
723
+ })[];
724
+ name: string;
725
+ path?: string;
726
+ targetArgument?: ("all" | "first" | "last" | number);
727
+ targetCall?: ("all" | "first" | "last" | number);
728
+ } | {
729
+ callTarget?: ("all" | "first" | "last" | number);
730
+ kind: "callee";
731
+ match?: ({
732
+ type: "strings";
733
+ } | {
734
+ path?: string;
735
+ type: "objectKeys";
736
+ } | {
737
+ path?: string;
738
+ type: "objectValues";
739
+ } | {
740
+ match: ({
741
+ type: "strings";
742
+ } | {
743
+ path?: string;
744
+ type: "objectKeys";
745
+ } | {
746
+ path?: string;
747
+ type: "objectValues";
748
+ })[];
749
+ type: "anonymousFunctionReturn";
750
+ })[];
751
+ name?: string;
752
+ path: string;
753
+ targetArgument?: ("all" | "first" | "last" | number);
754
+ targetCall?: ("all" | "first" | "last" | number);
755
+ }) | ({
756
+ kind: "tag";
757
+ match?: ({
758
+ type: "strings";
759
+ } | {
760
+ path?: string;
761
+ type: "objectKeys";
762
+ } | {
763
+ path?: string;
764
+ type: "objectValues";
765
+ } | {
766
+ match: ({
767
+ type: "strings";
768
+ } | {
769
+ path?: string;
770
+ type: "objectKeys";
771
+ } | {
772
+ path?: string;
773
+ type: "objectValues";
774
+ })[];
775
+ type: "anonymousFunctionReturn";
776
+ })[];
777
+ name: string;
778
+ path?: string;
779
+ } | {
780
+ kind: "tag";
781
+ match?: ({
782
+ type: "strings";
783
+ } | {
784
+ path?: string;
785
+ type: "objectKeys";
786
+ } | {
787
+ path?: string;
788
+ type: "objectValues";
789
+ } | {
790
+ match: ({
791
+ type: "strings";
792
+ } | {
793
+ path?: string;
794
+ type: "objectKeys";
795
+ } | {
796
+ path?: string;
797
+ type: "objectValues";
798
+ })[];
799
+ type: "anonymousFunctionReturn";
800
+ })[];
801
+ name?: string;
802
+ path: string;
803
+ }) | {
804
+ kind: "variable";
805
+ match?: ({
806
+ type: "strings";
807
+ } | {
808
+ path?: string;
809
+ type: "objectKeys";
810
+ } | {
811
+ path?: string;
812
+ type: "objectValues";
813
+ } | {
814
+ match: ({
815
+ type: "strings";
816
+ } | {
817
+ path?: string;
818
+ type: "objectKeys";
819
+ } | {
820
+ path?: string;
821
+ type: "objectValues";
822
+ })[];
823
+ type: "anonymousFunctionReturn";
824
+ })[];
825
+ name: string;
826
+ })[];
827
+ callees?: ([string, ({
828
+ match: "strings";
829
+ } | {
830
+ match: "objectKeys";
831
+ pathPattern?: string;
832
+ } | {
833
+ match: "objectValues";
834
+ pathPattern?: string;
835
+ })[]] | string)[];
836
+ attributes?: (string | [string, ({
837
+ match: "strings";
838
+ } | {
839
+ match: "objectKeys";
840
+ pathPattern?: string;
841
+ } | {
842
+ match: "objectValues";
843
+ pathPattern?: string;
844
+ })[]])[];
845
+ variables?: ([string, ({
846
+ match: "strings";
847
+ } | {
848
+ match: "objectKeys";
849
+ pathPattern?: string;
850
+ } | {
851
+ match: "objectValues";
852
+ pathPattern?: string;
853
+ })[]] | string)[];
854
+ tags?: ([string, ({
855
+ match: "strings";
856
+ } | {
857
+ match: "objectKeys";
858
+ pathPattern?: string;
859
+ } | {
860
+ match: "objectValues";
861
+ pathPattern?: string;
862
+ })[]] | string)[];
863
+ entryPoint?: string;
864
+ messageStyle?: ("visual" | "compact" | "raw");
865
+ tailwindConfig?: string;
866
+ tsconfig?: string;
867
+ detectComponentClasses?: boolean;
868
+ rootFontSize?: number;
869
+ cwd?: string;
870
+ classesPerLine?: number;
871
+ group?: ("newLine" | "emptyLine" | "never");
872
+ indent?: ("tab" | number);
873
+ lineBreakStyle?: ("unix" | "windows");
874
+ preferSingleLine?: boolean;
875
+ printWidth?: number;
876
+ strictness?: ("strict" | "loose");
877
+ tabWidth?: number;
878
+ vueConvertToBinding?: boolean;
879
+ }];
880
+ // ----- tw/enforce-consistent-variable-syntax -----
881
+ type TwEnforceConsistentVariableSyntax = [] | [{
882
+ selectors?: ({
883
+ kind: "attribute";
884
+ match?: ({
885
+ type: "strings";
886
+ } | {
887
+ path?: string;
888
+ type: "objectKeys";
889
+ } | {
890
+ path?: string;
891
+ type: "objectValues";
892
+ } | {
893
+ match: ({
894
+ type: "strings";
895
+ } | {
896
+ path?: string;
897
+ type: "objectKeys";
898
+ } | {
899
+ path?: string;
900
+ type: "objectValues";
901
+ })[];
902
+ type: "anonymousFunctionReturn";
903
+ })[];
904
+ name: string;
905
+ } | ({
906
+ callTarget?: ("all" | "first" | "last" | number);
907
+ kind: "callee";
908
+ match?: ({
909
+ type: "strings";
910
+ } | {
911
+ path?: string;
912
+ type: "objectKeys";
913
+ } | {
914
+ path?: string;
915
+ type: "objectValues";
916
+ } | {
917
+ match: ({
918
+ type: "strings";
919
+ } | {
920
+ path?: string;
921
+ type: "objectKeys";
922
+ } | {
923
+ path?: string;
924
+ type: "objectValues";
925
+ })[];
926
+ type: "anonymousFunctionReturn";
927
+ })[];
928
+ name: string;
929
+ path?: string;
930
+ targetArgument?: ("all" | "first" | "last" | number);
931
+ targetCall?: ("all" | "first" | "last" | number);
932
+ } | {
933
+ callTarget?: ("all" | "first" | "last" | number);
934
+ kind: "callee";
935
+ match?: ({
936
+ type: "strings";
937
+ } | {
938
+ path?: string;
939
+ type: "objectKeys";
940
+ } | {
941
+ path?: string;
942
+ type: "objectValues";
943
+ } | {
944
+ match: ({
945
+ type: "strings";
946
+ } | {
947
+ path?: string;
948
+ type: "objectKeys";
949
+ } | {
950
+ path?: string;
951
+ type: "objectValues";
952
+ })[];
953
+ type: "anonymousFunctionReturn";
954
+ })[];
955
+ name?: string;
956
+ path: string;
957
+ targetArgument?: ("all" | "first" | "last" | number);
958
+ targetCall?: ("all" | "first" | "last" | number);
959
+ }) | ({
960
+ kind: "tag";
961
+ match?: ({
962
+ type: "strings";
963
+ } | {
964
+ path?: string;
965
+ type: "objectKeys";
966
+ } | {
967
+ path?: string;
968
+ type: "objectValues";
969
+ } | {
970
+ match: ({
971
+ type: "strings";
972
+ } | {
973
+ path?: string;
974
+ type: "objectKeys";
975
+ } | {
976
+ path?: string;
977
+ type: "objectValues";
978
+ })[];
979
+ type: "anonymousFunctionReturn";
980
+ })[];
981
+ name: string;
982
+ path?: string;
983
+ } | {
984
+ kind: "tag";
985
+ match?: ({
986
+ type: "strings";
987
+ } | {
988
+ path?: string;
989
+ type: "objectKeys";
990
+ } | {
991
+ path?: string;
992
+ type: "objectValues";
993
+ } | {
994
+ match: ({
995
+ type: "strings";
996
+ } | {
997
+ path?: string;
998
+ type: "objectKeys";
999
+ } | {
1000
+ path?: string;
1001
+ type: "objectValues";
1002
+ })[];
1003
+ type: "anonymousFunctionReturn";
1004
+ })[];
1005
+ name?: string;
1006
+ path: string;
1007
+ }) | {
1008
+ kind: "variable";
1009
+ match?: ({
1010
+ type: "strings";
1011
+ } | {
1012
+ path?: string;
1013
+ type: "objectKeys";
1014
+ } | {
1015
+ path?: string;
1016
+ type: "objectValues";
1017
+ } | {
1018
+ match: ({
1019
+ type: "strings";
1020
+ } | {
1021
+ path?: string;
1022
+ type: "objectKeys";
1023
+ } | {
1024
+ path?: string;
1025
+ type: "objectValues";
1026
+ })[];
1027
+ type: "anonymousFunctionReturn";
1028
+ })[];
1029
+ name: string;
1030
+ })[];
1031
+ callees?: ([string, ({
1032
+ match: "strings";
1033
+ } | {
1034
+ match: "objectKeys";
1035
+ pathPattern?: string;
1036
+ } | {
1037
+ match: "objectValues";
1038
+ pathPattern?: string;
1039
+ })[]] | string)[];
1040
+ attributes?: (string | [string, ({
1041
+ match: "strings";
1042
+ } | {
1043
+ match: "objectKeys";
1044
+ pathPattern?: string;
1045
+ } | {
1046
+ match: "objectValues";
1047
+ pathPattern?: string;
1048
+ })[]])[];
1049
+ variables?: ([string, ({
1050
+ match: "strings";
1051
+ } | {
1052
+ match: "objectKeys";
1053
+ pathPattern?: string;
1054
+ } | {
1055
+ match: "objectValues";
1056
+ pathPattern?: string;
1057
+ })[]] | string)[];
1058
+ tags?: ([string, ({
1059
+ match: "strings";
1060
+ } | {
1061
+ match: "objectKeys";
1062
+ pathPattern?: string;
1063
+ } | {
1064
+ match: "objectValues";
1065
+ pathPattern?: string;
1066
+ })[]] | string)[];
1067
+ entryPoint?: string;
1068
+ messageStyle?: ("visual" | "compact" | "raw");
1069
+ tailwindConfig?: string;
1070
+ tsconfig?: string;
1071
+ detectComponentClasses?: boolean;
1072
+ rootFontSize?: number;
1073
+ cwd?: string;
1074
+ syntax?: ("shorthand" | "variable");
1075
+ }];
1076
+ // ----- tw/enforce-consistent-variant-order -----
1077
+ type TwEnforceConsistentVariantOrder = [] | [{
1078
+ selectors?: ({
1079
+ kind: "attribute";
1080
+ match?: ({
1081
+ type: "strings";
1082
+ } | {
1083
+ path?: string;
1084
+ type: "objectKeys";
1085
+ } | {
1086
+ path?: string;
1087
+ type: "objectValues";
1088
+ } | {
1089
+ match: ({
1090
+ type: "strings";
1091
+ } | {
1092
+ path?: string;
1093
+ type: "objectKeys";
1094
+ } | {
1095
+ path?: string;
1096
+ type: "objectValues";
1097
+ })[];
1098
+ type: "anonymousFunctionReturn";
1099
+ })[];
1100
+ name: string;
1101
+ } | ({
1102
+ callTarget?: ("all" | "first" | "last" | number);
1103
+ kind: "callee";
1104
+ match?: ({
1105
+ type: "strings";
1106
+ } | {
1107
+ path?: string;
1108
+ type: "objectKeys";
1109
+ } | {
1110
+ path?: string;
1111
+ type: "objectValues";
1112
+ } | {
1113
+ match: ({
1114
+ type: "strings";
1115
+ } | {
1116
+ path?: string;
1117
+ type: "objectKeys";
1118
+ } | {
1119
+ path?: string;
1120
+ type: "objectValues";
1121
+ })[];
1122
+ type: "anonymousFunctionReturn";
1123
+ })[];
1124
+ name: string;
1125
+ path?: string;
1126
+ targetArgument?: ("all" | "first" | "last" | number);
1127
+ targetCall?: ("all" | "first" | "last" | number);
1128
+ } | {
1129
+ callTarget?: ("all" | "first" | "last" | number);
1130
+ kind: "callee";
1131
+ match?: ({
1132
+ type: "strings";
1133
+ } | {
1134
+ path?: string;
1135
+ type: "objectKeys";
1136
+ } | {
1137
+ path?: string;
1138
+ type: "objectValues";
1139
+ } | {
1140
+ match: ({
1141
+ type: "strings";
1142
+ } | {
1143
+ path?: string;
1144
+ type: "objectKeys";
1145
+ } | {
1146
+ path?: string;
1147
+ type: "objectValues";
1148
+ })[];
1149
+ type: "anonymousFunctionReturn";
1150
+ })[];
1151
+ name?: string;
1152
+ path: string;
1153
+ targetArgument?: ("all" | "first" | "last" | number);
1154
+ targetCall?: ("all" | "first" | "last" | number);
1155
+ }) | ({
1156
+ kind: "tag";
1157
+ match?: ({
1158
+ type: "strings";
1159
+ } | {
1160
+ path?: string;
1161
+ type: "objectKeys";
1162
+ } | {
1163
+ path?: string;
1164
+ type: "objectValues";
1165
+ } | {
1166
+ match: ({
1167
+ type: "strings";
1168
+ } | {
1169
+ path?: string;
1170
+ type: "objectKeys";
1171
+ } | {
1172
+ path?: string;
1173
+ type: "objectValues";
1174
+ })[];
1175
+ type: "anonymousFunctionReturn";
1176
+ })[];
1177
+ name: string;
1178
+ path?: string;
1179
+ } | {
1180
+ kind: "tag";
1181
+ match?: ({
1182
+ type: "strings";
1183
+ } | {
1184
+ path?: string;
1185
+ type: "objectKeys";
1186
+ } | {
1187
+ path?: string;
1188
+ type: "objectValues";
1189
+ } | {
1190
+ match: ({
1191
+ type: "strings";
1192
+ } | {
1193
+ path?: string;
1194
+ type: "objectKeys";
1195
+ } | {
1196
+ path?: string;
1197
+ type: "objectValues";
1198
+ })[];
1199
+ type: "anonymousFunctionReturn";
1200
+ })[];
1201
+ name?: string;
1202
+ path: string;
1203
+ }) | {
1204
+ kind: "variable";
1205
+ match?: ({
1206
+ type: "strings";
1207
+ } | {
1208
+ path?: string;
1209
+ type: "objectKeys";
1210
+ } | {
1211
+ path?: string;
1212
+ type: "objectValues";
1213
+ } | {
1214
+ match: ({
1215
+ type: "strings";
1216
+ } | {
1217
+ path?: string;
1218
+ type: "objectKeys";
1219
+ } | {
1220
+ path?: string;
1221
+ type: "objectValues";
1222
+ })[];
1223
+ type: "anonymousFunctionReturn";
1224
+ })[];
1225
+ name: string;
1226
+ })[];
1227
+ callees?: ([string, ({
1228
+ match: "strings";
1229
+ } | {
1230
+ match: "objectKeys";
1231
+ pathPattern?: string;
1232
+ } | {
1233
+ match: "objectValues";
1234
+ pathPattern?: string;
1235
+ })[]] | string)[];
1236
+ attributes?: (string | [string, ({
1237
+ match: "strings";
1238
+ } | {
1239
+ match: "objectKeys";
1240
+ pathPattern?: string;
1241
+ } | {
1242
+ match: "objectValues";
1243
+ pathPattern?: string;
1244
+ })[]])[];
1245
+ variables?: ([string, ({
1246
+ match: "strings";
1247
+ } | {
1248
+ match: "objectKeys";
1249
+ pathPattern?: string;
1250
+ } | {
1251
+ match: "objectValues";
1252
+ pathPattern?: string;
1253
+ })[]] | string)[];
1254
+ tags?: ([string, ({
1255
+ match: "strings";
1256
+ } | {
1257
+ match: "objectKeys";
1258
+ pathPattern?: string;
1259
+ } | {
1260
+ match: "objectValues";
1261
+ pathPattern?: string;
1262
+ })[]] | string)[];
1263
+ entryPoint?: string;
1264
+ messageStyle?: ("visual" | "compact" | "raw");
1265
+ tailwindConfig?: string;
1266
+ tsconfig?: string;
1267
+ detectComponentClasses?: boolean;
1268
+ rootFontSize?: number;
1269
+ cwd?: string;
1270
+ }];
1271
+ // ----- tw/enforce-logical-properties -----
1272
+ type TwEnforceLogicalProperties = [] | [{
1273
+ selectors?: ({
1274
+ kind: "attribute";
1275
+ match?: ({
1276
+ type: "strings";
1277
+ } | {
1278
+ path?: string;
1279
+ type: "objectKeys";
1280
+ } | {
1281
+ path?: string;
1282
+ type: "objectValues";
1283
+ } | {
1284
+ match: ({
1285
+ type: "strings";
1286
+ } | {
1287
+ path?: string;
1288
+ type: "objectKeys";
1289
+ } | {
1290
+ path?: string;
1291
+ type: "objectValues";
1292
+ })[];
1293
+ type: "anonymousFunctionReturn";
1294
+ })[];
1295
+ name: string;
1296
+ } | ({
1297
+ callTarget?: ("all" | "first" | "last" | number);
1298
+ kind: "callee";
1299
+ match?: ({
1300
+ type: "strings";
1301
+ } | {
1302
+ path?: string;
1303
+ type: "objectKeys";
1304
+ } | {
1305
+ path?: string;
1306
+ type: "objectValues";
1307
+ } | {
1308
+ match: ({
1309
+ type: "strings";
1310
+ } | {
1311
+ path?: string;
1312
+ type: "objectKeys";
1313
+ } | {
1314
+ path?: string;
1315
+ type: "objectValues";
1316
+ })[];
1317
+ type: "anonymousFunctionReturn";
1318
+ })[];
1319
+ name: string;
1320
+ path?: string;
1321
+ targetArgument?: ("all" | "first" | "last" | number);
1322
+ targetCall?: ("all" | "first" | "last" | number);
1323
+ } | {
1324
+ callTarget?: ("all" | "first" | "last" | number);
1325
+ kind: "callee";
1326
+ match?: ({
1327
+ type: "strings";
1328
+ } | {
1329
+ path?: string;
1330
+ type: "objectKeys";
1331
+ } | {
1332
+ path?: string;
1333
+ type: "objectValues";
1334
+ } | {
1335
+ match: ({
1336
+ type: "strings";
1337
+ } | {
1338
+ path?: string;
1339
+ type: "objectKeys";
1340
+ } | {
1341
+ path?: string;
1342
+ type: "objectValues";
1343
+ })[];
1344
+ type: "anonymousFunctionReturn";
1345
+ })[];
1346
+ name?: string;
1347
+ path: string;
1348
+ targetArgument?: ("all" | "first" | "last" | number);
1349
+ targetCall?: ("all" | "first" | "last" | number);
1350
+ }) | ({
1351
+ kind: "tag";
1352
+ match?: ({
1353
+ type: "strings";
1354
+ } | {
1355
+ path?: string;
1356
+ type: "objectKeys";
1357
+ } | {
1358
+ path?: string;
1359
+ type: "objectValues";
1360
+ } | {
1361
+ match: ({
1362
+ type: "strings";
1363
+ } | {
1364
+ path?: string;
1365
+ type: "objectKeys";
1366
+ } | {
1367
+ path?: string;
1368
+ type: "objectValues";
1369
+ })[];
1370
+ type: "anonymousFunctionReturn";
1371
+ })[];
1372
+ name: string;
1373
+ path?: string;
1374
+ } | {
1375
+ kind: "tag";
1376
+ match?: ({
1377
+ type: "strings";
1378
+ } | {
1379
+ path?: string;
1380
+ type: "objectKeys";
1381
+ } | {
1382
+ path?: string;
1383
+ type: "objectValues";
1384
+ } | {
1385
+ match: ({
1386
+ type: "strings";
1387
+ } | {
1388
+ path?: string;
1389
+ type: "objectKeys";
1390
+ } | {
1391
+ path?: string;
1392
+ type: "objectValues";
1393
+ })[];
1394
+ type: "anonymousFunctionReturn";
1395
+ })[];
1396
+ name?: string;
1397
+ path: string;
1398
+ }) | {
1399
+ kind: "variable";
1400
+ match?: ({
1401
+ type: "strings";
1402
+ } | {
1403
+ path?: string;
1404
+ type: "objectKeys";
1405
+ } | {
1406
+ path?: string;
1407
+ type: "objectValues";
1408
+ } | {
1409
+ match: ({
1410
+ type: "strings";
1411
+ } | {
1412
+ path?: string;
1413
+ type: "objectKeys";
1414
+ } | {
1415
+ path?: string;
1416
+ type: "objectValues";
1417
+ })[];
1418
+ type: "anonymousFunctionReturn";
1419
+ })[];
1420
+ name: string;
1421
+ })[];
1422
+ callees?: ([string, ({
1423
+ match: "strings";
1424
+ } | {
1425
+ match: "objectKeys";
1426
+ pathPattern?: string;
1427
+ } | {
1428
+ match: "objectValues";
1429
+ pathPattern?: string;
1430
+ })[]] | string)[];
1431
+ attributes?: (string | [string, ({
1432
+ match: "strings";
1433
+ } | {
1434
+ match: "objectKeys";
1435
+ pathPattern?: string;
1436
+ } | {
1437
+ match: "objectValues";
1438
+ pathPattern?: string;
1439
+ })[]])[];
1440
+ variables?: ([string, ({
1441
+ match: "strings";
1442
+ } | {
1443
+ match: "objectKeys";
1444
+ pathPattern?: string;
1445
+ } | {
1446
+ match: "objectValues";
1447
+ pathPattern?: string;
1448
+ })[]] | string)[];
1449
+ tags?: ([string, ({
1450
+ match: "strings";
1451
+ } | {
1452
+ match: "objectKeys";
1453
+ pathPattern?: string;
1454
+ } | {
1455
+ match: "objectValues";
1456
+ pathPattern?: string;
1457
+ })[]] | string)[];
1458
+ entryPoint?: string;
1459
+ messageStyle?: ("visual" | "compact" | "raw");
1460
+ tailwindConfig?: string;
1461
+ tsconfig?: string;
1462
+ detectComponentClasses?: boolean;
1463
+ rootFontSize?: number;
1464
+ cwd?: string;
1465
+ ignore?: string[];
1466
+ }];
1467
+ // ----- tw/enforce-shorthand-classes -----
1468
+ type TwEnforceShorthandClasses = [] | [{
1469
+ selectors?: ({
1470
+ kind: "attribute";
1471
+ match?: ({
1472
+ type: "strings";
1473
+ } | {
1474
+ path?: string;
1475
+ type: "objectKeys";
1476
+ } | {
1477
+ path?: string;
1478
+ type: "objectValues";
1479
+ } | {
1480
+ match: ({
1481
+ type: "strings";
1482
+ } | {
1483
+ path?: string;
1484
+ type: "objectKeys";
1485
+ } | {
1486
+ path?: string;
1487
+ type: "objectValues";
1488
+ })[];
1489
+ type: "anonymousFunctionReturn";
1490
+ })[];
1491
+ name: string;
1492
+ } | ({
1493
+ callTarget?: ("all" | "first" | "last" | number);
1494
+ kind: "callee";
1495
+ match?: ({
1496
+ type: "strings";
1497
+ } | {
1498
+ path?: string;
1499
+ type: "objectKeys";
1500
+ } | {
1501
+ path?: string;
1502
+ type: "objectValues";
1503
+ } | {
1504
+ match: ({
1505
+ type: "strings";
1506
+ } | {
1507
+ path?: string;
1508
+ type: "objectKeys";
1509
+ } | {
1510
+ path?: string;
1511
+ type: "objectValues";
1512
+ })[];
1513
+ type: "anonymousFunctionReturn";
1514
+ })[];
1515
+ name: string;
1516
+ path?: string;
1517
+ targetArgument?: ("all" | "first" | "last" | number);
1518
+ targetCall?: ("all" | "first" | "last" | number);
1519
+ } | {
1520
+ callTarget?: ("all" | "first" | "last" | number);
1521
+ kind: "callee";
1522
+ match?: ({
1523
+ type: "strings";
1524
+ } | {
1525
+ path?: string;
1526
+ type: "objectKeys";
1527
+ } | {
1528
+ path?: string;
1529
+ type: "objectValues";
1530
+ } | {
1531
+ match: ({
1532
+ type: "strings";
1533
+ } | {
1534
+ path?: string;
1535
+ type: "objectKeys";
1536
+ } | {
1537
+ path?: string;
1538
+ type: "objectValues";
1539
+ })[];
1540
+ type: "anonymousFunctionReturn";
1541
+ })[];
1542
+ name?: string;
1543
+ path: string;
1544
+ targetArgument?: ("all" | "first" | "last" | number);
1545
+ targetCall?: ("all" | "first" | "last" | number);
1546
+ }) | ({
1547
+ kind: "tag";
1548
+ match?: ({
1549
+ type: "strings";
1550
+ } | {
1551
+ path?: string;
1552
+ type: "objectKeys";
1553
+ } | {
1554
+ path?: string;
1555
+ type: "objectValues";
1556
+ } | {
1557
+ match: ({
1558
+ type: "strings";
1559
+ } | {
1560
+ path?: string;
1561
+ type: "objectKeys";
1562
+ } | {
1563
+ path?: string;
1564
+ type: "objectValues";
1565
+ })[];
1566
+ type: "anonymousFunctionReturn";
1567
+ })[];
1568
+ name: string;
1569
+ path?: string;
1570
+ } | {
1571
+ kind: "tag";
1572
+ match?: ({
1573
+ type: "strings";
1574
+ } | {
1575
+ path?: string;
1576
+ type: "objectKeys";
1577
+ } | {
1578
+ path?: string;
1579
+ type: "objectValues";
1580
+ } | {
1581
+ match: ({
1582
+ type: "strings";
1583
+ } | {
1584
+ path?: string;
1585
+ type: "objectKeys";
1586
+ } | {
1587
+ path?: string;
1588
+ type: "objectValues";
1589
+ })[];
1590
+ type: "anonymousFunctionReturn";
1591
+ })[];
1592
+ name?: string;
1593
+ path: string;
1594
+ }) | {
1595
+ kind: "variable";
1596
+ match?: ({
1597
+ type: "strings";
1598
+ } | {
1599
+ path?: string;
1600
+ type: "objectKeys";
1601
+ } | {
1602
+ path?: string;
1603
+ type: "objectValues";
1604
+ } | {
1605
+ match: ({
1606
+ type: "strings";
1607
+ } | {
1608
+ path?: string;
1609
+ type: "objectKeys";
1610
+ } | {
1611
+ path?: string;
1612
+ type: "objectValues";
1613
+ })[];
1614
+ type: "anonymousFunctionReturn";
1615
+ })[];
1616
+ name: string;
1617
+ })[];
1618
+ callees?: ([string, ({
1619
+ match: "strings";
1620
+ } | {
1621
+ match: "objectKeys";
1622
+ pathPattern?: string;
1623
+ } | {
1624
+ match: "objectValues";
1625
+ pathPattern?: string;
1626
+ })[]] | string)[];
1627
+ attributes?: (string | [string, ({
1628
+ match: "strings";
1629
+ } | {
1630
+ match: "objectKeys";
1631
+ pathPattern?: string;
1632
+ } | {
1633
+ match: "objectValues";
1634
+ pathPattern?: string;
1635
+ })[]])[];
1636
+ variables?: ([string, ({
1637
+ match: "strings";
1638
+ } | {
1639
+ match: "objectKeys";
1640
+ pathPattern?: string;
1641
+ } | {
1642
+ match: "objectValues";
1643
+ pathPattern?: string;
1644
+ })[]] | string)[];
1645
+ tags?: ([string, ({
1646
+ match: "strings";
1647
+ } | {
1648
+ match: "objectKeys";
1649
+ pathPattern?: string;
1650
+ } | {
1651
+ match: "objectValues";
1652
+ pathPattern?: string;
1653
+ })[]] | string)[];
1654
+ entryPoint?: string;
1655
+ messageStyle?: ("visual" | "compact" | "raw");
1656
+ tailwindConfig?: string;
1657
+ tsconfig?: string;
1658
+ detectComponentClasses?: boolean;
1659
+ rootFontSize?: number;
1660
+ cwd?: string;
1661
+ }];
1662
+ // ----- tw/no-concatenated-classes -----
1663
+ type TwNoConcatenatedClasses = [] | [{
1664
+ selectors?: ({
1665
+ kind: "attribute";
1666
+ match?: ({
1667
+ type: "strings";
1668
+ } | {
1669
+ path?: string;
1670
+ type: "objectKeys";
1671
+ } | {
1672
+ path?: string;
1673
+ type: "objectValues";
1674
+ } | {
1675
+ match: ({
1676
+ type: "strings";
1677
+ } | {
1678
+ path?: string;
1679
+ type: "objectKeys";
1680
+ } | {
1681
+ path?: string;
1682
+ type: "objectValues";
1683
+ })[];
1684
+ type: "anonymousFunctionReturn";
1685
+ })[];
1686
+ name: string;
1687
+ } | ({
1688
+ callTarget?: ("all" | "first" | "last" | number);
1689
+ kind: "callee";
1690
+ match?: ({
1691
+ type: "strings";
1692
+ } | {
1693
+ path?: string;
1694
+ type: "objectKeys";
1695
+ } | {
1696
+ path?: string;
1697
+ type: "objectValues";
1698
+ } | {
1699
+ match: ({
1700
+ type: "strings";
1701
+ } | {
1702
+ path?: string;
1703
+ type: "objectKeys";
1704
+ } | {
1705
+ path?: string;
1706
+ type: "objectValues";
1707
+ })[];
1708
+ type: "anonymousFunctionReturn";
1709
+ })[];
1710
+ name: string;
1711
+ path?: string;
1712
+ targetArgument?: ("all" | "first" | "last" | number);
1713
+ targetCall?: ("all" | "first" | "last" | number);
1714
+ } | {
1715
+ callTarget?: ("all" | "first" | "last" | number);
1716
+ kind: "callee";
1717
+ match?: ({
1718
+ type: "strings";
1719
+ } | {
1720
+ path?: string;
1721
+ type: "objectKeys";
1722
+ } | {
1723
+ path?: string;
1724
+ type: "objectValues";
1725
+ } | {
1726
+ match: ({
1727
+ type: "strings";
1728
+ } | {
1729
+ path?: string;
1730
+ type: "objectKeys";
1731
+ } | {
1732
+ path?: string;
1733
+ type: "objectValues";
1734
+ })[];
1735
+ type: "anonymousFunctionReturn";
1736
+ })[];
1737
+ name?: string;
1738
+ path: string;
1739
+ targetArgument?: ("all" | "first" | "last" | number);
1740
+ targetCall?: ("all" | "first" | "last" | number);
1741
+ }) | ({
1742
+ kind: "tag";
1743
+ match?: ({
1744
+ type: "strings";
1745
+ } | {
1746
+ path?: string;
1747
+ type: "objectKeys";
1748
+ } | {
1749
+ path?: string;
1750
+ type: "objectValues";
1751
+ } | {
1752
+ match: ({
1753
+ type: "strings";
1754
+ } | {
1755
+ path?: string;
1756
+ type: "objectKeys";
1757
+ } | {
1758
+ path?: string;
1759
+ type: "objectValues";
1760
+ })[];
1761
+ type: "anonymousFunctionReturn";
1762
+ })[];
1763
+ name: string;
1764
+ path?: string;
1765
+ } | {
1766
+ kind: "tag";
1767
+ match?: ({
1768
+ type: "strings";
1769
+ } | {
1770
+ path?: string;
1771
+ type: "objectKeys";
1772
+ } | {
1773
+ path?: string;
1774
+ type: "objectValues";
1775
+ } | {
1776
+ match: ({
1777
+ type: "strings";
1778
+ } | {
1779
+ path?: string;
1780
+ type: "objectKeys";
1781
+ } | {
1782
+ path?: string;
1783
+ type: "objectValues";
1784
+ })[];
1785
+ type: "anonymousFunctionReturn";
1786
+ })[];
1787
+ name?: string;
1788
+ path: string;
1789
+ }) | {
1790
+ kind: "variable";
1791
+ match?: ({
1792
+ type: "strings";
1793
+ } | {
1794
+ path?: string;
1795
+ type: "objectKeys";
1796
+ } | {
1797
+ path?: string;
1798
+ type: "objectValues";
1799
+ } | {
1800
+ match: ({
1801
+ type: "strings";
1802
+ } | {
1803
+ path?: string;
1804
+ type: "objectKeys";
1805
+ } | {
1806
+ path?: string;
1807
+ type: "objectValues";
1808
+ })[];
1809
+ type: "anonymousFunctionReturn";
1810
+ })[];
1811
+ name: string;
1812
+ })[];
1813
+ callees?: ([string, ({
1814
+ match: "strings";
1815
+ } | {
1816
+ match: "objectKeys";
1817
+ pathPattern?: string;
1818
+ } | {
1819
+ match: "objectValues";
1820
+ pathPattern?: string;
1821
+ })[]] | string)[];
1822
+ attributes?: (string | [string, ({
1823
+ match: "strings";
1824
+ } | {
1825
+ match: "objectKeys";
1826
+ pathPattern?: string;
1827
+ } | {
1828
+ match: "objectValues";
1829
+ pathPattern?: string;
1830
+ })[]])[];
1831
+ variables?: ([string, ({
1832
+ match: "strings";
1833
+ } | {
1834
+ match: "objectKeys";
1835
+ pathPattern?: string;
1836
+ } | {
1837
+ match: "objectValues";
1838
+ pathPattern?: string;
1839
+ })[]] | string)[];
1840
+ tags?: ([string, ({
1841
+ match: "strings";
1842
+ } | {
1843
+ match: "objectKeys";
1844
+ pathPattern?: string;
1845
+ } | {
1846
+ match: "objectValues";
1847
+ pathPattern?: string;
1848
+ })[]] | string)[];
1849
+ entryPoint?: string;
1850
+ messageStyle?: ("visual" | "compact" | "raw");
1851
+ tailwindConfig?: string;
1852
+ tsconfig?: string;
1853
+ detectComponentClasses?: boolean;
1854
+ rootFontSize?: number;
1855
+ cwd?: string;
1856
+ }];
1857
+ // ----- tw/no-conflicting-classes -----
1858
+ type TwNoConflictingClasses = [] | [{
1859
+ selectors?: ({
1860
+ kind: "attribute";
1861
+ match?: ({
1862
+ type: "strings";
1863
+ } | {
1864
+ path?: string;
1865
+ type: "objectKeys";
1866
+ } | {
1867
+ path?: string;
1868
+ type: "objectValues";
1869
+ } | {
1870
+ match: ({
1871
+ type: "strings";
1872
+ } | {
1873
+ path?: string;
1874
+ type: "objectKeys";
1875
+ } | {
1876
+ path?: string;
1877
+ type: "objectValues";
1878
+ })[];
1879
+ type: "anonymousFunctionReturn";
1880
+ })[];
1881
+ name: string;
1882
+ } | ({
1883
+ callTarget?: ("all" | "first" | "last" | number);
1884
+ kind: "callee";
1885
+ match?: ({
1886
+ type: "strings";
1887
+ } | {
1888
+ path?: string;
1889
+ type: "objectKeys";
1890
+ } | {
1891
+ path?: string;
1892
+ type: "objectValues";
1893
+ } | {
1894
+ match: ({
1895
+ type: "strings";
1896
+ } | {
1897
+ path?: string;
1898
+ type: "objectKeys";
1899
+ } | {
1900
+ path?: string;
1901
+ type: "objectValues";
1902
+ })[];
1903
+ type: "anonymousFunctionReturn";
1904
+ })[];
1905
+ name: string;
1906
+ path?: string;
1907
+ targetArgument?: ("all" | "first" | "last" | number);
1908
+ targetCall?: ("all" | "first" | "last" | number);
1909
+ } | {
1910
+ callTarget?: ("all" | "first" | "last" | number);
1911
+ kind: "callee";
1912
+ match?: ({
1913
+ type: "strings";
1914
+ } | {
1915
+ path?: string;
1916
+ type: "objectKeys";
1917
+ } | {
1918
+ path?: string;
1919
+ type: "objectValues";
1920
+ } | {
1921
+ match: ({
1922
+ type: "strings";
1923
+ } | {
1924
+ path?: string;
1925
+ type: "objectKeys";
1926
+ } | {
1927
+ path?: string;
1928
+ type: "objectValues";
1929
+ })[];
1930
+ type: "anonymousFunctionReturn";
1931
+ })[];
1932
+ name?: string;
1933
+ path: string;
1934
+ targetArgument?: ("all" | "first" | "last" | number);
1935
+ targetCall?: ("all" | "first" | "last" | number);
1936
+ }) | ({
1937
+ kind: "tag";
1938
+ match?: ({
1939
+ type: "strings";
1940
+ } | {
1941
+ path?: string;
1942
+ type: "objectKeys";
1943
+ } | {
1944
+ path?: string;
1945
+ type: "objectValues";
1946
+ } | {
1947
+ match: ({
1948
+ type: "strings";
1949
+ } | {
1950
+ path?: string;
1951
+ type: "objectKeys";
1952
+ } | {
1953
+ path?: string;
1954
+ type: "objectValues";
1955
+ })[];
1956
+ type: "anonymousFunctionReturn";
1957
+ })[];
1958
+ name: string;
1959
+ path?: string;
1960
+ } | {
1961
+ kind: "tag";
1962
+ match?: ({
1963
+ type: "strings";
1964
+ } | {
1965
+ path?: string;
1966
+ type: "objectKeys";
1967
+ } | {
1968
+ path?: string;
1969
+ type: "objectValues";
1970
+ } | {
1971
+ match: ({
1972
+ type: "strings";
1973
+ } | {
1974
+ path?: string;
1975
+ type: "objectKeys";
1976
+ } | {
1977
+ path?: string;
1978
+ type: "objectValues";
1979
+ })[];
1980
+ type: "anonymousFunctionReturn";
1981
+ })[];
1982
+ name?: string;
1983
+ path: string;
1984
+ }) | {
1985
+ kind: "variable";
1986
+ match?: ({
1987
+ type: "strings";
1988
+ } | {
1989
+ path?: string;
1990
+ type: "objectKeys";
1991
+ } | {
1992
+ path?: string;
1993
+ type: "objectValues";
1994
+ } | {
1995
+ match: ({
1996
+ type: "strings";
1997
+ } | {
1998
+ path?: string;
1999
+ type: "objectKeys";
2000
+ } | {
2001
+ path?: string;
2002
+ type: "objectValues";
2003
+ })[];
2004
+ type: "anonymousFunctionReturn";
2005
+ })[];
2006
+ name: string;
2007
+ })[];
2008
+ callees?: ([string, ({
2009
+ match: "strings";
2010
+ } | {
2011
+ match: "objectKeys";
2012
+ pathPattern?: string;
2013
+ } | {
2014
+ match: "objectValues";
2015
+ pathPattern?: string;
2016
+ })[]] | string)[];
2017
+ attributes?: (string | [string, ({
2018
+ match: "strings";
2019
+ } | {
2020
+ match: "objectKeys";
2021
+ pathPattern?: string;
2022
+ } | {
2023
+ match: "objectValues";
2024
+ pathPattern?: string;
2025
+ })[]])[];
2026
+ variables?: ([string, ({
2027
+ match: "strings";
2028
+ } | {
2029
+ match: "objectKeys";
2030
+ pathPattern?: string;
2031
+ } | {
2032
+ match: "objectValues";
2033
+ pathPattern?: string;
2034
+ })[]] | string)[];
2035
+ tags?: ([string, ({
2036
+ match: "strings";
2037
+ } | {
2038
+ match: "objectKeys";
2039
+ pathPattern?: string;
2040
+ } | {
2041
+ match: "objectValues";
2042
+ pathPattern?: string;
2043
+ })[]] | string)[];
2044
+ entryPoint?: string;
2045
+ messageStyle?: ("visual" | "compact" | "raw");
2046
+ tailwindConfig?: string;
2047
+ tsconfig?: string;
2048
+ detectComponentClasses?: boolean;
2049
+ rootFontSize?: number;
2050
+ cwd?: string;
2051
+ }];
2052
+ // ----- tw/no-deprecated-classes -----
2053
+ type TwNoDeprecatedClasses = [] | [{
2054
+ selectors?: ({
2055
+ kind: "attribute";
2056
+ match?: ({
2057
+ type: "strings";
2058
+ } | {
2059
+ path?: string;
2060
+ type: "objectKeys";
2061
+ } | {
2062
+ path?: string;
2063
+ type: "objectValues";
2064
+ } | {
2065
+ match: ({
2066
+ type: "strings";
2067
+ } | {
2068
+ path?: string;
2069
+ type: "objectKeys";
2070
+ } | {
2071
+ path?: string;
2072
+ type: "objectValues";
2073
+ })[];
2074
+ type: "anonymousFunctionReturn";
2075
+ })[];
2076
+ name: string;
2077
+ } | ({
2078
+ callTarget?: ("all" | "first" | "last" | number);
2079
+ kind: "callee";
2080
+ match?: ({
2081
+ type: "strings";
2082
+ } | {
2083
+ path?: string;
2084
+ type: "objectKeys";
2085
+ } | {
2086
+ path?: string;
2087
+ type: "objectValues";
2088
+ } | {
2089
+ match: ({
2090
+ type: "strings";
2091
+ } | {
2092
+ path?: string;
2093
+ type: "objectKeys";
2094
+ } | {
2095
+ path?: string;
2096
+ type: "objectValues";
2097
+ })[];
2098
+ type: "anonymousFunctionReturn";
2099
+ })[];
2100
+ name: string;
2101
+ path?: string;
2102
+ targetArgument?: ("all" | "first" | "last" | number);
2103
+ targetCall?: ("all" | "first" | "last" | number);
2104
+ } | {
2105
+ callTarget?: ("all" | "first" | "last" | number);
2106
+ kind: "callee";
2107
+ match?: ({
2108
+ type: "strings";
2109
+ } | {
2110
+ path?: string;
2111
+ type: "objectKeys";
2112
+ } | {
2113
+ path?: string;
2114
+ type: "objectValues";
2115
+ } | {
2116
+ match: ({
2117
+ type: "strings";
2118
+ } | {
2119
+ path?: string;
2120
+ type: "objectKeys";
2121
+ } | {
2122
+ path?: string;
2123
+ type: "objectValues";
2124
+ })[];
2125
+ type: "anonymousFunctionReturn";
2126
+ })[];
2127
+ name?: string;
2128
+ path: string;
2129
+ targetArgument?: ("all" | "first" | "last" | number);
2130
+ targetCall?: ("all" | "first" | "last" | number);
2131
+ }) | ({
2132
+ kind: "tag";
2133
+ match?: ({
2134
+ type: "strings";
2135
+ } | {
2136
+ path?: string;
2137
+ type: "objectKeys";
2138
+ } | {
2139
+ path?: string;
2140
+ type: "objectValues";
2141
+ } | {
2142
+ match: ({
2143
+ type: "strings";
2144
+ } | {
2145
+ path?: string;
2146
+ type: "objectKeys";
2147
+ } | {
2148
+ path?: string;
2149
+ type: "objectValues";
2150
+ })[];
2151
+ type: "anonymousFunctionReturn";
2152
+ })[];
2153
+ name: string;
2154
+ path?: string;
2155
+ } | {
2156
+ kind: "tag";
2157
+ match?: ({
2158
+ type: "strings";
2159
+ } | {
2160
+ path?: string;
2161
+ type: "objectKeys";
2162
+ } | {
2163
+ path?: string;
2164
+ type: "objectValues";
2165
+ } | {
2166
+ match: ({
2167
+ type: "strings";
2168
+ } | {
2169
+ path?: string;
2170
+ type: "objectKeys";
2171
+ } | {
2172
+ path?: string;
2173
+ type: "objectValues";
2174
+ })[];
2175
+ type: "anonymousFunctionReturn";
2176
+ })[];
2177
+ name?: string;
2178
+ path: string;
2179
+ }) | {
2180
+ kind: "variable";
2181
+ match?: ({
2182
+ type: "strings";
2183
+ } | {
2184
+ path?: string;
2185
+ type: "objectKeys";
2186
+ } | {
2187
+ path?: string;
2188
+ type: "objectValues";
2189
+ } | {
2190
+ match: ({
2191
+ type: "strings";
2192
+ } | {
2193
+ path?: string;
2194
+ type: "objectKeys";
2195
+ } | {
2196
+ path?: string;
2197
+ type: "objectValues";
2198
+ })[];
2199
+ type: "anonymousFunctionReturn";
2200
+ })[];
2201
+ name: string;
2202
+ })[];
2203
+ callees?: ([string, ({
2204
+ match: "strings";
2205
+ } | {
2206
+ match: "objectKeys";
2207
+ pathPattern?: string;
2208
+ } | {
2209
+ match: "objectValues";
2210
+ pathPattern?: string;
2211
+ })[]] | string)[];
2212
+ attributes?: (string | [string, ({
2213
+ match: "strings";
2214
+ } | {
2215
+ match: "objectKeys";
2216
+ pathPattern?: string;
2217
+ } | {
2218
+ match: "objectValues";
2219
+ pathPattern?: string;
2220
+ })[]])[];
2221
+ variables?: ([string, ({
2222
+ match: "strings";
2223
+ } | {
2224
+ match: "objectKeys";
2225
+ pathPattern?: string;
2226
+ } | {
2227
+ match: "objectValues";
2228
+ pathPattern?: string;
2229
+ })[]] | string)[];
2230
+ tags?: ([string, ({
2231
+ match: "strings";
2232
+ } | {
2233
+ match: "objectKeys";
2234
+ pathPattern?: string;
2235
+ } | {
2236
+ match: "objectValues";
2237
+ pathPattern?: string;
2238
+ })[]] | string)[];
2239
+ entryPoint?: string;
2240
+ messageStyle?: ("visual" | "compact" | "raw");
2241
+ tailwindConfig?: string;
2242
+ tsconfig?: string;
2243
+ detectComponentClasses?: boolean;
2244
+ rootFontSize?: number;
2245
+ cwd?: string;
2246
+ }];
2247
+ // ----- tw/no-duplicate-classes -----
2248
+ type TwNoDuplicateClasses = [] | [{
2249
+ selectors?: ({
2250
+ kind: "attribute";
2251
+ match?: ({
2252
+ type: "strings";
2253
+ } | {
2254
+ path?: string;
2255
+ type: "objectKeys";
2256
+ } | {
2257
+ path?: string;
2258
+ type: "objectValues";
2259
+ } | {
2260
+ match: ({
2261
+ type: "strings";
2262
+ } | {
2263
+ path?: string;
2264
+ type: "objectKeys";
2265
+ } | {
2266
+ path?: string;
2267
+ type: "objectValues";
2268
+ })[];
2269
+ type: "anonymousFunctionReturn";
2270
+ })[];
2271
+ name: string;
2272
+ } | ({
2273
+ callTarget?: ("all" | "first" | "last" | number);
2274
+ kind: "callee";
2275
+ match?: ({
2276
+ type: "strings";
2277
+ } | {
2278
+ path?: string;
2279
+ type: "objectKeys";
2280
+ } | {
2281
+ path?: string;
2282
+ type: "objectValues";
2283
+ } | {
2284
+ match: ({
2285
+ type: "strings";
2286
+ } | {
2287
+ path?: string;
2288
+ type: "objectKeys";
2289
+ } | {
2290
+ path?: string;
2291
+ type: "objectValues";
2292
+ })[];
2293
+ type: "anonymousFunctionReturn";
2294
+ })[];
2295
+ name: string;
2296
+ path?: string;
2297
+ targetArgument?: ("all" | "first" | "last" | number);
2298
+ targetCall?: ("all" | "first" | "last" | number);
2299
+ } | {
2300
+ callTarget?: ("all" | "first" | "last" | number);
2301
+ kind: "callee";
2302
+ match?: ({
2303
+ type: "strings";
2304
+ } | {
2305
+ path?: string;
2306
+ type: "objectKeys";
2307
+ } | {
2308
+ path?: string;
2309
+ type: "objectValues";
2310
+ } | {
2311
+ match: ({
2312
+ type: "strings";
2313
+ } | {
2314
+ path?: string;
2315
+ type: "objectKeys";
2316
+ } | {
2317
+ path?: string;
2318
+ type: "objectValues";
2319
+ })[];
2320
+ type: "anonymousFunctionReturn";
2321
+ })[];
2322
+ name?: string;
2323
+ path: string;
2324
+ targetArgument?: ("all" | "first" | "last" | number);
2325
+ targetCall?: ("all" | "first" | "last" | number);
2326
+ }) | ({
2327
+ kind: "tag";
2328
+ match?: ({
2329
+ type: "strings";
2330
+ } | {
2331
+ path?: string;
2332
+ type: "objectKeys";
2333
+ } | {
2334
+ path?: string;
2335
+ type: "objectValues";
2336
+ } | {
2337
+ match: ({
2338
+ type: "strings";
2339
+ } | {
2340
+ path?: string;
2341
+ type: "objectKeys";
2342
+ } | {
2343
+ path?: string;
2344
+ type: "objectValues";
2345
+ })[];
2346
+ type: "anonymousFunctionReturn";
2347
+ })[];
2348
+ name: string;
2349
+ path?: string;
2350
+ } | {
2351
+ kind: "tag";
2352
+ match?: ({
2353
+ type: "strings";
2354
+ } | {
2355
+ path?: string;
2356
+ type: "objectKeys";
2357
+ } | {
2358
+ path?: string;
2359
+ type: "objectValues";
2360
+ } | {
2361
+ match: ({
2362
+ type: "strings";
2363
+ } | {
2364
+ path?: string;
2365
+ type: "objectKeys";
2366
+ } | {
2367
+ path?: string;
2368
+ type: "objectValues";
2369
+ })[];
2370
+ type: "anonymousFunctionReturn";
2371
+ })[];
2372
+ name?: string;
2373
+ path: string;
2374
+ }) | {
2375
+ kind: "variable";
2376
+ match?: ({
2377
+ type: "strings";
2378
+ } | {
2379
+ path?: string;
2380
+ type: "objectKeys";
2381
+ } | {
2382
+ path?: string;
2383
+ type: "objectValues";
2384
+ } | {
2385
+ match: ({
2386
+ type: "strings";
2387
+ } | {
2388
+ path?: string;
2389
+ type: "objectKeys";
2390
+ } | {
2391
+ path?: string;
2392
+ type: "objectValues";
2393
+ })[];
2394
+ type: "anonymousFunctionReturn";
2395
+ })[];
2396
+ name: string;
2397
+ })[];
2398
+ callees?: ([string, ({
2399
+ match: "strings";
2400
+ } | {
2401
+ match: "objectKeys";
2402
+ pathPattern?: string;
2403
+ } | {
2404
+ match: "objectValues";
2405
+ pathPattern?: string;
2406
+ })[]] | string)[];
2407
+ attributes?: (string | [string, ({
2408
+ match: "strings";
2409
+ } | {
2410
+ match: "objectKeys";
2411
+ pathPattern?: string;
2412
+ } | {
2413
+ match: "objectValues";
2414
+ pathPattern?: string;
2415
+ })[]])[];
2416
+ variables?: ([string, ({
2417
+ match: "strings";
2418
+ } | {
2419
+ match: "objectKeys";
2420
+ pathPattern?: string;
2421
+ } | {
2422
+ match: "objectValues";
2423
+ pathPattern?: string;
2424
+ })[]] | string)[];
2425
+ tags?: ([string, ({
2426
+ match: "strings";
2427
+ } | {
2428
+ match: "objectKeys";
2429
+ pathPattern?: string;
2430
+ } | {
2431
+ match: "objectValues";
2432
+ pathPattern?: string;
2433
+ })[]] | string)[];
2434
+ entryPoint?: string;
2435
+ messageStyle?: ("visual" | "compact" | "raw");
2436
+ tailwindConfig?: string;
2437
+ tsconfig?: string;
2438
+ detectComponentClasses?: boolean;
2439
+ rootFontSize?: number;
2440
+ cwd?: string;
2441
+ }];
2442
+ // ----- tw/no-restricted-classes -----
2443
+ type TwNoRestrictedClasses = [] | [{
2444
+ selectors?: ({
2445
+ kind: "attribute";
2446
+ match?: ({
2447
+ type: "strings";
2448
+ } | {
2449
+ path?: string;
2450
+ type: "objectKeys";
2451
+ } | {
2452
+ path?: string;
2453
+ type: "objectValues";
2454
+ } | {
2455
+ match: ({
2456
+ type: "strings";
2457
+ } | {
2458
+ path?: string;
2459
+ type: "objectKeys";
2460
+ } | {
2461
+ path?: string;
2462
+ type: "objectValues";
2463
+ })[];
2464
+ type: "anonymousFunctionReturn";
2465
+ })[];
2466
+ name: string;
2467
+ } | ({
2468
+ callTarget?: ("all" | "first" | "last" | number);
2469
+ kind: "callee";
2470
+ match?: ({
2471
+ type: "strings";
2472
+ } | {
2473
+ path?: string;
2474
+ type: "objectKeys";
2475
+ } | {
2476
+ path?: string;
2477
+ type: "objectValues";
2478
+ } | {
2479
+ match: ({
2480
+ type: "strings";
2481
+ } | {
2482
+ path?: string;
2483
+ type: "objectKeys";
2484
+ } | {
2485
+ path?: string;
2486
+ type: "objectValues";
2487
+ })[];
2488
+ type: "anonymousFunctionReturn";
2489
+ })[];
2490
+ name: string;
2491
+ path?: string;
2492
+ targetArgument?: ("all" | "first" | "last" | number);
2493
+ targetCall?: ("all" | "first" | "last" | number);
2494
+ } | {
2495
+ callTarget?: ("all" | "first" | "last" | number);
2496
+ kind: "callee";
2497
+ match?: ({
2498
+ type: "strings";
2499
+ } | {
2500
+ path?: string;
2501
+ type: "objectKeys";
2502
+ } | {
2503
+ path?: string;
2504
+ type: "objectValues";
2505
+ } | {
2506
+ match: ({
2507
+ type: "strings";
2508
+ } | {
2509
+ path?: string;
2510
+ type: "objectKeys";
2511
+ } | {
2512
+ path?: string;
2513
+ type: "objectValues";
2514
+ })[];
2515
+ type: "anonymousFunctionReturn";
2516
+ })[];
2517
+ name?: string;
2518
+ path: string;
2519
+ targetArgument?: ("all" | "first" | "last" | number);
2520
+ targetCall?: ("all" | "first" | "last" | number);
2521
+ }) | ({
2522
+ kind: "tag";
2523
+ match?: ({
2524
+ type: "strings";
2525
+ } | {
2526
+ path?: string;
2527
+ type: "objectKeys";
2528
+ } | {
2529
+ path?: string;
2530
+ type: "objectValues";
2531
+ } | {
2532
+ match: ({
2533
+ type: "strings";
2534
+ } | {
2535
+ path?: string;
2536
+ type: "objectKeys";
2537
+ } | {
2538
+ path?: string;
2539
+ type: "objectValues";
2540
+ })[];
2541
+ type: "anonymousFunctionReturn";
2542
+ })[];
2543
+ name: string;
2544
+ path?: string;
2545
+ } | {
2546
+ kind: "tag";
2547
+ match?: ({
2548
+ type: "strings";
2549
+ } | {
2550
+ path?: string;
2551
+ type: "objectKeys";
2552
+ } | {
2553
+ path?: string;
2554
+ type: "objectValues";
2555
+ } | {
2556
+ match: ({
2557
+ type: "strings";
2558
+ } | {
2559
+ path?: string;
2560
+ type: "objectKeys";
2561
+ } | {
2562
+ path?: string;
2563
+ type: "objectValues";
2564
+ })[];
2565
+ type: "anonymousFunctionReturn";
2566
+ })[];
2567
+ name?: string;
2568
+ path: string;
2569
+ }) | {
2570
+ kind: "variable";
2571
+ match?: ({
2572
+ type: "strings";
2573
+ } | {
2574
+ path?: string;
2575
+ type: "objectKeys";
2576
+ } | {
2577
+ path?: string;
2578
+ type: "objectValues";
2579
+ } | {
2580
+ match: ({
2581
+ type: "strings";
2582
+ } | {
2583
+ path?: string;
2584
+ type: "objectKeys";
2585
+ } | {
2586
+ path?: string;
2587
+ type: "objectValues";
2588
+ })[];
2589
+ type: "anonymousFunctionReturn";
2590
+ })[];
2591
+ name: string;
2592
+ })[];
2593
+ callees?: ([string, ({
2594
+ match: "strings";
2595
+ } | {
2596
+ match: "objectKeys";
2597
+ pathPattern?: string;
2598
+ } | {
2599
+ match: "objectValues";
2600
+ pathPattern?: string;
2601
+ })[]] | string)[];
2602
+ attributes?: (string | [string, ({
2603
+ match: "strings";
2604
+ } | {
2605
+ match: "objectKeys";
2606
+ pathPattern?: string;
2607
+ } | {
2608
+ match: "objectValues";
2609
+ pathPattern?: string;
2610
+ })[]])[];
2611
+ variables?: ([string, ({
2612
+ match: "strings";
2613
+ } | {
2614
+ match: "objectKeys";
2615
+ pathPattern?: string;
2616
+ } | {
2617
+ match: "objectValues";
2618
+ pathPattern?: string;
2619
+ })[]] | string)[];
2620
+ tags?: ([string, ({
2621
+ match: "strings";
2622
+ } | {
2623
+ match: "objectKeys";
2624
+ pathPattern?: string;
2625
+ } | {
2626
+ match: "objectValues";
2627
+ pathPattern?: string;
2628
+ })[]] | string)[];
2629
+ entryPoint?: string;
2630
+ messageStyle?: ("visual" | "compact" | "raw");
2631
+ tailwindConfig?: string;
2632
+ tsconfig?: string;
2633
+ detectComponentClasses?: boolean;
2634
+ rootFontSize?: number;
2635
+ cwd?: string;
2636
+ restrict?: ({
2637
+ fix?: string;
2638
+ message?: string;
2639
+ pattern: string;
2640
+ } | string)[];
2641
+ }];
2642
+ // ----- tw/no-unknown-classes -----
2643
+ type TwNoUnknownClasses = [] | [{
2644
+ selectors?: ({
2645
+ kind: "attribute";
2646
+ match?: ({
2647
+ type: "strings";
2648
+ } | {
2649
+ path?: string;
2650
+ type: "objectKeys";
2651
+ } | {
2652
+ path?: string;
2653
+ type: "objectValues";
2654
+ } | {
2655
+ match: ({
2656
+ type: "strings";
2657
+ } | {
2658
+ path?: string;
2659
+ type: "objectKeys";
2660
+ } | {
2661
+ path?: string;
2662
+ type: "objectValues";
2663
+ })[];
2664
+ type: "anonymousFunctionReturn";
2665
+ })[];
2666
+ name: string;
2667
+ } | ({
2668
+ callTarget?: ("all" | "first" | "last" | number);
2669
+ kind: "callee";
2670
+ match?: ({
2671
+ type: "strings";
2672
+ } | {
2673
+ path?: string;
2674
+ type: "objectKeys";
2675
+ } | {
2676
+ path?: string;
2677
+ type: "objectValues";
2678
+ } | {
2679
+ match: ({
2680
+ type: "strings";
2681
+ } | {
2682
+ path?: string;
2683
+ type: "objectKeys";
2684
+ } | {
2685
+ path?: string;
2686
+ type: "objectValues";
2687
+ })[];
2688
+ type: "anonymousFunctionReturn";
2689
+ })[];
2690
+ name: string;
2691
+ path?: string;
2692
+ targetArgument?: ("all" | "first" | "last" | number);
2693
+ targetCall?: ("all" | "first" | "last" | number);
2694
+ } | {
2695
+ callTarget?: ("all" | "first" | "last" | number);
2696
+ kind: "callee";
2697
+ match?: ({
2698
+ type: "strings";
2699
+ } | {
2700
+ path?: string;
2701
+ type: "objectKeys";
2702
+ } | {
2703
+ path?: string;
2704
+ type: "objectValues";
2705
+ } | {
2706
+ match: ({
2707
+ type: "strings";
2708
+ } | {
2709
+ path?: string;
2710
+ type: "objectKeys";
2711
+ } | {
2712
+ path?: string;
2713
+ type: "objectValues";
2714
+ })[];
2715
+ type: "anonymousFunctionReturn";
2716
+ })[];
2717
+ name?: string;
2718
+ path: string;
2719
+ targetArgument?: ("all" | "first" | "last" | number);
2720
+ targetCall?: ("all" | "first" | "last" | number);
2721
+ }) | ({
2722
+ kind: "tag";
2723
+ match?: ({
2724
+ type: "strings";
2725
+ } | {
2726
+ path?: string;
2727
+ type: "objectKeys";
2728
+ } | {
2729
+ path?: string;
2730
+ type: "objectValues";
2731
+ } | {
2732
+ match: ({
2733
+ type: "strings";
2734
+ } | {
2735
+ path?: string;
2736
+ type: "objectKeys";
2737
+ } | {
2738
+ path?: string;
2739
+ type: "objectValues";
2740
+ })[];
2741
+ type: "anonymousFunctionReturn";
2742
+ })[];
2743
+ name: string;
2744
+ path?: string;
2745
+ } | {
2746
+ kind: "tag";
2747
+ match?: ({
2748
+ type: "strings";
2749
+ } | {
2750
+ path?: string;
2751
+ type: "objectKeys";
2752
+ } | {
2753
+ path?: string;
2754
+ type: "objectValues";
2755
+ } | {
2756
+ match: ({
2757
+ type: "strings";
2758
+ } | {
2759
+ path?: string;
2760
+ type: "objectKeys";
2761
+ } | {
2762
+ path?: string;
2763
+ type: "objectValues";
2764
+ })[];
2765
+ type: "anonymousFunctionReturn";
2766
+ })[];
2767
+ name?: string;
2768
+ path: string;
2769
+ }) | {
2770
+ kind: "variable";
2771
+ match?: ({
2772
+ type: "strings";
2773
+ } | {
2774
+ path?: string;
2775
+ type: "objectKeys";
2776
+ } | {
2777
+ path?: string;
2778
+ type: "objectValues";
2779
+ } | {
2780
+ match: ({
2781
+ type: "strings";
2782
+ } | {
2783
+ path?: string;
2784
+ type: "objectKeys";
2785
+ } | {
2786
+ path?: string;
2787
+ type: "objectValues";
2788
+ })[];
2789
+ type: "anonymousFunctionReturn";
2790
+ })[];
2791
+ name: string;
2792
+ })[];
2793
+ callees?: ([string, ({
2794
+ match: "strings";
2795
+ } | {
2796
+ match: "objectKeys";
2797
+ pathPattern?: string;
2798
+ } | {
2799
+ match: "objectValues";
2800
+ pathPattern?: string;
2801
+ })[]] | string)[];
2802
+ attributes?: (string | [string, ({
2803
+ match: "strings";
2804
+ } | {
2805
+ match: "objectKeys";
2806
+ pathPattern?: string;
2807
+ } | {
2808
+ match: "objectValues";
2809
+ pathPattern?: string;
2810
+ })[]])[];
2811
+ variables?: ([string, ({
2812
+ match: "strings";
2813
+ } | {
2814
+ match: "objectKeys";
2815
+ pathPattern?: string;
2816
+ } | {
2817
+ match: "objectValues";
2818
+ pathPattern?: string;
2819
+ })[]] | string)[];
2820
+ tags?: ([string, ({
2821
+ match: "strings";
2822
+ } | {
2823
+ match: "objectKeys";
2824
+ pathPattern?: string;
2825
+ } | {
2826
+ match: "objectValues";
2827
+ pathPattern?: string;
2828
+ })[]] | string)[];
2829
+ entryPoint?: string;
2830
+ messageStyle?: ("visual" | "compact" | "raw");
2831
+ tailwindConfig?: string;
2832
+ tsconfig?: string;
2833
+ detectComponentClasses?: boolean;
2834
+ rootFontSize?: number;
2835
+ cwd?: string;
2836
+ ignore?: string[];
2837
+ }];
2838
+ // ----- tw/no-unnecessary-whitespace -----
2839
+ type TwNoUnnecessaryWhitespace = [] | [{
2840
+ selectors?: ({
2841
+ kind: "attribute";
2842
+ match?: ({
2843
+ type: "strings";
2844
+ } | {
2845
+ path?: string;
2846
+ type: "objectKeys";
2847
+ } | {
2848
+ path?: string;
2849
+ type: "objectValues";
2850
+ } | {
2851
+ match: ({
2852
+ type: "strings";
2853
+ } | {
2854
+ path?: string;
2855
+ type: "objectKeys";
2856
+ } | {
2857
+ path?: string;
2858
+ type: "objectValues";
2859
+ })[];
2860
+ type: "anonymousFunctionReturn";
2861
+ })[];
2862
+ name: string;
2863
+ } | ({
2864
+ callTarget?: ("all" | "first" | "last" | number);
2865
+ kind: "callee";
2866
+ match?: ({
2867
+ type: "strings";
2868
+ } | {
2869
+ path?: string;
2870
+ type: "objectKeys";
2871
+ } | {
2872
+ path?: string;
2873
+ type: "objectValues";
2874
+ } | {
2875
+ match: ({
2876
+ type: "strings";
2877
+ } | {
2878
+ path?: string;
2879
+ type: "objectKeys";
2880
+ } | {
2881
+ path?: string;
2882
+ type: "objectValues";
2883
+ })[];
2884
+ type: "anonymousFunctionReturn";
2885
+ })[];
2886
+ name: string;
2887
+ path?: string;
2888
+ targetArgument?: ("all" | "first" | "last" | number);
2889
+ targetCall?: ("all" | "first" | "last" | number);
2890
+ } | {
2891
+ callTarget?: ("all" | "first" | "last" | number);
2892
+ kind: "callee";
2893
+ match?: ({
2894
+ type: "strings";
2895
+ } | {
2896
+ path?: string;
2897
+ type: "objectKeys";
2898
+ } | {
2899
+ path?: string;
2900
+ type: "objectValues";
2901
+ } | {
2902
+ match: ({
2903
+ type: "strings";
2904
+ } | {
2905
+ path?: string;
2906
+ type: "objectKeys";
2907
+ } | {
2908
+ path?: string;
2909
+ type: "objectValues";
2910
+ })[];
2911
+ type: "anonymousFunctionReturn";
2912
+ })[];
2913
+ name?: string;
2914
+ path: string;
2915
+ targetArgument?: ("all" | "first" | "last" | number);
2916
+ targetCall?: ("all" | "first" | "last" | number);
2917
+ }) | ({
2918
+ kind: "tag";
2919
+ match?: ({
2920
+ type: "strings";
2921
+ } | {
2922
+ path?: string;
2923
+ type: "objectKeys";
2924
+ } | {
2925
+ path?: string;
2926
+ type: "objectValues";
2927
+ } | {
2928
+ match: ({
2929
+ type: "strings";
2930
+ } | {
2931
+ path?: string;
2932
+ type: "objectKeys";
2933
+ } | {
2934
+ path?: string;
2935
+ type: "objectValues";
2936
+ })[];
2937
+ type: "anonymousFunctionReturn";
2938
+ })[];
2939
+ name: string;
2940
+ path?: string;
2941
+ } | {
2942
+ kind: "tag";
2943
+ match?: ({
2944
+ type: "strings";
2945
+ } | {
2946
+ path?: string;
2947
+ type: "objectKeys";
2948
+ } | {
2949
+ path?: string;
2950
+ type: "objectValues";
2951
+ } | {
2952
+ match: ({
2953
+ type: "strings";
2954
+ } | {
2955
+ path?: string;
2956
+ type: "objectKeys";
2957
+ } | {
2958
+ path?: string;
2959
+ type: "objectValues";
2960
+ })[];
2961
+ type: "anonymousFunctionReturn";
2962
+ })[];
2963
+ name?: string;
2964
+ path: string;
2965
+ }) | {
2966
+ kind: "variable";
2967
+ match?: ({
2968
+ type: "strings";
2969
+ } | {
2970
+ path?: string;
2971
+ type: "objectKeys";
2972
+ } | {
2973
+ path?: string;
2974
+ type: "objectValues";
2975
+ } | {
2976
+ match: ({
2977
+ type: "strings";
2978
+ } | {
2979
+ path?: string;
2980
+ type: "objectKeys";
2981
+ } | {
2982
+ path?: string;
2983
+ type: "objectValues";
2984
+ })[];
2985
+ type: "anonymousFunctionReturn";
2986
+ })[];
2987
+ name: string;
2988
+ })[];
2989
+ callees?: ([string, ({
2990
+ match: "strings";
2991
+ } | {
2992
+ match: "objectKeys";
2993
+ pathPattern?: string;
2994
+ } | {
2995
+ match: "objectValues";
2996
+ pathPattern?: string;
2997
+ })[]] | string)[];
2998
+ attributes?: (string | [string, ({
2999
+ match: "strings";
3000
+ } | {
3001
+ match: "objectKeys";
3002
+ pathPattern?: string;
3003
+ } | {
3004
+ match: "objectValues";
3005
+ pathPattern?: string;
3006
+ })[]])[];
3007
+ variables?: ([string, ({
3008
+ match: "strings";
3009
+ } | {
3010
+ match: "objectKeys";
3011
+ pathPattern?: string;
3012
+ } | {
3013
+ match: "objectValues";
3014
+ pathPattern?: string;
3015
+ })[]] | string)[];
3016
+ tags?: ([string, ({
3017
+ match: "strings";
3018
+ } | {
3019
+ match: "objectKeys";
3020
+ pathPattern?: string;
3021
+ } | {
3022
+ match: "objectValues";
3023
+ pathPattern?: string;
3024
+ })[]] | string)[];
3025
+ entryPoint?: string;
3026
+ messageStyle?: ("visual" | "compact" | "raw");
3027
+ tailwindConfig?: string;
3028
+ tsconfig?: string;
3029
+ detectComponentClasses?: boolean;
3030
+ rootFontSize?: number;
3031
+ cwd?: string;
3032
+ allowMultiline?: boolean;
3033
+ }];
3034
+ //#endregion
3035
+ //#region src/types.d.ts
3036
+ type Options = Parameters<typeof antfu>[0] & {
3037
+ /**
3038
+ * Enable Tailwind rules.
3039
+ *
3040
+ * @default auto-detect based on the dependencies
3041
+ */
3042
+ tailwindcss?: boolean | OptionsTailwindCSS;
3043
+ /**
3044
+ * Enable React Native support.
3045
+ *
3046
+ * Will enable `react` support automatically.
3047
+ *
3048
+ * @default auto-detect based on the dependencies
3049
+ */
3050
+ reactnative?: boolean;
3051
+ /**
3052
+ * Enable react rules.
3053
+ *
3054
+ * @default auto-detect based on the dependencies
3055
+ */
3056
+ react?: boolean | OptionsOverrides;
3057
+ };
3058
+ type UserConfig = Parameters<typeof antfu>[1] & {
3059
+ rules?: RuleOptions;
3060
+ };
3061
+ type OptionsReturn = ReturnType<typeof antfu>;
3062
+ type PickKeysByPrefix<T extends object, P extends string> = { [K in keyof T as K extends `${P}${string}` ? K : never]: T[K]; };
3063
+ type RuleOptionsTailwindCSS = PickKeysByPrefix<RuleOptions, 'tw/'>;
3064
+ interface OptionsTailwindCSS {
3065
+ overrides?: Partial<RuleOptionsTailwindCSS>;
3066
+ settings?: {
3067
+ entryPoint?: string;
3068
+ tailwindConfig?: string;
3069
+ attributes?: string[];
3070
+ callees?: string[];
3071
+ variables?: string[];
3072
+ tags?: string[];
3073
+ };
3074
+ }
3075
+ //#endregion
3076
+ //#region src/index.d.ts
3077
+ declare function wongxy(options?: Options, ...userConfigs: UserConfig[]): OptionsReturn;
3078
+ //#endregion
3079
+ export { wongxy as default };