eslint-plugin-better-tailwindcss 4.3.1 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +35 -0
  2. package/lib/api/defaults.d.ts +15 -0
  3. package/lib/api/defaults.d.ts.map +1 -1
  4. package/lib/api/types.d.ts +7 -2
  5. package/lib/api/types.d.ts.map +1 -1
  6. package/lib/api/types.js +4 -1
  7. package/lib/api/types.js.map +1 -1
  8. package/lib/async-utils/escape.d.ts.map +1 -1
  9. package/lib/async-utils/escape.js +2 -1
  10. package/lib/async-utils/escape.js.map +1 -1
  11. package/lib/async-utils/fs.d.ts +1 -1
  12. package/lib/async-utils/fs.d.ts.map +1 -1
  13. package/lib/async-utils/fs.js +2 -6
  14. package/lib/async-utils/fs.js.map +1 -1
  15. package/lib/async-utils/operations.d.ts +2 -0
  16. package/lib/async-utils/operations.d.ts.map +1 -1
  17. package/lib/async-utils/regex.d.ts +3 -0
  18. package/lib/async-utils/regex.d.ts.map +1 -0
  19. package/lib/async-utils/regex.js +32 -0
  20. package/lib/async-utils/regex.js.map +1 -0
  21. package/lib/async-utils/worker.d.ts.map +1 -1
  22. package/lib/async-utils/worker.js +3 -2
  23. package/lib/async-utils/worker.js.map +1 -1
  24. package/lib/configs/config.d.ts +2921 -33
  25. package/lib/configs/config.d.ts.map +1 -1
  26. package/lib/configs/config.js +4 -0
  27. package/lib/configs/config.js.map +1 -1
  28. package/lib/options/callees/cc.js +2 -2
  29. package/lib/options/callees/cc.js.map +1 -1
  30. package/lib/options/callees/clb.js +3 -3
  31. package/lib/options/callees/clb.js.map +1 -1
  32. package/lib/options/callees/clsx.js +2 -2
  33. package/lib/options/callees/clsx.js.map +1 -1
  34. package/lib/options/callees/cn.js +2 -2
  35. package/lib/options/callees/cn.js.map +1 -1
  36. package/lib/options/callees/cnb.js +2 -2
  37. package/lib/options/callees/cnb.js.map +1 -1
  38. package/lib/options/callees/ctl.js +1 -1
  39. package/lib/options/callees/ctl.js.map +1 -1
  40. package/lib/options/callees/cva.js +3 -3
  41. package/lib/options/callees/cva.js.map +1 -1
  42. package/lib/options/callees/cx.js +2 -2
  43. package/lib/options/callees/cx.js.map +1 -1
  44. package/lib/options/callees/dcnb.js +2 -2
  45. package/lib/options/callees/dcnb.js.map +1 -1
  46. package/lib/options/callees/objstr.js +2 -2
  47. package/lib/options/callees/objstr.js.map +1 -1
  48. package/lib/options/callees/tv.js +6 -6
  49. package/lib/options/callees/tv.js.map +1 -1
  50. package/lib/options/callees/twJoin.js +1 -1
  51. package/lib/options/callees/twJoin.js.map +1 -1
  52. package/lib/options/callees/twMerge.js +1 -1
  53. package/lib/options/callees/twMerge.js.map +1 -1
  54. package/lib/options/default-options.d.ts +31 -1
  55. package/lib/options/default-options.d.ts.map +1 -1
  56. package/lib/options/default-options.js +9 -3
  57. package/lib/options/default-options.js.map +1 -1
  58. package/lib/options/descriptions.d.ts +308 -2
  59. package/lib/options/descriptions.d.ts.map +1 -1
  60. package/lib/options/descriptions.js +3 -2
  61. package/lib/options/descriptions.js.map +1 -1
  62. package/lib/options/migrate.js +29 -12
  63. package/lib/options/migrate.js.map +1 -1
  64. package/lib/options/schemas/common.d.ts +4 -0
  65. package/lib/options/schemas/common.d.ts.map +1 -1
  66. package/lib/options/schemas/common.js +3 -0
  67. package/lib/options/schemas/common.js.map +1 -1
  68. package/lib/options/schemas/selectors.d.ts +806 -5
  69. package/lib/options/schemas/selectors.d.ts.map +1 -1
  70. package/lib/options/schemas/selectors.js +42 -11
  71. package/lib/options/schemas/selectors.js.map +1 -1
  72. package/lib/options/tags/twc.d.ts +36 -0
  73. package/lib/options/tags/twc.d.ts.map +1 -0
  74. package/lib/options/tags/twc.js +26 -0
  75. package/lib/options/tags/twc.js.map +1 -0
  76. package/lib/options/tags/twx.d.ts +36 -0
  77. package/lib/options/tags/twx.d.ts.map +1 -0
  78. package/lib/options/tags/twx.js +26 -0
  79. package/lib/options/tags/twx.js.map +1 -0
  80. package/lib/parsers/angular.d.ts.map +1 -1
  81. package/lib/parsers/angular.js +54 -12
  82. package/lib/parsers/angular.js.map +1 -1
  83. package/lib/parsers/es.d.ts +11 -2
  84. package/lib/parsers/es.d.ts.map +1 -1
  85. package/lib/parsers/es.js +270 -58
  86. package/lib/parsers/es.js.map +1 -1
  87. package/lib/parsers/svelte.d.ts.map +1 -1
  88. package/lib/parsers/svelte.js +7 -64
  89. package/lib/parsers/svelte.js.map +1 -1
  90. package/lib/parsers/vue.d.ts.map +1 -1
  91. package/lib/parsers/vue.js +6 -65
  92. package/lib/parsers/vue.js.map +1 -1
  93. package/lib/rules/enforce-canonical-classes.d.ts +172 -2
  94. package/lib/rules/enforce-canonical-classes.d.ts.map +1 -1
  95. package/lib/rules/enforce-consistent-class-order.d.ts +172 -2
  96. package/lib/rules/enforce-consistent-class-order.d.ts.map +1 -1
  97. package/lib/rules/enforce-consistent-class-order.js +26 -8
  98. package/lib/rules/enforce-consistent-class-order.js.map +1 -1
  99. package/lib/rules/enforce-consistent-important-position.d.ts +172 -2
  100. package/lib/rules/enforce-consistent-important-position.d.ts.map +1 -1
  101. package/lib/rules/enforce-consistent-important-position.js +2 -1
  102. package/lib/rules/enforce-consistent-important-position.js.map +1 -1
  103. package/lib/rules/enforce-consistent-line-wrapping.d.ts +172 -2
  104. package/lib/rules/enforce-consistent-line-wrapping.d.ts.map +1 -1
  105. package/lib/rules/enforce-consistent-line-wrapping.js +30 -0
  106. package/lib/rules/enforce-consistent-line-wrapping.js.map +1 -1
  107. package/lib/rules/enforce-consistent-variable-syntax.d.ts +172 -2
  108. package/lib/rules/enforce-consistent-variable-syntax.d.ts.map +1 -1
  109. package/lib/rules/enforce-consistent-variable-syntax.js +3 -2
  110. package/lib/rules/enforce-consistent-variable-syntax.js.map +1 -1
  111. package/lib/rules/enforce-consistent-variant-order.d.ts +426 -0
  112. package/lib/rules/enforce-consistent-variant-order.d.ts.map +1 -0
  113. package/lib/rules/enforce-consistent-variant-order.js +75 -0
  114. package/lib/rules/enforce-consistent-variant-order.js.map +1 -0
  115. package/lib/rules/enforce-logical-properties.d.ts +426 -0
  116. package/lib/rules/enforce-logical-properties.d.ts.map +1 -0
  117. package/lib/rules/enforce-logical-properties.js +118 -0
  118. package/lib/rules/enforce-logical-properties.js.map +1 -0
  119. package/lib/rules/enforce-shorthand-classes.d.ts +172 -2
  120. package/lib/rules/enforce-shorthand-classes.d.ts.map +1 -1
  121. package/lib/rules/no-conflicting-classes.d.ts +172 -2
  122. package/lib/rules/no-conflicting-classes.d.ts.map +1 -1
  123. package/lib/rules/no-deprecated-classes.d.ts +173 -3
  124. package/lib/rules/no-deprecated-classes.d.ts.map +1 -1
  125. package/lib/rules/no-duplicate-classes.d.ts +172 -2
  126. package/lib/rules/no-duplicate-classes.d.ts.map +1 -1
  127. package/lib/rules/no-restricted-classes.d.ts +172 -2
  128. package/lib/rules/no-restricted-classes.d.ts.map +1 -1
  129. package/lib/rules/no-unknown-classes.d.ts +172 -2
  130. package/lib/rules/no-unknown-classes.d.ts.map +1 -1
  131. package/lib/rules/no-unknown-classes.js +8 -7
  132. package/lib/rules/no-unknown-classes.js.map +1 -1
  133. package/lib/rules/no-unnecessary-whitespace.d.ts +172 -2
  134. package/lib/rules/no-unnecessary-whitespace.d.ts.map +1 -1
  135. package/lib/rules/no-unnecessary-whitespace.js +32 -0
  136. package/lib/rules/no-unnecessary-whitespace.js.map +1 -1
  137. package/lib/tailwindcss/dissect-classes.async.v3.d.ts.map +1 -1
  138. package/lib/tailwindcss/dissect-classes.async.v3.js +4 -3
  139. package/lib/tailwindcss/dissect-classes.async.v3.js.map +1 -1
  140. package/lib/tailwindcss/dissect-classes.async.v4.d.ts.map +1 -1
  141. package/lib/tailwindcss/dissect-classes.async.v4.js +6 -5
  142. package/lib/tailwindcss/dissect-classes.async.v4.js.map +1 -1
  143. package/lib/tailwindcss/tailwind.async.worker.v3.js +5 -0
  144. package/lib/tailwindcss/tailwind.async.worker.v3.js.map +1 -1
  145. package/lib/tailwindcss/tailwind.async.worker.v4.js +6 -0
  146. package/lib/tailwindcss/tailwind.async.worker.v4.js.map +1 -1
  147. package/lib/tailwindcss/variant-order.async.v3.d.ts +3 -0
  148. package/lib/tailwindcss/variant-order.async.v3.d.ts.map +1 -0
  149. package/lib/tailwindcss/variant-order.async.v3.js +4 -0
  150. package/lib/tailwindcss/variant-order.async.v3.js.map +1 -0
  151. package/lib/tailwindcss/variant-order.async.v4.d.ts +3 -0
  152. package/lib/tailwindcss/variant-order.async.v4.d.ts.map +1 -0
  153. package/lib/tailwindcss/variant-order.async.v4.js +18 -0
  154. package/lib/tailwindcss/variant-order.async.v4.js.map +1 -0
  155. package/lib/tailwindcss/variant-order.d.ts +11 -0
  156. package/lib/tailwindcss/variant-order.d.ts.map +1 -0
  157. package/lib/tailwindcss/variant-order.js +15 -0
  158. package/lib/tailwindcss/variant-order.js.map +1 -0
  159. package/lib/types/ast.d.ts +2 -0
  160. package/lib/types/ast.d.ts.map +1 -1
  161. package/lib/types/rule.d.ts +27 -5
  162. package/lib/types/rule.d.ts.map +1 -1
  163. package/lib/types/rule.js +7 -0
  164. package/lib/types/rule.js.map +1 -1
  165. package/lib/utils/context.js +5 -5
  166. package/lib/utils/context.js.map +1 -1
  167. package/lib/utils/matchers.d.ts +2 -4
  168. package/lib/utils/matchers.d.ts.map +1 -1
  169. package/lib/utils/matchers.js +61 -40
  170. package/lib/utils/matchers.js.map +1 -1
  171. package/lib/utils/project.d.ts +4 -0
  172. package/lib/utils/project.d.ts.map +1 -0
  173. package/lib/utils/project.js +22 -0
  174. package/lib/utils/project.js.map +1 -0
  175. package/lib/utils/rule.d.ts +1 -1
  176. package/lib/utils/rule.d.ts.map +1 -1
  177. package/lib/utils/rule.js +49 -11
  178. package/lib/utils/rule.js.map +1 -1
  179. package/lib/utils/utils.d.ts.map +1 -1
  180. package/lib/utils/utils.js +6 -5
  181. package/lib/utils/utils.js.map +1 -1
  182. package/package.json +20 -19
