@nelsonlaidev/eslint-config 3.7.2 → 4.1.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 +50 -41
- package/dist/index.d.mts +75 -294
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +207 -329
- 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
|
|
@@ -114,5 +97,31 @@ type Options = {
|
|
|
114
97
|
// Optional
|
|
115
98
|
// Specify files to ignore
|
|
116
99
|
ignores?: string[]
|
|
100
|
+
// Optional
|
|
101
|
+
// Configure TypeScript import resolver for monorepos
|
|
102
|
+
// Defaults to scanning root tsconfig.json and apps/**/{ts,js}config.json and packages/**/{ts,js}config.json
|
|
103
|
+
typescriptResolver?: import('eslint-import-resolver-typescript').TypeScriptResolverOptions
|
|
117
104
|
}
|
|
118
105
|
```
|
|
106
|
+
|
|
107
|
+
### TypeScript Import Resolver
|
|
108
|
+
|
|
109
|
+
When using a monorepo, you may need to customize the TypeScript import resolver configuration. By default, the resolver scans for `tsconfig.json` and `jsconfig.json` files in the following locations:
|
|
110
|
+
|
|
111
|
+
- `./tsconfig.json` (root)
|
|
112
|
+
- `apps/**/{ts,js}config.json`
|
|
113
|
+
- `packages/**/{ts,js}config.json`
|
|
114
|
+
|
|
115
|
+
If your monorepo structure differs, you can provide a custom `typescriptResolver` option:
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
export default defineConfig({
|
|
119
|
+
typescriptResolver: {
|
|
120
|
+
alwaysTryTypes: true,
|
|
121
|
+
bun: true,
|
|
122
|
+
project: ['packages/foo/tsconfig.json'],
|
|
123
|
+
},
|
|
124
|
+
})
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Refer to the [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) documentation for all available options.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,43 +1,9 @@
|
|
|
1
|
+
import { TypeScriptResolverOptions } from "eslint-import-resolver-typescript";
|
|
1
2
|
import { Selectors } from "eslint-plugin-better-tailwindcss/types";
|
|
2
3
|
import { Linter } from "eslint";
|
|
3
4
|
|
|
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 = {
|
|
5
|
+
//#region src/types/jsx-a11y.d.ts
|
|
6
|
+
type JsxA11yConfigOptions = {
|
|
41
7
|
a11y?: JsxA11yOptions;
|
|
42
8
|
};
|
|
43
9
|
type JsxA11yOptions = {
|
|
@@ -62,116 +28,6 @@ type JsxA11yOptions = {
|
|
|
62
28
|
};
|
|
63
29
|
//#endregion
|
|
64
30
|
//#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
31
|
/**
|
|
176
32
|
* Playwright configuration options.
|
|
177
33
|
*/
|
|
@@ -181,143 +37,18 @@ type PlaywrightOptions = {
|
|
|
181
37
|
*/
|
|
182
38
|
files: Array<string | string[]>;
|
|
183
39
|
/**
|
|
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
|
-
*
|
|
40
|
+
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/expect-expect.md#assertfunctionnames) for more details.
|
|
291
41
|
* @default []
|
|
292
42
|
*/
|
|
293
|
-
|
|
294
|
-
pattern: string;
|
|
295
|
-
message?: string;
|
|
296
|
-
fix?: string;
|
|
297
|
-
}>;
|
|
298
|
-
};
|
|
299
|
-
type NoUnknownClassesOptions = {
|
|
43
|
+
assertFunctionNames?: string[];
|
|
300
44
|
/**
|
|
301
|
-
* See [official docs](https://github.com/
|
|
302
|
-
*
|
|
45
|
+
* See [official docs](https://github.com/mskelton/eslint-plugin-playwright/blob/main/docs/rules/expect-expect.md#assertfunctionpatterns) for more details.
|
|
303
46
|
* @default []
|
|
304
47
|
*/
|
|
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;
|
|
48
|
+
assertFunctionPatterns?: string[];
|
|
320
49
|
};
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/types/tailwindcss.d.ts
|
|
321
52
|
type TailwindCSSOptions = {
|
|
322
53
|
/**
|
|
323
54
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#entrypoint) for more details.
|
|
@@ -333,18 +64,18 @@ type TailwindCSSOptions = {
|
|
|
333
64
|
tsconfig?: string;
|
|
334
65
|
/**
|
|
335
66
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#detectcomponentclasses) for more details.
|
|
336
|
-
*
|
|
337
67
|
* @default false
|
|
338
68
|
*/
|
|
339
69
|
detectComponentClasses?: boolean;
|
|
340
70
|
/**
|
|
341
71
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#rootfontsize) for more details.
|
|
342
|
-
*
|
|
343
72
|
* @default 16
|
|
344
73
|
*/
|
|
345
74
|
rootFontSize?: number;
|
|
346
75
|
/**
|
|
347
76
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#messagestyle) for more details.
|
|
77
|
+
* @default 'visual'
|
|
78
|
+
* @default 'compact' (when running in CI)
|
|
348
79
|
*/
|
|
349
80
|
messageStyle?: 'visual' | 'compact' | 'raw';
|
|
350
81
|
/**
|
|
@@ -354,23 +85,72 @@ type TailwindCSSOptions = {
|
|
|
354
85
|
/**
|
|
355
86
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md) for more details.
|
|
356
87
|
*/
|
|
357
|
-
|
|
88
|
+
canonical?: {
|
|
89
|
+
/**
|
|
90
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md#collapse) for more details.
|
|
91
|
+
* @default true
|
|
92
|
+
*/
|
|
93
|
+
collapse?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md#logical) for more details.
|
|
96
|
+
* @default true
|
|
97
|
+
*/
|
|
98
|
+
logical?: boolean;
|
|
99
|
+
};
|
|
358
100
|
/**
|
|
359
101
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md) for more details.
|
|
360
102
|
*/
|
|
361
|
-
|
|
103
|
+
classOrder?: {
|
|
104
|
+
/**
|
|
105
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#order) for more details.
|
|
106
|
+
* @default 'official'
|
|
107
|
+
*/
|
|
108
|
+
order?: 'asc' | 'desc' | 'official' | 'strict';
|
|
109
|
+
/**
|
|
110
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#componentClassOrder) for more details.
|
|
111
|
+
* @default 'preserve'
|
|
112
|
+
*/
|
|
113
|
+
componentOrder?: 'asc' | 'desc' | 'preserve';
|
|
114
|
+
/**
|
|
115
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#componentClassPosition) for more details.
|
|
116
|
+
* @default 'start'
|
|
117
|
+
*/
|
|
118
|
+
componentPosition?: 'start' | 'end';
|
|
119
|
+
/**
|
|
120
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#unknownClassOrder) for more details.
|
|
121
|
+
* @default 'preserve'
|
|
122
|
+
*/
|
|
123
|
+
unknownOrder?: 'asc' | 'desc' | 'preserve';
|
|
124
|
+
/**
|
|
125
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-class-order.md#unknownClassPosition) for more details.
|
|
126
|
+
* @default 'start'
|
|
127
|
+
*/
|
|
128
|
+
unknownPosition?: 'start' | 'end';
|
|
129
|
+
};
|
|
362
130
|
/**
|
|
363
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-restricted-classes.md) for more details.
|
|
131
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-restricted-classes.md#restrict) for more details.
|
|
132
|
+
* @default []
|
|
364
133
|
*/
|
|
365
|
-
|
|
134
|
+
restrict?: string[] | Array<{
|
|
135
|
+
pattern: string;
|
|
136
|
+
message?: string;
|
|
137
|
+
fix?: string;
|
|
138
|
+
}>;
|
|
366
139
|
/**
|
|
367
|
-
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unknown-classes.md) for more details.
|
|
140
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unknown-classes.md#ignore) for more details.
|
|
141
|
+
* @default []
|
|
368
142
|
*/
|
|
369
|
-
|
|
143
|
+
ignore?: string[];
|
|
370
144
|
/**
|
|
371
145
|
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unnecessary-whitespace.md) for more details.
|
|
372
146
|
*/
|
|
373
|
-
|
|
147
|
+
whitespace?: {
|
|
148
|
+
/**
|
|
149
|
+
* See [official docs](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unnecessary-whitespace.md#allowMultiline) for more details.
|
|
150
|
+
* @default true
|
|
151
|
+
*/
|
|
152
|
+
allowMultiline?: boolean;
|
|
153
|
+
};
|
|
374
154
|
};
|
|
375
155
|
//#endregion
|
|
376
156
|
//#region src/types/vitest.d.ts
|
|
@@ -395,8 +175,6 @@ type ConfigOptions = {
|
|
|
395
175
|
react?: boolean;
|
|
396
176
|
/**
|
|
397
177
|
* Enable additional ESLint rules optimized for Next.js projects.
|
|
398
|
-
*
|
|
399
|
-
* This option also automatically enables React rules.
|
|
400
178
|
*/
|
|
401
179
|
nextjs?: boolean;
|
|
402
180
|
/**
|
|
@@ -406,9 +184,9 @@ type ConfigOptions = {
|
|
|
406
184
|
*/
|
|
407
185
|
tailwindcss?: TailwindCSSOptions;
|
|
408
186
|
/**
|
|
409
|
-
* JSX configuration options.
|
|
187
|
+
* JSX accessibility configuration options.
|
|
410
188
|
*/
|
|
411
|
-
|
|
189
|
+
jsxA11y?: JsxA11yConfigOptions;
|
|
412
190
|
/**
|
|
413
191
|
* Vitest configuration options.
|
|
414
192
|
*
|
|
@@ -432,9 +210,12 @@ type ConfigOptions = {
|
|
|
432
210
|
*/
|
|
433
211
|
ignores?: string[];
|
|
434
212
|
/**
|
|
435
|
-
*
|
|
213
|
+
* TypeScript import resolver configuration options.
|
|
214
|
+
*
|
|
215
|
+
* Providing this object allows customizing how TypeScript resolves imports,
|
|
216
|
+
* useful for monorepos or custom project structures.
|
|
436
217
|
*/
|
|
437
|
-
|
|
218
|
+
typescriptResolver?: TypeScriptResolverOptions;
|
|
438
219
|
};
|
|
439
220
|
type FlatConfig = Linter.Config;
|
|
440
221
|
//#endregion
|
|
@@ -449,5 +230,5 @@ declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
|
449
230
|
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
450
231
|
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
451
232
|
//#endregion
|
|
452
|
-
export {
|
|
233
|
+
export { ConfigOptions, FlatConfig, GLOB_JS, GLOB_JSX, GLOB_SRC, GLOB_SRC_EXT, GLOB_TS, GLOB_TSX, JsxA11yConfigOptions, JsxA11yOptions, PlaywrightOptions, TailwindCSSOptions, VitestOptions, defineConfig };
|
|
453
234
|
//# 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;;AAJZ;;EAQE,UAAA,GAAa,MAAA;EAPb;;AAGF;EAQE,UAAA;IACE,GAAA;EAAA;EALF;;;EAUA,mBAAA;EAAA;;;EAIA,oBAAA;AAAA;;;;;;KCnBU,iBAAA;;ADHZ;;ECOE,KAAA,EAAO,KAAA;EDNP;;AAGF;;ECQE,mBAAA;EDJmB;;;;ECSnB,sBAAA;AAAA;;;KCfU,kBAAA;;;;EAIV,UAAA;EFN8B;;;EEU9B,cAAA;EFNU;;;EEUV,QAAA;EFNA;;;;EEWA,sBAAA;EFGA;;;;EEEA,YAAA;;ADrBF;;;;EC2BE,YAAA;EDvBO;;;EC2BP,SAAA,GAAY,SAAA;EDjBU;;;ECqBtB,SAAA;IApCU;;;;IAyCR,QAAA;IAjCF;;;;IAsCE,OAAA;EAAA;EAdU;;;EAmBZ,UAAA;IAAA;;;;IAKE,KAAA;IAoBA;;;;IAfA,cAAA;IAqB+D;;;;IAhB/D,iBAAA;IA8Bc;;;;IAzBd,YAAA;ICtEqB;;;;ID2ErB,eAAA;EAAA;;AEpEJ;;;EF0EE,QAAA,cAAsB,KAAA;IAAQ,OAAA;IAAiB,OAAA;IAAkB,GAAA;EAAA;EE3BnB;;;;EFgC9C,MAAA;EEjEc;;;EFqEd,UAAA;IE3DS;;;;IFgEP,cAAA;EAAA;AAAA;;;;;;KC/FQ,aAAA;;AHHZ;;EGOE,KAAA,EAAO,KAAA;AAAA;;;;;;KCGG,aAAA;EJNA;;;EIUV,KAAA;EJNA;;;EIUA,MAAA;EJAA;;;;;EIMA,WAAA,GAAc,kBAAA;;AHrBhB;;EGyBE,OAAA,GAAU,oBAAA;EHrBE;;;;;EG2BZ,MAAA,GAAS,aAAA;EHjBa;;;;ACfxB;EEsCE,UAAA,GAAa,iBAAA;;;;;;EAMb,QAAA;EFtBA;;;EE0BA,OAAA;EFZA;;;;;;EEmBA,kBAAA,GAAqB,yBAAA;AAAA;AAAA,KAGX,UAAA,GAAa,MAAA,CAAO,MAAA;;;cCxBnB,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"}
|