@luxass/eslint-config 4.0.0-beta.9 → 4.0.1

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