@@ -5,6 +5,7 @@ export declare const enforceConsistentImportantPosition: {
5
5
  } | undefined;
6
6
  name: "enforce-consistent-important-position";
7
7
  readonly options: {
8
+ cwd?: string | undefined;
8
9
  rootFontSize?: number | undefined;
9
10
  detectComponentClasses: boolean;
10
11
  tsconfig?: string | undefined;
@@ -58,9 +59,22 @@ export declare const enforceConsistentImportantPosition: {
58
59
  } | {
59
60
  path?: string | undefined;
60
61
  type: import("../types/rule.js").MatcherType.ObjectValue;
62
+ } | {
63
+ match: ({
64
+ type: import("../types/rule.js").MatcherType.String;
65
+ } | {
66
+ path?: string | undefined;
67
+ type: import("../types/rule.js").MatcherType.ObjectKey;
68
+ } | {
69
+ path?: string | undefined;
70
+ type: import("../types/rule.js").MatcherType.ObjectValue;
71
+ })[];
72
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
61
73
  })[] | undefined;
62
74
  name: string;
63
75
  path?: string | undefined;
76
+ targetArgument?: number | "all" | "first" | "last" | undefined;
77
+ targetCall?: number | "all" | "first" | "last" | undefined;
64
78
  } | {
65
79
  callTarget?: number | "all" | "first" | "last" | undefined;
66
80
  kind: import("../types/rule.js").SelectorKind.Callee;
@@ -72,11 +86,24 @@ export declare const enforceConsistentImportantPosition: {
72
86
  } | {
73
87
  path?: string | undefined;
74
88
  type: import("../types/rule.js").MatcherType.ObjectValue;
89
+ } | {
90
+ match: ({
91
+ type: import("../types/rule.js").MatcherType.String;
92
+ } | {
93
+ path?: string | undefined;
94
+ type: import("../types/rule.js").MatcherType.ObjectKey;
95
+ } | {
96
+ path?: string | undefined;
97
+ type: import("../types/rule.js").MatcherType.ObjectValue;
98
+ })[];
99
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
75
100
  })[] | undefined;
