@nelsonlaidev/eslint-config 3.7.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -41
- package/dist/index.d.mts +69 -296
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +196 -332
- package/dist/index.mjs.map +1 -1
- package/package.json +23 -21
package/README.md
CHANGED
|
@@ -37,11 +37,30 @@ type Options = {
|
|
|
37
37
|
tailwindConfig?: string
|
|
38
38
|
// Path to your tsconfig.json file
|
|
39
39
|
tsconfig?: string
|
|
40
|
-
|
|
40
|
+
detectComponentClasses?: boolean
|
|
41
|
+
rootFontSize?: number
|
|
42
|
+
messageStyle?: 'visual' | 'compact' | 'raw'
|
|
43
|
+
selectors?: Selectors
|
|
44
|
+
canonical?: {
|
|
45
|
+
collapse?: boolean
|
|
46
|
+
logical?: boolean
|
|
47
|
+
}
|
|
48
|
+
classOrder?: {
|
|
49
|
+
order?: 'asc' | 'desc' | 'official' | 'strict'
|
|
50
|
+
componentOrder?: 'asc' | 'desc' | 'preserve'
|
|
51
|
+
componentPosition?: 'start' | 'end'
|
|
52
|
+
unknownOrder?: 'asc' | 'desc' | 'preserve'
|
|
53
|
+
unknownPosition?: 'start' | 'end'
|
|
54
|
+
}
|
|
55
|
+
restrict?: Array<string | { pattern: string; message?: string; fix?: string }>
|
|
56
|
+
ignore?: string[]
|
|
57
|
+
whitespace?: {
|
|
58
|
+
allowMultiline?: boolean
|
|
59
|
+
}
|
|
41
60
|
}
|
|
42
61
|
// Optional
|
|
43
|
-
// Configure JSX
|
|
44
|
-
|
|
62
|
+
// Configure JSX accessibility linting rules
|
|
63
|
+
jsxA11y?: {
|
|
45
64
|
// jsx-a11y plugin options
|
|
46
65
|
a11y?: {
|
|
47
66
|
// Custom component to native element mappings
|
|
@@ -68,44 +87,8 @@ type Options = {
|
|
|
68
87
|
playwright?: {
|
|
69
88
|
// Specify files/globs for Playwright
|
|
70
89
|
files: Array<string | string[]>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
test?: string[]
|
|
74
|
-
expect?: string[]
|
|
75
|
-
}
|
|
76
|
-
// Custom messages used by Playwright plugin rules
|
|
77
|
-
messages?: Record<string, string | undefined>
|
|
78
|
-
// Rule options
|
|
79
|
-
expectExpect?: {
|
|
80
|
-
assertFunctionNames?: string[]
|
|
81
|
-
assertFunctionPatterns?: string[]
|
|
82
|
-
}
|
|
83
|
-
maxNestedDescribe?: {
|
|
84
|
-
max?: number
|
|
85
|
-
}
|
|
86
|
-
missingPlaywrightAwait?: {
|
|
87
|
-
customMatchers?: string[]
|
|
88
|
-
}
|
|
89
|
-
noSkippedTest?: {
|
|
90
|
-
allowConditional?: boolean
|
|
91
|
-
}
|
|
92
|
-
validExpect?: {
|
|
93
|
-
minArgs?: number
|
|
94
|
-
maxArgs?: number
|
|
95
|
-
}
|
|
96
|
-
validTitle?: {
|
|
97
|
-
ignoreSpaces?: boolean
|
|
98
|
-
ignoreTypeOfStepName?: boolean
|
|
99
|
-
ignoreTypeOfTestName?: boolean
|
|
100
|
-
ignoreTypeOfDescribeName?: boolean
|
|
101
|
-
disallowedWords?: string[]
|
|
102
|
-
mustNotMatch?: Partial<Record<'describe' | 'test', string>> | string
|
|
103
|
-
mustMatch?: Partial<Record<'describe' | 'test', string>> | string
|
|
104
|
-
}
|
|
105
|
-
validTestTags?: {
|
|
106
|
-
allowedTags?: (string | RegExp)[]
|
|
107
|
-
disallowedTags?: (string | RegExp)[]
|
|
108
|
-
}
|
|
90
|
+
assertFunctionNames?: string[]
|
|
91
|
+
assertFunctionPatterns?: string[]
|
|
109
92
|
}
|
|
110
93
|
// Optional
|
|
111
94
|
// Disable ESLint rules that conflict with Prettier
|
package/dist/index.d.mts
CHANGED
|
@@ -1,43 +1,8 @@
|
|
|
1
1
|
import { Selectors } from "eslint-plugin-better-tailwindcss/types";
|
|
2
2
|
import { Linter } from "eslint";
|
|
3
3
|
|
|
4
|
-
//#region src/types/
|
|
5
|
-
type
|
|
6
|
-
/**
|
|
7
|
-
* A list of module names to ignore for the `no-namespace` rule.
|
|
8
|
-
*
|
|
9
|
-
* @default []
|
|
10
|
-
*/
|
|
11
|
-
ignore?: string[];
|
|
12
|
-
};
|
|
13
|
-
type NoUnassignedImportOptions = {
|
|
14
|
-
/**
|
|
15
|
-
* A list of glob patterns to allow for the `no-unassigned-import` rule.
|
|
16
|
-
*
|
|
17
|
-
* @default []
|
|
18
|
-
*/
|
|
19
|
-
allow?: string[];
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Import-x configuration options.
|
|
23
|
-
*/
|
|
24
|
-
type ImportXOptions = {
|
|
25
|
-
/**
|
|
26
|
-
* Configuration for the `no-namespace` rule.
|
|
27
|
-
*
|
|
28
|
-
* See [official docs](https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-namespace.md) for more details.
|
|
29
|
-
*/
|
|
30
|
-
noNamespace?: NoNamespaceOptions;
|
|
31
|
-
/**
|
|
32
|
-
* Configuration for the `no-unassigned-import` rule.
|
|
33
|
-
*
|
|
34
|
-
* See [official docs](https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unassigned-import.md) for more details.
|
|
35
|
-
*/
|
|
36
|
-
noUnassignedImport?: NoUnassignedImportOptions;
|
|
37
|
-
};
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/types/jsx.d.ts
|
|
40
|
-
type JsxOptions = {
|
|
4
|
+
//#region src/types/jsx-a11y.d.ts
|
|
5
|
+
type JsxA11yConfigOptions = {
|
|
41
6
|
a11y?: JsxA11yOptions;
|
|
42
7
|
};
|
|
43
8
|
type JsxA11yOptions = {
|
|
@@ -62,116 +27,6 @@ type JsxA11yOptions = {
|
|
|
62
27
|
};
|
|
63
28
|
//#endregion
|
|
64
29
|
//#region src/types/playwright.d.ts
|
|
65
|
-
type ExpectExpectOptions = {
|
|
66
|
-
/**
|
|
67
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/expect-expect.md#assertfunctionnames) for more details.
|
|
68
|
-
*
|
|
69
|
-
* @default []
|
|
70
|
-
*/
|
|
71
|
-
assertFunctionNames?: string[];
|
|
72
|
-
/**
|
|
73
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/expect-expect.md#assertfunctionpatterns) for more details.
|
|
74
|
-
*
|
|
75
|
-
* @default []
|
|
76
|
-
*/
|
|
77
|
-
assertFunctionPatterns?: string[];
|
|
78
|
-
};
|
|
79
|
-
type MaxNestedDescribeOptions = {
|
|
80
|
-
/**
|
|
81
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/max-nested-describe.md#max) for more details.
|
|
82
|
-
*
|
|
83
|
-
* @default 5
|
|
84
|
-
*/
|
|
85
|
-
max?: number;
|
|
86
|
-
};
|
|
87
|
-
type MissingPlaywrightAwaitOptions = {
|
|
88
|
-
/**
|
|
89
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/missing-playwright-await.md#options) for more details.
|
|
90
|
-
*
|
|
91
|
-
* @default []
|
|
92
|
-
*/
|
|
93
|
-
customMatchers?: string[];
|
|
94
|
-
};
|
|
95
|
-
type NoSkippedTestOptions = {
|
|
96
|
-
/**
|
|
97
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/no-skipped-test.md#allowconditional) for more details.
|
|
98
|
-
*
|
|
99
|
-
* @default false
|
|
100
|
-
*/
|
|
101
|
-
allowConditional?: boolean;
|
|
102
|
-
};
|
|
103
|
-
type ValidExpectOptions = {
|
|
104
|
-
/**
|
|
105
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-expect.md#minargs--maxargs) for more details.
|
|
106
|
-
*
|
|
107
|
-
* @default 1
|
|
108
|
-
*/
|
|
109
|
-
minArgs?: number;
|
|
110
|
-
/**
|
|
111
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-expect.md#minargs--maxargs) for more details.
|
|
112
|
-
*
|
|
113
|
-
* @default 2
|
|
114
|
-
*/
|
|
115
|
-
maxArgs?: number;
|
|
116
|
-
};
|
|
117
|
-
type ValidTitleOptions = {
|
|
118
|
-
/**
|
|
119
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-title.md#ignorespaces) for more details.
|
|
120
|
-
*
|
|
121
|
-
* @default false
|
|
122
|
-
*/
|
|
123
|
-
ignoreSpaces?: boolean;
|
|
124
|
-
/**
|
|
125
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-title.md#ignoretypeofstepname) for more details.
|
|
126
|
-
*
|
|
127
|
-
* @default true
|
|
128
|
-
*/
|
|
129
|
-
ignoreTypeOfStepName?: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Official docs is not available for this option yet.
|
|
132
|
-
*
|
|
133
|
-
* @default false
|
|
134
|
-
*/
|
|
135
|
-
ignoreTypeOfTestName?: boolean;
|
|
136
|
-
/**
|
|
137
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-title.md#ignoretypeofdescribename) for more details.
|
|
138
|
-
*
|
|
139
|
-
* @default false
|
|
140
|
-
*/
|
|
141
|
-
ignoreTypeOfDescribeName?: boolean;
|
|
142
|
-
/**
|
|
143
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-title.md#disallowedwords) for more details.
|
|
144
|
-
*
|
|
145
|
-
* @default []
|
|
146
|
-
*/
|
|
147
|
-
disallowedWords?: string[];
|
|
148
|
-
/**
|
|
149
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-title.md#mustmatch--mustnotmatch) for more details.
|
|
150
|
-
*
|
|
151
|
-
* @default {}
|
|
152
|
-
*/
|
|
153
|
-
mustNotMatch?: Partial<Record<'describe' | 'test', string>> | string;
|
|
154
|
-
/**
|
|
155
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-title.md#mustmatch--mustnotmatch) for more details.
|
|
156
|
-
*
|
|
157
|
-
* @default {}
|
|
158
|
-
*/
|
|
159
|
-
mustMatch?: Partial<Record<'describe' | 'test', string>> | string;
|
|
160
|
-
};
|
|
161
|
-
type ValidTestTagsOptions = {
|
|
162
|
-
/**
|
|
163
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-test-tags.md#allowedtags) for more details.
|
|
164
|
-
*
|
|
165
|
-
* @default []
|
|
166
|
-
*/
|
|
167
|
-
allowedTags?: Array<string | RegExp>;
|
|
168
|
-
/**
|
|
169
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-test-tags.md#disallowedtags) for more details.
|
|
170
|
-
*
|
|
171
|
-
* @default []
|
|
172
|
-
*/
|
|
173
|
-
disallowedTags?: Array<string | RegExp>;
|
|
174
|
-
};
|
|
175
30
|
/**
|
|
176
31
|
* Playwright configuration options.
|
|
177
32
|
*/
|
|
@@ -181,143 +36,18 @@ type PlaywrightOptions = {
|
|
|
181
36
|
*/
|
|
182
37
|
files: Array<string | string[]>;
|
|
183
38
|
/**
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright#aliased-playwright-globals) for more details.
|
|
187
|
-
*/
|
|
188
|
-
globalAliases?: {
|
|
189
|
-
test?: string[];
|
|
190
|
-
expect?: string[];
|
|
191
|
-
};
|
|
192
|
-
/**
|
|
193
|
-
* Custom messages used by Playwright plugin rules.
|
|
194
|
-
*
|
|
195
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright#custom-messages) for more details.
|
|
196
|
-
*/
|
|
197
|
-
messages?: Record<string, string | undefined>;
|
|
198
|
-
/**
|
|
199
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/expect-expect.md) for more details.
|
|
200
|
-
*/
|
|
201
|
-
expectExpect?: ExpectExpectOptions;
|
|
202
|
-
/**
|
|
203
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/max-nested-describe.md) for more details.
|
|
204
|
-
*/
|
|
205
|
-
maxNestedDescribe?: MaxNestedDescribeOptions;
|
|
206
|
-
/**
|
|
207
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/missing-playwright-await.md) for more details.
|
|
208
|
-
*/
|
|
209
|
-
missingPlaywrightAwait?: MissingPlaywrightAwaitOptions;
|
|
210
|
-
/**
|
|
211
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/no-skipped-test.md) for more details.
|
|
212
|
-
*/
|
|
213
|
-
noSkippedTest?: NoSkippedTestOptions;
|
|
214
|
-
/**
|
|
215
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-expect.md) for more details.
|
|
216
|
-
*/
|
|
217
|
-
validExpect?: ValidExpectOptions;
|
|
218
|
-
/**
|
|
219
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-title.md) for more details.
|
|
220
|
-
*/
|
|
221
|
-
validTitle?: ValidTitleOptions;
|
|
222
|
-
/**
|
|
223
|
-
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/valid-test-tags.md) for more details.
|
|
224
|
-
*/
|
|
225
|
-
validTestTags?: ValidTestTagsOptions;
|
|
226
|
-
};
|
|
227
|
-
//#endregion
|
|
228
|
-
//#region src/types/tailwindcss.d.ts
|
|
229
|
-
type CanonicalClassesOptions = {
|
|
230
|
-
/**
|
|
231
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md#rootfontsize) for more details.
|
|
232
|
-
*
|
|
233
|
-
* @default 16
|
|
234
|
-
*/
|
|
235
|
-
rootFontSize?: number;
|
|
236
|
-
/**
|
|
237
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md#collapse) for more details.
|
|
238
|
-
*
|
|
239
|
-
* @default true
|
|
240
|
-
*/
|
|
241
|
-
collapse?: boolean;
|
|
242
|
-
/**
|
|
243
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md#logical) for more details.
|
|
244
|
-
*
|
|
245
|
-
* @default true
|
|
246
|
-
*/
|
|
247
|
-
logical?: boolean;
|
|
248
|
-
};
|
|
249
|
-
type ConsistentClassOrderOptions = {
|
|
250
|
-
/**
|
|
251
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#order) for more details.
|
|
252
|
-
*
|
|
253
|
-
* @default 'official'
|
|
254
|
-
*/
|
|
255
|
-
order?: 'asc' | 'desc' | 'official' | 'strict';
|
|
256
|
-
/**
|
|
257
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#detectComponentClasses) for more details.
|
|
258
|
-
*
|
|
259
|
-
* @default false
|
|
260
|
-
*/
|
|
261
|
-
detectComponentClasses?: boolean;
|
|
262
|
-
/**
|
|
263
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#componentClassOrder) for more details.
|
|
264
|
-
*
|
|
265
|
-
* @default 'preserve'
|
|
266
|
-
*/
|
|
267
|
-
componentClassOrder?: 'asc' | 'desc' | 'preserve';
|
|
268
|
-
/**
|
|
269
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#componentClassPosition) for more details.
|
|
270
|
-
*
|
|
271
|
-
* @default 'start'
|
|
272
|
-
*/
|
|
273
|
-
componentClassPosition?: 'start' | 'end';
|
|
274
|
-
/**
|
|
275
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#unknownClassOrder) for more details.
|
|
276
|
-
*
|
|
277
|
-
* @default 'preserve'
|
|
278
|
-
*/
|
|
279
|
-
unknownClassOrder?: 'asc' | 'desc' | 'preserve';
|
|
280
|
-
/**
|
|
281
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#unknownClassPosition) for more details.
|
|
282
|
-
*
|
|
283
|
-
* @default 'start'
|
|
284
|
-
*/
|
|
285
|
-
unknownClassPosition?: 'start' | 'end';
|
|
286
|
-
};
|
|
287
|
-
type NoRestrictedClassesOptions = {
|
|
288
|
-
/**
|
|
289
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-restricted-classes.md#restrict) for more details.
|
|
290
|
-
*
|
|
39
|
+
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/expect-expect.md#assertfunctionnames) for more details.
|
|
291
40
|
* @default []
|
|
292
41
|
*/
|
|
293
|
-
|
|
294
|
-
pattern: string;
|
|
295
|
-
message?: string;
|
|
296
|
-
fix?: string;
|
|
297
|
-
}>;
|
|
298
|
-
};
|
|
299
|
-
type NoUnknownClassesOptions = {
|
|
42
|
+
assertFunctionNames?: string[];
|
|
300
43
|
/**
|
|
301
|
-
* See [official docs](https://github.com/
|
|
302
|
-
*
|
|
44
|
+
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/expect-expect.md#assertfunctionpatterns) for more details.
|
|
303
45
|
* @default []
|
|
304
46
|
*/
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unknown-classes.md#detectComponentClasses) for more details.
|
|
308
|
-
*
|
|
309
|
-
* @default false
|
|
310
|
-
*/
|
|
311
|
-
detectComponentClasses?: boolean;
|
|
312
|
-
};
|
|
313
|
-
type NoUnnecessaryWhitespaceOptions = {
|
|
314
|
-
/**
|
|
315
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unnecessary-whitespace.md#allowMultiline) for more details.
|
|
316
|
-
*
|
|
317
|
-
* @default true
|
|
318
|
-
*/
|
|
319
|
-
allowMultiline?: boolean;
|
|
47
|
+
assertFunctionPatterns?: string[];
|
|
320
48
|
};
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/types/tailwindcss.d.ts
|
|
321
51
|
type TailwindCSSOptions = {
|
|
322
52
|
/**
|
|
323
53
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#entrypoint) for more details.
|
|
@@ -333,18 +63,18 @@ type TailwindCSSOptions = {
|
|
|
333
63
|
tsconfig?: string;
|
|
334
64
|
/**
|
|
335
65
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#detectcomponentclasses) for more details.
|
|
336
|
-
*
|
|
337
66
|
* @default false
|
|
338
67
|
*/
|
|
339
68
|
detectComponentClasses?: boolean;
|
|
340
69
|
/**
|
|
341
70
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#rootfontsize) for more details.
|
|
342
|
-
*
|
|
343
71
|
* @default 16
|
|
344
72
|
*/
|
|
345
73
|
rootFontSize?: number;
|
|
346
74
|
/**
|
|
347
75
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#messagestyle) for more details.
|
|
76
|
+
* @default 'visual'
|
|
77
|
+
* @default 'compact' (when running in CI)
|
|
348
78
|
*/
|
|
349
79
|
messageStyle?: 'visual' | 'compact' | 'raw';
|
|
350
80
|
/**
|
|
@@ -354,23 +84,72 @@ type TailwindCSSOptions = {
|
|
|
354
84
|
/**
|
|
355
85
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md) for more details.
|
|
356
86
|
*/
|
|
357
|
-
|
|
87
|
+
canonical?: {
|
|
88
|
+
/**
|
|
89
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md#collapse) for more details.
|
|
90
|
+
* @default true
|
|
91
|
+
*/
|
|
92
|
+
collapse?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md#logical) for more details.
|
|
95
|
+
* @default true
|
|
96
|
+
*/
|
|
97
|
+
logical?: boolean;
|
|
98
|
+
};
|
|
358
99
|
/**
|
|
359
100
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md) for more details.
|
|
360
101
|
*/
|
|
361
|
-
|
|
102
|
+
classOrder?: {
|
|
103
|
+
/**
|
|
104
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#order) for more details.
|
|
105
|
+
* @default 'official'
|
|
106
|
+
*/
|
|
107
|
+
order?: 'asc' | 'desc' | 'official' | 'strict';
|
|
108
|
+
/**
|
|
109
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#componentClassOrder) for more details.
|
|
110
|
+
* @default 'preserve'
|
|
111
|
+
*/
|
|
112
|
+
componentOrder?: 'asc' | 'desc' | 'preserve';
|
|
113
|
+
/**
|
|
114
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#componentClassPosition) for more details.
|
|
115
|
+
* @default 'start'
|
|
116
|
+
*/
|
|
117
|
+
componentPosition?: 'start' | 'end';
|
|
118
|
+
/**
|
|
119
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#unknownClassOrder) for more details.
|
|
120
|
+
* @default 'preserve'
|
|
121
|
+
*/
|
|
122
|
+
unknownOrder?: 'asc' | 'desc' | 'preserve';
|
|
123
|
+
/**
|
|
124
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#unknownClassPosition) for more details.
|
|
125
|
+
* @default 'start'
|
|
126
|
+
*/
|
|
127
|
+
unknownPosition?: 'start' | 'end';
|
|
128
|
+
};
|
|
362
129
|
/**
|
|
363
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-restricted-classes.md) for more details.
|
|
130
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-restricted-classes.md#restrict) for more details.
|
|
131
|
+
* @default []
|
|
364
132
|
*/
|
|
365
|
-
|
|
133
|
+
restrict?: string[] | Array<{
|
|
134
|
+
pattern: string;
|
|
135
|
+
message?: string;
|
|
136
|
+
fix?: string;
|
|
137
|
+
}>;
|
|
366
138
|
/**
|
|
367
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unknown-classes.md) for more details.
|
|
139
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unknown-classes.md#ignore) for more details.
|
|
140
|
+
* @default []
|
|
368
141
|
*/
|
|
369
|
-
|
|
142
|
+
ignore?: string[];
|
|
370
143
|
/**
|
|
371
144
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unnecessary-whitespace.md) for more details.
|
|
372
145
|
*/
|
|
373
|
-
|
|
146
|
+
whitespace?: {
|
|
147
|
+
/**
|
|
148
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unnecessary-whitespace.md#allowMultiline) for more details.
|
|
149
|
+
* @default true
|
|
150
|
+
*/
|
|
151
|
+
allowMultiline?: boolean;
|
|
152
|
+
};
|
|
374
153
|
};
|
|
375
154
|
//#endregion
|
|
376
155
|
//#region src/types/vitest.d.ts
|
|
@@ -395,8 +174,6 @@ type ConfigOptions = {
|
|
|
395
174
|
react?: boolean;
|
|
396
175
|
/**
|
|
397
176
|
* Enable additional ESLint rules optimized for Next.js projects.
|
|
398
|
-
*
|
|
399
|
-
* This option also automatically enables React rules.
|
|
400
177
|
*/
|
|
401
178
|
nextjs?: boolean;
|
|
402
179
|
/**
|
|
@@ -406,9 +183,9 @@ type ConfigOptions = {
|
|
|
406
183
|
*/
|
|
407
184
|
tailwindcss?: TailwindCSSOptions;
|
|
408
185
|
/**
|
|
409
|
-
* JSX configuration options.
|
|
186
|
+
* JSX accessibility configuration options.
|
|
410
187
|
*/
|
|
411
|
-
|
|
188
|
+
jsxA11y?: JsxA11yConfigOptions;
|
|
412
189
|
/**
|
|
413
190
|
* Vitest configuration options.
|
|
414
191
|
*
|
|
@@ -431,10 +208,6 @@ type ConfigOptions = {
|
|
|
431
208
|
* A list of file paths or glob patterns that ESLint should ignore.
|
|
432
209
|
*/
|
|
433
210
|
ignores?: string[];
|
|
434
|
-
/**
|
|
435
|
-
* Import-x configuration options.
|
|
436
|
-
*/
|
|
437
|
-
importX?: ImportXOptions;
|
|
438
211
|
};
|
|
439
212
|
type FlatConfig = Linter.Config;
|
|
440
213
|
//#endregion
|
|
@@ -449,5 +222,5 @@ declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
|
449
222
|
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
450
223
|
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
451
224
|
//#endregion
|
|
452
|
-
export {
|
|
225
|
+
export { ConfigOptions, FlatConfig, GLOB_JS, GLOB_JSX, GLOB_SRC, GLOB_SRC_EXT, GLOB_TS, GLOB_TSX, JsxA11yConfigOptions, JsxA11yOptions, PlaywrightOptions, TailwindCSSOptions, VitestOptions, defineConfig };
|
|
453
226
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/jsx-a11y.ts","../src/types/playwright.ts","../src/types/tailwindcss.ts","../src/types/vitest.ts","../src/types/config.ts","../src/base.ts","../src/globs.ts"],"mappings":";;;;KAAY,oBAAA;EACV,IAAA,GAAO,cAAA;AAAA;AAAA,KAGG,cAAA;EAJA;;;EAQV,UAAA,GAAa,MAAA;EAPQ;AAGvB;;EAQE,UAAA;IACE,GAAA;EAAA;EALW;;;EAUb,mBAAA;EAIA;;;EAAA,oBAAA;AAAA;;;;;;KCnBU,iBAAA;EDHA;;;ECOV,KAAA,EAAO,KAAA;EDNc;AAGvB;;;ECQE,mBAAA;EDJA;;;;ECSA,sBAAA;AAAA;;;KCfU,kBAAA;;;AFFZ;EEME,UAAA;;;;EAIA,cAAA;EFNwB;;;EEUxB,QAAA;EFNa;;;;EEWb,sBAAA;EFGoB;;;;EEEpB,YAAA;EDrBU;;;;;EC2BV,YAAA;EDlBA;;;ECsBA,SAAA,GAAY,SAAA;;;;EAIZ,SAAA;IApC4B;;;;IAyC1B,QAAA;IA7BF;;;;IAkCE,OAAA;EAAA;EAVF;;;EAeA,UAAA;IAKE;;;;IAAA,KAAA;IA0BF;;;;IArBE,cAAA;IA0BF;;;;IArBE,iBAAA;;;;ACjEJ;IDsEI,YAAA;IClEK;;;;IDuEL,eAAA;EAAA;EErEQ;;;;EF2EV,QAAA,cAAsB,KAAA;IAAQ,OAAA;IAAiB,OAAA;IAAkB,GAAA;EAAA;EEvEjE;;;;EF4EA,MAAA;EE9DU;;;EFkEV,UAAA;IEtDa;;;;IF2DX,cAAA;EAAA;AAAA;;;;;;KC/FQ,aAAA;EHHA;;;EGOV,KAAA,EAAO,KAAA;AAAA;;;;;;KCEG,aAAA;EJLA;;;EISV,KAAA;EJLA;;;EISA,MAAA;EJCA;;;;;EIKA,WAAA,GAAc,kBAAA;;AHpBhB;;EGwBE,OAAA,GAAU,oBAAA;EHpBE;;;;;EG0BZ,MAAA,GAAS,aAAA;EHhBa;;;;ACfxB;EEqCE,UAAA,GAAa,iBAAA;;;;;;EAMb,QAAA;EFrBA;;;EEyBA,OAAA;AAAA;AAAA,KAGU,UAAA,GAAa,MAAA,CAAO,MAAA;;;cChBnB,YAAA,GAAgB,OAAA,GAAS,aAAA,KAAuB,WAAA,EAAa,UAAA,OAAe,UAAA;;;cCpC5E,YAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA"}
|