@luxass/eslint-config 4.0.0-beta.8 → 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 +351 -48
- package/dist/{chunk-TQ476NL2.mjs → chunk-4YBQZLPS.mjs} +13 -2
- package/dist/{chunk-NDNDG7BH.mjs → chunk-5NK24IKQ.mjs} +2 -5
- package/dist/{chunk-2SW2E3TH.mjs → chunk-5SDSWPKR.mjs} +14 -4
- package/dist/chunk-6T7MXPCT.mjs +17 -0
- package/dist/{chunk-ADP4MYOS.mjs → chunk-ANUYBAYV.mjs} +1 -1
- package/dist/{chunk-R4NSLRAE.mjs → chunk-ATRL3UZP.mjs} +14 -8
- package/dist/{chunk-P3N5WLFL.mjs → chunk-BXBN56WI.mjs} +11 -7
- package/dist/chunk-CJ3ZUYUJ.mjs +183 -0
- package/dist/chunk-DAJA5AV3.mjs +29 -0
- package/dist/{chunk-FK567E7G.mjs → chunk-DVQQVCGF.mjs} +7 -3
- package/dist/chunk-DZCXT6HT.mjs +288 -0
- package/dist/chunk-FU5SRKZU.mjs +104 -0
- package/dist/{chunk-LQLF2CMA.mjs → chunk-GBLPCM3X.mjs} +14 -17
- package/dist/chunk-KJ7ZCBK4.mjs +48 -0
- package/dist/{chunk-BAKUP7QM.mjs → chunk-P3QUAOFO.mjs} +36 -34
- package/dist/{chunk-I2ECCPNN.mjs → chunk-PYS26PF3.mjs} +15 -10
- package/dist/chunk-Q57BF3CR.mjs +63 -0
- package/dist/{chunk-SPQZTV4E.mjs → chunk-QK56GX3F.mjs} +12 -14
- package/dist/{chunk-3QHLEAXK.mjs → chunk-RDZJT36Z.mjs} +22 -8
- package/dist/{chunk-HE56XDG6.mjs → chunk-RVSUTDCE.mjs} +15 -5
- package/dist/chunk-UMUUVFB7.mjs +69 -0
- package/dist/{chunk-NUG6FLHN.mjs → chunk-VZ2YFMWH.mjs} +54 -11
- package/dist/chunk-WDSV2EFG.mjs +7 -0
- package/dist/{chunk-M5WNLLBT.mjs → chunk-WOYZWHPM.mjs} +20 -7
- package/dist/chunk-WRURTO5T.mjs +144 -0
- package/dist/configs/astro.cjs +11 -21
- package/dist/configs/astro.d.cts +3 -6
- package/dist/configs/astro.d.ts +3 -6
- package/dist/configs/astro.mjs +3 -3
- package/dist/configs/comments.cjs +9 -12
- package/dist/configs/comments.d.cts +3 -2
- package/dist/configs/comments.d.ts +3 -2
- package/dist/configs/comments.mjs +1 -2
- package/dist/configs/formatters.cjs +274 -0
- package/dist/configs/formatters.d.cts +11 -0
- package/dist/configs/formatters.d.ts +11 -0
- package/dist/configs/formatters.mjs +9 -0
- package/dist/configs/ignores.cjs +1 -8
- package/dist/configs/ignores.d.cts +3 -2
- package/dist/configs/ignores.d.ts +3 -2
- package/dist/configs/ignores.mjs +2 -2
- package/dist/configs/imports.cjs +35 -9
- package/dist/configs/imports.d.cts +13 -4
- package/dist/configs/imports.d.ts +13 -4
- package/dist/configs/imports.mjs +2 -2
- package/dist/configs/index.cjs +1116 -707
- package/dist/configs/index.d.cts +7 -18
- package/dist/configs/index.d.ts +7 -18
- package/dist/configs/index.mjs +40 -36
- package/dist/configs/javascript.cjs +9 -23
- package/dist/configs/javascript.d.cts +3 -6
- package/dist/configs/javascript.d.ts +3 -6
- package/dist/configs/javascript.mjs +2 -3
- package/dist/configs/jsdoc.cjs +6 -2
- package/dist/configs/jsdoc.d.cts +17 -4
- package/dist/configs/jsdoc.d.ts +17 -4
- package/dist/configs/jsdoc.mjs +2 -2
- package/dist/configs/jsonc.cjs +8 -11
- package/dist/configs/jsonc.d.cts +3 -6
- package/dist/configs/jsonc.d.ts +3 -6
- package/dist/configs/jsonc.mjs +3 -3
- package/dist/configs/markdown.cjs +46 -35
- package/dist/configs/markdown.d.cts +25 -4
- package/dist/configs/markdown.d.ts +25 -4
- package/dist/configs/markdown.mjs +3 -3
- package/dist/configs/nextjs.cjs +15 -12
- package/dist/configs/nextjs.d.cts +3 -6
- package/dist/configs/nextjs.d.ts +3 -6
- package/dist/configs/nextjs.mjs +3 -3
- package/dist/configs/node.cjs +0 -10
- package/dist/configs/node.d.cts +3 -2
- package/dist/configs/node.d.ts +3 -2
- package/dist/configs/node.mjs +1 -2
- package/dist/configs/perfectionist.cjs +2 -20
- package/dist/configs/perfectionist.d.cts +4 -3
- package/dist/configs/perfectionist.d.ts +4 -3
- package/dist/configs/perfectionist.mjs +1 -2
- package/dist/configs/react.cjs +201 -203
- package/dist/configs/react.d.cts +3 -6
- package/dist/configs/react.d.ts +3 -6
- package/dist/configs/react.mjs +3 -3
- package/dist/configs/sort.cjs +6 -6
- package/dist/configs/sort.d.cts +3 -2
- package/dist/configs/sort.d.ts +3 -2
- package/dist/configs/sort.mjs +1 -1
- package/dist/configs/stylistic.cjs +20 -11
- package/dist/configs/stylistic.d.cts +4 -7
- package/dist/configs/stylistic.d.ts +4 -7
- package/dist/configs/stylistic.mjs +4 -3
- package/dist/configs/tailwindcss.cjs +34 -45
- package/dist/configs/tailwindcss.d.cts +3 -6
- package/dist/configs/tailwindcss.d.ts +3 -6
- package/dist/configs/tailwindcss.mjs +3 -3
- package/dist/configs/test.cjs +103 -16
- package/dist/configs/test.d.cts +3 -6
- package/dist/configs/test.d.ts +3 -6
- package/dist/configs/test.mjs +4 -3
- package/dist/configs/toml.cjs +131 -0
- package/dist/configs/toml.d.cts +11 -0
- package/dist/configs/toml.d.ts +11 -0
- package/dist/configs/toml.mjs +8 -0
- package/dist/configs/typescript.cjs +32 -43
- package/dist/configs/typescript.d.cts +3 -6
- package/dist/configs/typescript.d.ts +3 -6
- package/dist/configs/typescript.mjs +3 -4
- package/dist/configs/unicorn.cjs +13 -10
- package/dist/configs/unicorn.d.cts +3 -2
- package/dist/configs/unicorn.d.ts +3 -2
- package/dist/configs/unicorn.mjs +1 -2
- package/dist/configs/unocss.cjs +74 -4
- package/dist/configs/unocss.d.cts +3 -6
- package/dist/configs/unocss.d.ts +3 -6
- package/dist/configs/unocss.mjs +3 -2
- package/dist/configs/vue.cjs +51 -15
- package/dist/configs/vue.d.cts +3 -6
- package/dist/configs/vue.d.ts +3 -6
- package/dist/configs/vue.mjs +3 -3
- package/dist/configs/yaml.cjs +17 -11
- package/dist/configs/yaml.d.cts +3 -6
- package/dist/configs/yaml.d.ts +3 -6
- package/dist/configs/yaml.mjs +3 -3
- package/dist/custom-rules/utils.cjs +31 -0
- package/dist/custom-rules/utils.d.cts +6 -0
- package/dist/custom-rules/utils.d.ts +6 -0
- package/dist/custom-rules/utils.mjs +6 -0
- package/dist/globs.cjs +157 -0
- package/dist/globs.d.cts +28 -0
- package/dist/globs.d.ts +28 -0
- package/dist/globs.mjs +56 -0
- package/dist/index.cjs +1470 -1040
- package/dist/index.d.cts +10 -44
- package/dist/index.d.ts +10 -44
- package/dist/index.mjs +106 -140
- package/dist/types-spTEGSaV.d.cts +632 -0
- package/dist/types-spTEGSaV.d.ts +632 -0
- package/package.json +69 -37
- package/dist/chunk-24KJPXII.mjs +0 -51
- package/dist/chunk-4HH6LYJ6.mjs +0 -25
- package/dist/chunk-4JKENKIP.mjs +0 -67
- package/dist/chunk-C5VMTRKT.mjs +0 -18
- package/dist/chunk-CFSYEIE4.mjs +0 -23
- package/dist/chunk-ERFDRAGW.mjs +0 -86
- package/dist/chunk-HLDEUDLN.mjs +0 -28
- package/dist/chunk-UBPIYSHC.mjs +0 -284
- package/dist/types-fxhbVLKI.d.cts +0 -235
- package/dist/types-fxhbVLKI.d.ts +0 -235
- package/dist/{chunk-FKAOMYGL.mjs → chunk-ME2OAMS3.mjs} +0 -0
- package/dist/{chunk-FOIFEV73.mjs → chunk-XBASVDU6.mjs} +6 -6
package/dist/configs/react.cjs
CHANGED
|
@@ -36,9 +36,9 @@ module.exports = __toCommonJS(react_exports);
|
|
|
36
36
|
|
|
37
37
|
// src/globs.ts
|
|
38
38
|
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
39
|
-
var GLOB_SRC =
|
|
40
|
-
var
|
|
41
|
-
var
|
|
39
|
+
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
40
|
+
var GLOB_JSX = "**/*.?([cm])jsx";
|
|
41
|
+
var GLOB_TSX = "**/*.?([cm])tsx";
|
|
42
42
|
var GLOB_MARKDOWN = "**/*.md";
|
|
43
43
|
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
44
44
|
var GLOB_TESTS = [
|
|
@@ -48,11 +48,6 @@ var GLOB_TESTS = [
|
|
|
48
48
|
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
49
49
|
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
50
50
|
];
|
|
51
|
-
var GLOB_NEXTJS_OG = [
|
|
52
|
-
`**/app/**/opengraph-image.${GLOB_JSX_EXT}`,
|
|
53
|
-
`**/app/**/twitter-image.${GLOB_JSX_EXT}`,
|
|
54
|
-
`**/app/**/route.${GLOB_JSX_EXT}`
|
|
55
|
-
];
|
|
56
51
|
var GLOB_NEXTJS_ROUTES = [
|
|
57
52
|
`**/app/**/page.${GLOB_SRC_EXT}`,
|
|
58
53
|
`**/app/**/layout.${GLOB_SRC_EXT}`,
|
|
@@ -85,8 +80,8 @@ async function ensure(packages) {
|
|
|
85
80
|
const { default: prompts } = await import("prompts");
|
|
86
81
|
const { result } = await prompts([
|
|
87
82
|
{
|
|
88
|
-
message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`,
|
|
89
83
|
name: "result",
|
|
84
|
+
message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`,
|
|
90
85
|
type: "confirm"
|
|
91
86
|
}
|
|
92
87
|
]);
|
|
@@ -99,9 +94,10 @@ async function ensure(packages) {
|
|
|
99
94
|
}
|
|
100
95
|
|
|
101
96
|
// src/configs/react.ts
|
|
102
|
-
async function react(options) {
|
|
97
|
+
async function react(options = {}) {
|
|
103
98
|
const {
|
|
104
99
|
a11y = false,
|
|
100
|
+
files = [GLOB_JSX, GLOB_TSX],
|
|
105
101
|
overrides = {},
|
|
106
102
|
typescript = true
|
|
107
103
|
} = options;
|
|
@@ -120,7 +116,7 @@ async function react(options) {
|
|
|
120
116
|
interop(import("eslint-plugin-react")),
|
|
121
117
|
interop(import("eslint-plugin-react-hooks")),
|
|
122
118
|
interop(import("eslint-plugin-react-refresh")),
|
|
123
|
-
...
|
|
119
|
+
...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
|
|
124
120
|
]);
|
|
125
121
|
return [
|
|
126
122
|
{
|
|
@@ -133,7 +129,8 @@ async function react(options) {
|
|
|
133
129
|
}
|
|
134
130
|
},
|
|
135
131
|
{
|
|
136
|
-
|
|
132
|
+
name: "luxass:react:rules",
|
|
133
|
+
files,
|
|
137
134
|
languageOptions: {
|
|
138
135
|
parserOptions: {
|
|
139
136
|
ecmaFeatures: {
|
|
@@ -141,198 +138,194 @@ async function react(options) {
|
|
|
141
138
|
}
|
|
142
139
|
}
|
|
143
140
|
},
|
|
144
|
-
name: "luxass:react:rules",
|
|
145
141
|
rules: {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
"
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
"
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
"
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
"
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
"
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
"
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
"
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
"react-hooks/rules-of-hooks": "error",
|
|
334
|
-
// react refresh
|
|
335
|
-
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
|
|
142
|
+
...a11y ? {
|
|
143
|
+
// recommended rules for jsx-a11y
|
|
144
|
+
"jsx-a11y/alt-text": "error",
|
|
145
|
+
"jsx-a11y/anchor-ambiguous-text": "off",
|
|
146
|
+
"jsx-a11y/anchor-has-content": "error",
|
|
147
|
+
"jsx-a11y/anchor-is-valid": "error",
|
|
148
|
+
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
|
149
|
+
"jsx-a11y/aria-props": "error",
|
|
150
|
+
"jsx-a11y/aria-proptypes": "error",
|
|
151
|
+
"jsx-a11y/aria-role": "error",
|
|
152
|
+
"jsx-a11y/aria-unsupported-elements": "error",
|
|
153
|
+
"jsx-a11y/autocomplete-valid": "error",
|
|
154
|
+
"jsx-a11y/click-events-have-key-events": "error",
|
|
155
|
+
"jsx-a11y/control-has-associated-label": [
|
|
156
|
+
"off",
|
|
157
|
+
{
|
|
158
|
+
ignoreElements: [
|
|
159
|
+
"audio",
|
|
160
|
+
"canvas",
|
|
161
|
+
"embed",
|
|
162
|
+
"input",
|
|
163
|
+
"textarea",
|
|
164
|
+
"tr",
|
|
165
|
+
"video"
|
|
166
|
+
],
|
|
167
|
+
ignoreRoles: [
|
|
168
|
+
"grid",
|
|
169
|
+
"listbox",
|
|
170
|
+
"menu",
|
|
171
|
+
"menubar",
|
|
172
|
+
"radiogroup",
|
|
173
|
+
"row",
|
|
174
|
+
"tablist",
|
|
175
|
+
"toolbar",
|
|
176
|
+
"tree",
|
|
177
|
+
"treegrid"
|
|
178
|
+
],
|
|
179
|
+
includeRoles: [
|
|
180
|
+
"alert",
|
|
181
|
+
"dialog"
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"jsx-a11y/heading-has-content": "error",
|
|
186
|
+
"jsx-a11y/html-has-lang": "error",
|
|
187
|
+
"jsx-a11y/iframe-has-title": "error",
|
|
188
|
+
"jsx-a11y/img-redundant-alt": "error",
|
|
189
|
+
"jsx-a11y/interactive-supports-focus": [
|
|
190
|
+
"error",
|
|
191
|
+
{
|
|
192
|
+
tabbable: [
|
|
193
|
+
"button",
|
|
194
|
+
"checkbox",
|
|
195
|
+
"link",
|
|
196
|
+
"searchbox",
|
|
197
|
+
"spinbutton",
|
|
198
|
+
"switch",
|
|
199
|
+
"textbox"
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"jsx-a11y/label-has-associated-control": "error",
|
|
204
|
+
"jsx-a11y/label-has-for": "off",
|
|
205
|
+
"jsx-a11y/media-has-caption": "error",
|
|
206
|
+
"jsx-a11y/mouse-events-have-key-events": "error",
|
|
207
|
+
"jsx-a11y/no-access-key": "error",
|
|
208
|
+
"jsx-a11y/no-autofocus": "error",
|
|
209
|
+
"jsx-a11y/no-distracting-elements": "error",
|
|
210
|
+
"jsx-a11y/no-interactive-element-to-noninteractive-role": [
|
|
211
|
+
"error",
|
|
212
|
+
{
|
|
213
|
+
canvas: [
|
|
214
|
+
"img"
|
|
215
|
+
],
|
|
216
|
+
tr: [
|
|
217
|
+
"none",
|
|
218
|
+
"presentation"
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"jsx-a11y/no-noninteractive-element-interactions": [
|
|
223
|
+
"error",
|
|
224
|
+
{
|
|
225
|
+
alert: [
|
|
226
|
+
"onKeyUp",
|
|
227
|
+
"onKeyDown",
|
|
228
|
+
"onKeyPress"
|
|
229
|
+
],
|
|
230
|
+
body: [
|
|
231
|
+
"onError",
|
|
232
|
+
"onLoad"
|
|
233
|
+
],
|
|
234
|
+
dialog: [
|
|
235
|
+
"onKeyUp",
|
|
236
|
+
"onKeyDown",
|
|
237
|
+
"onKeyPress"
|
|
238
|
+
],
|
|
239
|
+
handlers: [
|
|
240
|
+
"onClick",
|
|
241
|
+
"onError",
|
|
242
|
+
"onLoad",
|
|
243
|
+
"onMouseDown",
|
|
244
|
+
"onMouseUp",
|
|
245
|
+
"onKeyPress",
|
|
246
|
+
"onKeyDown",
|
|
247
|
+
"onKeyUp"
|
|
248
|
+
],
|
|
249
|
+
iframe: [
|
|
250
|
+
"onError",
|
|
251
|
+
"onLoad"
|
|
252
|
+
],
|
|
253
|
+
img: [
|
|
254
|
+
"onError",
|
|
255
|
+
"onLoad"
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
"jsx-a11y/no-noninteractive-element-to-interactive-role": [
|
|
260
|
+
"error",
|
|
261
|
+
{
|
|
262
|
+
fieldset: [
|
|
263
|
+
"radiogroup",
|
|
264
|
+
"presentation"
|
|
265
|
+
],
|
|
266
|
+
li: [
|
|
267
|
+
"menuitem",
|
|
268
|
+
"option",
|
|
269
|
+
"row",
|
|
270
|
+
"tab",
|
|
271
|
+
"treeitem"
|
|
272
|
+
],
|
|
273
|
+
ol: [
|
|
274
|
+
"listbox",
|
|
275
|
+
"menu",
|
|
276
|
+
"menubar",
|
|
277
|
+
"radiogroup",
|
|
278
|
+
"tablist",
|
|
279
|
+
"tree",
|
|
280
|
+
"treegrid"
|
|
281
|
+
],
|
|
282
|
+
table: [
|
|
283
|
+
"grid"
|
|
284
|
+
],
|
|
285
|
+
td: [
|
|
286
|
+
"gridcell"
|
|
287
|
+
],
|
|
288
|
+
ul: [
|
|
289
|
+
"listbox",
|
|
290
|
+
"menu",
|
|
291
|
+
"menubar",
|
|
292
|
+
"radiogroup",
|
|
293
|
+
"tablist",
|
|
294
|
+
"tree",
|
|
295
|
+
"treegrid"
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"jsx-a11y/no-noninteractive-tabindex": [
|
|
300
|
+
"error",
|
|
301
|
+
{
|
|
302
|
+
allowExpressionValues: true,
|
|
303
|
+
roles: [
|
|
304
|
+
"tabpanel"
|
|
305
|
+
],
|
|
306
|
+
tags: []
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"jsx-a11y/no-redundant-roles": "error",
|
|
310
|
+
"jsx-a11y/no-static-element-interactions": [
|
|
311
|
+
"error",
|
|
312
|
+
{
|
|
313
|
+
allowExpressionValues: true,
|
|
314
|
+
handlers: [
|
|
315
|
+
"onClick",
|
|
316
|
+
"onMouseDown",
|
|
317
|
+
"onMouseUp",
|
|
318
|
+
"onKeyPress",
|
|
319
|
+
"onKeyDown",
|
|
320
|
+
"onKeyUp"
|
|
321
|
+
]
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
"jsx-a11y/role-has-required-aria-props": "error",
|
|
325
|
+
"jsx-a11y/role-supports-aria-props": "error",
|
|
326
|
+
"jsx-a11y/scope": "error",
|
|
327
|
+
"jsx-a11y/tabindex-no-positive": "error"
|
|
328
|
+
} : {},
|
|
336
329
|
// recommended rules react
|
|
337
330
|
"react/display-name": "error",
|
|
338
331
|
"react/jsx-key": "error",
|
|
@@ -356,6 +349,11 @@ async function react(options) {
|
|
|
356
349
|
"react/prop-types": "error",
|
|
357
350
|
"react/react-in-jsx-scope": "off",
|
|
358
351
|
"react/require-render-return": "error",
|
|
352
|
+
// recommended rules react-hooks
|
|
353
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
354
|
+
"react-hooks/rules-of-hooks": "error",
|
|
355
|
+
// react refresh
|
|
356
|
+
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
|
|
359
357
|
...typescript ? {
|
|
360
358
|
"react/prop-type": "off"
|
|
361
359
|
} : {},
|
package/dist/configs/react.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export { R as ReactOptions, r as react } from '../types-spTEGSaV.cjs';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@typescript-eslint/parser';
|
|
4
3
|
import '@antfu/eslint-define-config';
|
|
5
4
|
import '@eslint-types/jsdoc/types';
|
|
6
5
|
import '@eslint-types/typescript-eslint/types';
|
|
@@ -8,7 +7,5 @@ import '@eslint-types/unicorn/types';
|
|
|
8
7
|
import 'eslint-plugin-antfu';
|
|
9
8
|
import '@stylistic/eslint-plugin';
|
|
10
9
|
import 'eslint';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export { react };
|
|
10
|
+
import '@typescript-eslint/parser';
|
|
11
|
+
import 'eslint-processor-vue-blocks';
|
package/dist/configs/react.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export { R as ReactOptions, r as react } from '../types-spTEGSaV.js';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@typescript-eslint/parser';
|
|
4
3
|
import '@antfu/eslint-define-config';
|
|
5
4
|
import '@eslint-types/jsdoc/types';
|
|
6
5
|
import '@eslint-types/typescript-eslint/types';
|
|
@@ -8,7 +7,5 @@ import '@eslint-types/unicorn/types';
|
|
|
8
7
|
import 'eslint-plugin-antfu';
|
|
9
8
|
import '@stylistic/eslint-plugin';
|
|
10
9
|
import 'eslint';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export { react };
|
|
10
|
+
import '@typescript-eslint/parser';
|
|
11
|
+
import 'eslint-processor-vue-blocks';
|
package/dist/configs/react.mjs
CHANGED
package/dist/configs/sort.cjs
CHANGED
|
@@ -27,8 +27,8 @@ module.exports = __toCommonJS(sort_exports);
|
|
|
27
27
|
function sortPackageJson() {
|
|
28
28
|
return [
|
|
29
29
|
{
|
|
30
|
-
files: ["**/package.json"],
|
|
31
30
|
name: "luxass:sort-package-json",
|
|
31
|
+
files: ["**/package.json"],
|
|
32
32
|
rules: {
|
|
33
33
|
"jsonc/sort-array-values": [
|
|
34
34
|
"error",
|
|
@@ -41,15 +41,15 @@ function sortPackageJson() {
|
|
|
41
41
|
"error",
|
|
42
42
|
{
|
|
43
43
|
order: [
|
|
44
|
-
"publisher",
|
|
45
44
|
"name",
|
|
46
45
|
"displayName",
|
|
47
|
-
"type",
|
|
48
46
|
"version",
|
|
49
|
-
"private",
|
|
50
|
-
"packageManager",
|
|
51
47
|
"description",
|
|
48
|
+
"type",
|
|
49
|
+
"private",
|
|
52
50
|
"author",
|
|
51
|
+
"publisher",
|
|
52
|
+
"packageManager",
|
|
53
53
|
"license",
|
|
54
54
|
"funding",
|
|
55
55
|
"homepage",
|
|
@@ -111,8 +111,8 @@ function sortPackageJson() {
|
|
|
111
111
|
function sortTsconfig() {
|
|
112
112
|
return [
|
|
113
113
|
{
|
|
114
|
-
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
115
114
|
name: "luxass:sort-tsconfig",
|
|
115
|
+
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
116
116
|
rules: {
|
|
117
117
|
"jsonc/sort-keys": [
|
|
118
118
|
"error",
|
package/dist/configs/sort.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as FlatConfigItem } from '../types-spTEGSaV.cjs';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@typescript-eslint/parser';
|
|
4
3
|
import '@antfu/eslint-define-config';
|
|
5
4
|
import '@eslint-types/jsdoc/types';
|
|
6
5
|
import '@eslint-types/typescript-eslint/types';
|
|
@@ -8,6 +7,8 @@ import '@eslint-types/unicorn/types';
|
|
|
8
7
|
import 'eslint-plugin-antfu';
|
|
9
8
|
import '@stylistic/eslint-plugin';
|
|
10
9
|
import 'eslint';
|
|
10
|
+
import '@typescript-eslint/parser';
|
|
11
|
+
import 'eslint-processor-vue-blocks';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Sort package.json
|
package/dist/configs/sort.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as FlatConfigItem } from '../types-spTEGSaV.js';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@typescript-eslint/parser';
|
|
4
3
|
import '@antfu/eslint-define-config';
|
|
5
4
|
import '@eslint-types/jsdoc/types';
|
|
6
5
|
import '@eslint-types/typescript-eslint/types';
|
|
@@ -8,6 +7,8 @@ import '@eslint-types/unicorn/types';
|
|
|
8
7
|
import 'eslint-plugin-antfu';
|
|
9
8
|
import '@stylistic/eslint-plugin';
|
|
10
9
|
import 'eslint';
|
|
10
|
+
import '@typescript-eslint/parser';
|
|
11
|
+
import 'eslint-processor-vue-blocks';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Sort package.json
|