76
101
  name?: string | undefined;
77
102
  path: string;
103
+ targetArgument?: number | "all" | "first" | "last" | undefined;
104
+ targetCall?: number | "all" | "first" | "last" | undefined;
78
105
  } | {
79
- kind: import("../types/rule.js").SelectorKind.Attribute;
106
+ kind: import("../types/rule.js").SelectorKind.Tag;
80
107
  match?: ({
81
108
  type: import("../types/rule.js").MatcherType.String;
82
109
  } | {
@@ -85,8 +112,20 @@ export declare const enforceConsistentImportantPosition: {
85
112
  } | {
86
113
  path?: string | undefined;
87
114
  type: import("../types/rule.js").MatcherType.ObjectValue;
115
+ } | {
116
+ match: ({
117
+ type: import("../types/rule.js").MatcherType.String;
118
+ } | {
119
+ path?: string | undefined;
120
+ type: import("../types/rule.js").MatcherType.ObjectKey;
121
+ } | {
122
+ path?: string | undefined;
123
+ type: import("../types/rule.js").MatcherType.ObjectValue;
124
+ })[];
125
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
88
126
  })[] | undefined;
89
127
  name: string;
128
+ path?: string | undefined;
90
129
  } | {
91
130
  kind: import("../types/rule.js").SelectorKind.Tag;
92
131
  match?: ({
@@ -97,6 +136,41 @@ export declare const enforceConsistentImportantPosition: {
97
136
  } | {
98
137
  path?: string | undefined;
99
138
  type: import("../types/rule.js").MatcherType.ObjectValue;
139
+ } | {
140
+ match: ({
141
+ type: import("../types/rule.js").MatcherType.String;
142
+ } | {
143
+ path?: string | undefined;
144
+ type: import("../types/rule.js").MatcherType.ObjectKey;
145
+ } | {
146
+ path?: string | undefined;
147
+ type: import("../types/rule.js").MatcherType.ObjectValue;
148
+ })[];
149
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
150
+ })[] | undefined;
151
+ name?: string | undefined;
152
+ path: string;
153
+ } | {
154
+ kind: import("../types/rule.js").SelectorKind.Attribute;
155
+ match?: ({
156
+ type: import("../types/rule.js").MatcherType.String;
157
+ } | {
158
+ path?: string | undefined;
159
+ type: import("../types/rule.js").MatcherType.ObjectKey;
160
+ } | {
161
+ path?: string | undefined;
162
+ type: import("../types/rule.js").MatcherType.ObjectValue;
163
+ } | {
164
+ match: ({
165
+ type: import("../types/rule.js").MatcherType.String;
166
+ } | {
167
+ path?: string | undefined;
168
+ type: import("../types/rule.js").MatcherType.ObjectKey;
169
+ } | {
170
+ path?: string | undefined;
171
+ type: import("../types/rule.js").MatcherType.ObjectValue;
172
+ })[];
173
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
100
174
  })[] | undefined;
101
175
  name: string;
102
176
  } | {
@@ -109,6 +183,17 @@ export declare const enforceConsistentImportantPosition: {
109
183
  } | {
110
184
  path?: string | undefined;
111
185
  type: import("../types/rule.js").MatcherType.ObjectValue;
186
+ } | {
187
+ match: ({
188
+ type: import("../types/rule.js").MatcherType.String;
189
+ } | {
190
+ path?: string | undefined;
191
+ type: import("../types/rule.js").MatcherType.ObjectKey;
192
+ } | {
193
+ path?: string | undefined;
194
+ type: import("../types/rule.js").MatcherType.ObjectValue;
195
+ })[];
196
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
112
197
  })[] | undefined;
113
198
  name: string;
114
199
  })[];
@@ -121,6 +206,7 @@ export declare const enforceConsistentImportantPosition: {
121
206
  LangOptions: import("eslint").Linter.LanguageOptions;
122
207
  Code: import("eslint").SourceCode;
123
208
  RuleOptions: [Required<{
209
+ cwd?: string | undefined;
124
210
  rootFontSize?: number | undefined;
125
211
  detectComponentClasses: boolean;
126
212
  tsconfig?: string | undefined;
@@ -174,9 +260,22 @@ export declare const enforceConsistentImportantPosition: {
174
260
  } | {
175
261
  path?: string | undefined;
176
262
  type: import("../types/rule.js").MatcherType.ObjectValue;
263
+ } | {
264
+ match: ({
265
+ type: import("../types/rule.js").MatcherType.String;
266
+ } | {
267
+ path?: string | undefined;
268
+ type: import("../types/rule.js").MatcherType.ObjectKey;
269
+ } | {
270
+ path?: string | undefined;
271
+ type: import("../types/rule.js").MatcherType.ObjectValue;
272
+ })[];
273
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
177
274
  })[] | undefined;
178
275
  name: string;
179
276
  path?: string | undefined;
277
+ targetArgument?: number | "all" | "first" | "last" | undefined;
278
+ targetCall?: number | "all" | "first" | "last" | undefined;
180
279
  } | {
181
280
  callTarget?: number | "all" | "first" | "last" | undefined;
182
281
  kind: import("../types/rule.js").SelectorKind.Callee;
@@ -188,11 +287,24 @@ export declare const enforceConsistentImportantPosition: {
188
287
  } | {
189
288
  path?: string | undefined;
190
289
  type: import("../types/rule.js").MatcherType.ObjectValue;
290
+ } | {
291
+ match: ({
292
+ type: import("../types/rule.js").MatcherType.String;
293
+ } | {
294
+ path?: string | undefined;
295
+ type: import("../types/rule.js").MatcherType.ObjectKey;
296
+ } | {
297
+ path?: string | undefined;
298
+ type: import("../types/rule.js").MatcherType.ObjectValue;
299
+ })[];
300
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
191
301
  })[] | undefined;
192
302
  name?: string | undefined;
193
303
  path: string;
304
+ targetArgument?: number | "all" | "first" | "last" | undefined;
305
+ targetCall?: number | "all" | "first" | "last" | undefined;
194
306
  } | {
195
- kind: import("../types/rule.js").SelectorKind.Attribute;
307
+ kind: import("../types/rule.js").SelectorKind.Tag;
196
308
  match?: ({
197
309
  type: import("../types/rule.js").MatcherType.String;
198
310
  } | {
@@ -201,8 +313,20 @@ export declare const enforceConsistentImportantPosition: {
201
313
  } | {
202
314
  path?: string | undefined;
203
315
  type: import("../types/rule.js").MatcherType.ObjectValue;
316
+ } | {
317
+ match: ({
318
+ type: import("../types/rule.js").MatcherType.String;
319
+ } | {
320
+ path?: string | undefined;
321
+ type: import("../types/rule.js").MatcherType.ObjectKey;
322
+ } | {
323
+ path?: string | undefined;
324
+ type: import("../types/rule.js").MatcherType.ObjectValue;
325
+ })[];
326
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
204
327
  })[] | undefined;
205
328
  name: string;
329
+ path?: string | undefined;
206
330
  } | {
207
331
  kind: import("../types/rule.js").SelectorKind.Tag;
208
332
  match?: ({
@@ -213,6 +337,41 @@ export declare const enforceConsistentImportantPosition: {
213
337
  } | {
214
338
  path?: string | undefined;
215
339
  type: import("../types/rule.js").MatcherType.ObjectValue;
340
+ } | {
341
+ match: ({
342
+ type: import("../types/rule.js").MatcherType.String;
343
+ } | {
344
+ path?: string | undefined;
345
+ type: import("../types/rule.js").MatcherType.ObjectKey;
346
+ } | {
347
+ path?: string | undefined;
348
+ type: import("../types/rule.js").MatcherType.ObjectValue;
349
+ })[];
350
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
351
+ })[] | undefined;
352
+ name?: string | undefined;
353
+ path: string;
354
+ } | {
355
+ kind: import("../types/rule.js").SelectorKind.Attribute;
356
+ match?: ({
357
+ type: import("../types/rule.js").MatcherType.String;
358
+ } | {
359
+ path?: string | undefined;
360
+ type: import("../types/rule.js").MatcherType.ObjectKey;
361
+ } | {
362
+ path?: string | undefined;
363
+ type: import("../types/rule.js").MatcherType.ObjectValue;
364
+ } | {
365
+ match: ({
366
+ type: import("../types/rule.js").MatcherType.String;
367
+ } | {
368
+ path?: string | undefined;
369
+ type: import("../types/rule.js").MatcherType.ObjectKey;
370
+ } | {
371
+ path?: string | undefined;
372
+ type: import("../types/rule.js").MatcherType.ObjectValue;
373
+ })[];
374
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
216
375
  })[] | undefined;
217
376
  name: string;
218
377
  } | {
@@ -225,6 +384,17 @@ export declare const enforceConsistentImportantPosition: {
225
384
  } | {
226
385
  path?: string | undefined;
227
386
  type: import("../types/rule.js").MatcherType.ObjectValue;
387
+ } | {
388
+ match: ({
389
+ type: import("../types/rule.js").MatcherType.String;
390
+ } | {
391
+ path?: string | undefined;
392
+ type: import("../types/rule.js").MatcherType.ObjectKey;
393
+ } | {
394
+ path?: string | undefined;
395
+ type: import("../types/rule.js").MatcherType.ObjectValue;
396
+ })[];
397
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
228
398
  })[] | undefined;
229
399
  name: string;
230
400
  })[];
@@ -1 +1 @@
1
- {"version":3,"file":"enforce-consistent-important-position.d.ts","sourceRoot":"","sources":["../../src/rules/enforce-consistent-important-position.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkF7C,CAAC"}
1
+ {"version":3,"file":"enforce-consistent-important-position.d.ts","sourceRoot":"","sources":["../../src/rules/enforce-consistent-important-position.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmF7C,CAAC"}
@@ -46,7 +46,8 @@ export const enforceConsistentImportantPosition = createRule({
46
46
  if (ctx.version.major <= 3 && position === "recommended") {
47
47
  warnings.push({
48
48
  option: "position",
49
- title: `The "${position}" position is not supported in Tailwind CSS v3`
49
+ title: `The "${position}" position is not supported in Tailwind CSS v3`,
50
+ url: `${ctx.docs}#position`
50
51
  });
51
52
  }
52
53
  const fix = position === "recommended"
@@ -1 +1 @@
1
- {"version":3,"file":"enforce-consistent-important-position.js","sourceRoot":"","sources":["../../src/rules/enforce-consistent-important-position.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"enforce-consistent-important-position.js","sourceRoot":"","sources":["../../src/rules/enforce-consistent-important-position.ts"],"names":[],"mappings":"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"}
@@ -6,6 +6,7 @@ export declare const enforceConsistentLineWrapping: {
6
6
  } | undefined;
7
7
  name: "enforce-consistent-line-wrapping";
8
8
  readonly options: {
9
+ cwd?: string | undefined;
9
10
  rootFontSize?: number | undefined;
10
11
  detectComponentClasses: boolean;
11
12
  tsconfig?: string | undefined;
@@ -59,9 +60,22 @@ export declare const enforceConsistentLineWrapping: {
59
60
  } | {
60
61
  path?: string | undefined;
61
62
  type: import("../types/rule.js").MatcherType.ObjectValue;
63
+ } | {
64
+ match: ({
65
+ type: import("../types/rule.js").MatcherType.String;
66
+ } | {
67
+ path?: string | undefined;
68
+ type: import("../types/rule.js").MatcherType.ObjectKey;
69
+ } | {
70
+ path?: string | undefined;
71
+ type: import("../types/rule.js").MatcherType.ObjectValue;
72
+ })[];
73
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
62
74
  })[] | undefined;
63
75
  name: string;
64
76
  path?: string | undefined;
77
+ targetArgument?: number | "all" | "first" | "last" | undefined;
78
+ targetCall?: number | "all" | "first" | "last" | undefined;
65
79
  } | {
66
80
  callTarget?: number | "all" | "first" | "last" | undefined;
67
81
  kind: import("../types/rule.js").SelectorKind.Callee;
@@ -73,11 +87,24 @@ export declare const enforceConsistentLineWrapping: {
73
87
  } | {
74
88
  path?: string | undefined;
75
89
  type: import("../types/rule.js").MatcherType.ObjectValue;
90
+ } | {
91
+ match: ({
92
+ type: import("../types/rule.js").MatcherType.String;
93
+ } | {
94
+ path?: string | undefined;
95
+ type: import("../types/rule.js").MatcherType.ObjectKey;
96
+ } | {
97
+ path?: string | undefined;
98
+ type: import("../types/rule.js").MatcherType.ObjectValue;
99
+ })[];
100
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
76
101
  })[] | undefined;
77
102
  name?: string | undefined;
78
103
  path: string;
104
+ targetArgument?: number | "all" | "first" | "last" | undefined;
105
+ targetCall?: number | "all" | "first" | "last" | undefined;
79
106
  } | {
80
- kind: import("../types/rule.js").SelectorKind.Attribute;
107
+ kind: import("../types/rule.js").SelectorKind.Tag;
81
108
  match?: ({
82
109
  type: import("../types/rule.js").MatcherType.String;
83
110
  } | {
@@ -86,8 +113,20 @@ export declare const enforceConsistentLineWrapping: {
86
113
  } | {
87
114
  path?: string | undefined;
88
115
  type: import("../types/rule.js").MatcherType.ObjectValue;
116
+ } | {
117
+ match: ({
118
+ type: import("../types/rule.js").MatcherType.String;
119
+ } | {
120
+ path?: string | undefined;
121
+ type: import("../types/rule.js").MatcherType.ObjectKey;
122
+ } | {
123
+ path?: string | undefined;
124
+ type: import("../types/rule.js").MatcherType.ObjectValue;
125
+ })[];
126
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
89
127
  })[] | undefined;
90
128
  name: string;
129
+ path?: string | undefined;
91
130
  } | {
92
131
  kind: import("../types/rule.js").SelectorKind.Tag;
93
132
  match?: ({
@@ -98,6 +137,41 @@ export declare const enforceConsistentLineWrapping: {
98
137
  } | {
99
138
  path?: string | undefined;
100
139
  type: import("../types/rule.js").MatcherType.ObjectValue;
140
+ } | {
141
+ match: ({
142
+ type: import("../types/rule.js").MatcherType.String;
143
+ } | {
144
+ path?: string | undefined;
145
+ type: import("../types/rule.js").MatcherType.ObjectKey;
146
+ } | {
147
+ path?: string | undefined;
148
+ type: import("../types/rule.js").MatcherType.ObjectValue;
149
+ })[];
150
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
151
+ })[] | undefined;
152
+ name?: string | undefined;
153
+ path: string;
154
+ } | {
155
+ kind: import("../types/rule.js").SelectorKind.Attribute;
156
+ match?: ({
157
+ type: import("../types/rule.js").MatcherType.String;
158
+ } | {
159
+ path?: string | undefined;
160
+ type: import("../types/rule.js").MatcherType.ObjectKey;
161
+ } | {
162
+ path?: string | undefined;
163
+ type: import("../types/rule.js").MatcherType.ObjectValue;
164
+ } | {
165
+ match: ({
166
+ type: import("../types/rule.js").MatcherType.String;
167
+ } | {
168
+ path?: string | undefined;
169
+ type: import("../types/rule.js").MatcherType.ObjectKey;
170
+ } | {
171
+ path?: string | undefined;
172
+ type: import("../types/rule.js").MatcherType.ObjectValue;
173
+ })[];
174
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
101
175
  })[] | undefined;
102
176
  name: string;
103
177
  } | {
@@ -110,6 +184,17 @@ export declare const enforceConsistentLineWrapping: {
110
184
  } | {
111
185
  path?: string | undefined;
112
186
  type: import("../types/rule.js").MatcherType.ObjectValue;
187
+ } | {
188
+ match: ({
189
+ type: import("../types/rule.js").MatcherType.String;
190
+ } | {
191
+ path?: string | undefined;
192
+ type: import("../types/rule.js").MatcherType.ObjectKey;
193
+ } | {
194
+ path?: string | undefined;
195
+ type: import("../types/rule.js").MatcherType.ObjectValue;
196
+ })[];
197
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
113
198
  })[] | undefined;
114
199
  name: string;
115
200
  })[];
@@ -128,6 +213,7 @@ export declare const enforceConsistentLineWrapping: {
128
213
  LangOptions: import("eslint").Linter.LanguageOptions;
129
214
  Code: import("eslint").SourceCode;
130
215
  RuleOptions: [Required<{
216
+ cwd?: string | undefined;
131
217
  rootFontSize?: number | undefined;
132
218
  detectComponentClasses: boolean;
133
219
  tsconfig?: string | undefined;
@@ -181,9 +267,22 @@ export declare const enforceConsistentLineWrapping: {
181
267
  } | {
182
268
  path?: string | undefined;
183
269
  type: import("../types/rule.js").MatcherType.ObjectValue;
270
+ } | {
271
+ match: ({
272
+ type: import("../types/rule.js").MatcherType.String;
273
+ } | {
274
+ path?: string | undefined;
275
+ type: import("../types/rule.js").MatcherType.ObjectKey;
276
+ } | {
277
+ path?: string | undefined;
278
+ type: import("../types/rule.js").MatcherType.ObjectValue;
279
+ })[];
280
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
184
281
  })[] | undefined;
185
282
  name: string;
186
283
  path?: string | undefined;
284
+ targetArgument?: number | "all" | "first" | "last" | undefined;
285
+ targetCall?: number | "all" | "first" | "last" | undefined;
187
286
  } | {
188
287
  callTarget?: number | "all" | "first" | "last" | undefined;
189
288
  kind: import("../types/rule.js").SelectorKind.Callee;
@@ -195,11 +294,24 @@ export declare const enforceConsistentLineWrapping: {
195
294
  } | {
196
295
  path?: string | undefined;
197
296
  type: import("../types/rule.js").MatcherType.ObjectValue;
297
+ } | {
298
+ match: ({
299
+ type: import("../types/rule.js").MatcherType.String;
300
+ } | {
301
+ path?: string | undefined;
302
+ type: import("../types/rule.js").MatcherType.ObjectKey;
303
+ } | {
304
+ path?: string | undefined;
305
+ type: import("../types/rule.js").MatcherType.ObjectValue;
306
+ })[];
307
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
198
308
  })[] | undefined;
199
309
  name?: string | undefined;
200
310
  path: string;
311
+ targetArgument?: number | "all" | "first" | "last" | undefined;
312
+ targetCall?: number | "all" | "first" | "last" | undefined;
201
313
  } | {
202
- kind: import("../types/rule.js").SelectorKind.Attribute;
314
+ kind: import("../types/rule.js").SelectorKind.Tag;
203
315
  match?: ({
204
316
  type: import("../types/rule.js").MatcherType.String;
205
317
  } | {
@@ -208,8 +320,20 @@ export declare const enforceConsistentLineWrapping: {
208
320
  } | {
209
321
  path?: string | undefined;
210
322
  type: import("../types/rule.js").MatcherType.ObjectValue;
323
+ } | {
324
+ match: ({
325
+ type: import("../types/rule.js").MatcherType.String;
326
+ } | {
327
+ path?: string | undefined;
328
+ type: import("../types/rule.js").MatcherType.ObjectKey;
329
+ } | {
330
+ path?: string | undefined;
331
+ type: import("../types/rule.js").MatcherType.ObjectValue;
332
+ })[];
333
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
211
334
  })[] | undefined;
212
335
  name: string;
336
+ path?: string | undefined;
213
337
  } | {
214
338
  kind: import("../types/rule.js").SelectorKind.Tag;
215
339
  match?: ({
@@ -220,6 +344,41 @@ export declare const enforceConsistentLineWrapping: {
220
344
  } | {
221
345
  path?: string | undefined;
222
346
  type: import("../types/rule.js").MatcherType.ObjectValue;
347
+ } | {
348
+ match: ({
349
+ type: import("../types/rule.js").MatcherType.String;
350
+ } | {
351
+ path?: string | undefined;
352
+ type: import("../types/rule.js").MatcherType.ObjectKey;
353
+ } | {
354
+ path?: string | undefined;
355
+ type: import("../types/rule.js").MatcherType.ObjectValue;
356
+ })[];
357
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
358
+ })[] | undefined;
359
+ name?: string | undefined;
360
+ path: string;
361
+ } | {
362
+ kind: import("../types/rule.js").SelectorKind.Attribute;
363
+ match?: ({
364
+ type: import("../types/rule.js").MatcherType.String;
365
+ } | {
366
+ path?: string | undefined;
367
+ type: import("../types/rule.js").MatcherType.ObjectKey;
368
+ } | {
369
+ path?: string | undefined;
370
+ type: import("../types/rule.js").MatcherType.ObjectValue;
371
+ } | {
372
+ match: ({
373
+ type: import("../types/rule.js").MatcherType.String;
374
+ } | {
375
+ path?: string | undefined;
376
+ type: import("../types/rule.js").MatcherType.ObjectKey;
377
+ } | {
378
+ path?: string | undefined;
379
+ type: import("../types/rule.js").MatcherType.ObjectValue;
380
+ })[];
381
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
223
382
  })[] | undefined;
224
383
  name: string;
225
384
  } | {
@@ -232,6 +391,17 @@ export declare const enforceConsistentLineWrapping: {
232
391
  } | {
233
392
  path?: string | undefined;
234
393
  type: import("../types/rule.js").MatcherType.ObjectValue;
394
+ } | {
395
+ match: ({
396
+ type: import("../types/rule.js").MatcherType.String;
397
+ } | {
398
+ path?: string | undefined;
399
+ type: import("../types/rule.js").MatcherType.ObjectKey;
400
+ } | {
401
+ path?: string | undefined;
402
+ type: import("../types/rule.js").MatcherType.ObjectValue;
403
+ })[];
404
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
235
405
  })[] | undefined;
236
406
  name: string;
237
407
  })[];
@@ -1 +1 @@
1
- {"version":3,"file":"enforce-consistent-line-wrapping.d.ts","sourceRoot":"","sources":["../../src/rules/enforce-consistent-line-wrapping.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFxC,CAAC"}
1
+ {"version":3,"file":"enforce-consistent-line-wrapping.d.ts","sourceRoot":"","sources":["../../src/rules/enforce-consistent-line-wrapping.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFxC,CAAC"}
@@ -53,6 +53,22 @@ function lintLiterals(ctx, literals) {
53
53
  const singlelineClasses = new Lines(ctx, lineStartPosition);
54
54
  const classes = splitClasses(literal.content);
55
55
  const { dissectedClasses, warnings } = getDissectedClasses(async(ctx), classes);
56
+ const invalidLineBreaks = isLineBreakStyleLikelyMisconfigured(ctx, literal.raw);
57
+ const invalidIndentations = isIndentationLikelyMisconfigured(ctx, literal.raw);
58
+ if (invalidLineBreaks) {
59
+ warnings.push({
60
+ option: "lineBreakStyle",
61
+ title: "Inconsistent line endings detected",
62
+ url: `${ctx.docs}#linebreakstyle`
63
+ });
64
+ }
65
+ if (invalidIndentations) {
66
+ warnings.push({
67
+ option: "indent",
68
+ title: "Inconsistent indentation detected",
69
+ url: `${ctx.docs}#indent`
70
+ });
71
+ }
56
72
  const groupedClasses = groupClasses(classes, dissectedClasses);
57
73
  if (literal.openingQuote) {
58
74
  if (literal.multilineQuotes?.includes("`")) {
@@ -468,4 +484,18 @@ function getLineBreaks(ctx) {
468
484
  const { lineBreakStyle } = ctx.options;
469
485
  return lineBreakStyle === "unix" ? "\n" : "\r\n";
470
486
  }
487
+ function isLineBreakStyleLikelyMisconfigured(ctx, original) {
488
+ const { lineBreakStyle } = ctx.options;
489
+ const hasWindowsLineBreaks = original.includes("\r\n");
490
+ const hasUnixLineBreaks = /(^|[^\r])\n/.test(original);
491
+ return (hasWindowsLineBreaks && lineBreakStyle === "unix" ||
492
+ hasUnixLineBreaks && lineBreakStyle === "windows");
493
+ }
494
+ function isIndentationLikelyMisconfigured(ctx, original) {
495
+ const { indent } = ctx.options;
496
+ const hasSpaceIndentation = /\r?\n +/.test(original);
497
+ const hasTabIndentation = /\r?\n\t+/.test(original);
498
+ return (hasSpaceIndentation && indent === "tab" ||
499
+ hasTabIndentation && typeof indent === "number");
500
+ }
471
501
  //# sourceMappingURL=enforce-consistent-line-wrapping.js.map