@eslint-react/eslint-plugin 5.30.0-beta.12 → 5.30.0-beta.13
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 +5 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +80 -60
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://npmx.dev/package/eslint-plugin-react-x)
|
|
6
6
|
[](https://npmx.dev/package/eslint-plugin-react-x)
|
|
7
7
|
[](https://github.com/Rel1cx/eslint-react/blob/main/LICENSE)
|
|
8
|
-
[](https://tsdown.dev)
|
|
9
9
|
|
|
10
10
|
Composable ESLint rules for React and friends.
|
|
11
11
|
|
|
@@ -160,6 +160,10 @@ export default defineConfig(
|
|
|
160
160
|
|
|
161
161
|
### Other
|
|
162
162
|
|
|
163
|
+
- `all`\
|
|
164
|
+
Enable all rules that do not require type information.
|
|
165
|
+
- `all-type-checked`\
|
|
166
|
+
Same as the `all` preset but enables additional rules that require type information.
|
|
163
167
|
- `disable-jsx`\
|
|
164
168
|
Disable rules in the `jsx` preset.
|
|
165
169
|
- `disable-rsc`\
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ESLint, Linter } from "eslint";
|
|
2
|
-
type ConfigName = "all" | "disable-conflict-eslint-plugin-react" | "disable-conflict-eslint-plugin-react-hooks" | "disable-dom" | "disable-experimental" | "disable-jsx" | "disable-naming-convention" | "disable-rsc" | "disable-type-checked" | "disable-web-api" | "dom" | "jsx" | "naming-convention" | "off" | "recommended" | "recommended-type-checked" | "recommended-typescript" | "rsc" | "strict" | "strict-type-checked" | "strict-typescript" | "web-api" | "x";
|
|
2
|
+
type ConfigName = "all" | "all-type-checked" | "disable-conflict-eslint-plugin-react" | "disable-conflict-eslint-plugin-react-hooks" | "disable-dom" | "disable-experimental" | "disable-jsx" | "disable-naming-convention" | "disable-rsc" | "disable-type-checked" | "disable-web-api" | "dom" | "jsx" | "naming-convention" | "off" | "recommended" | "recommended-type-checked" | "recommended-typescript" | "rsc" | "strict" | "strict-type-checked" | "strict-typescript" | "web-api" | "x";
|
|
3
3
|
declare const finalPlugin: ESLint.Plugin & {
|
|
4
4
|
/**
|
|
5
5
|
* For more information about each preset, please refer to the documentation.
|
package/dist/index.js
CHANGED
|
@@ -18,11 +18,11 @@ var __exportAll = (all, no_symbols) => {
|
|
|
18
18
|
};
|
|
19
19
|
// src/configs/dom.ts
|
|
20
20
|
var dom_exports = /* @__PURE__ */ __exportAll({
|
|
21
|
-
name: () => name$
|
|
22
|
-
rules: () => rules$
|
|
21
|
+
name: () => name$24,
|
|
22
|
+
rules: () => rules$23
|
|
23
23
|
});
|
|
24
|
-
const name$
|
|
25
|
-
const rules$
|
|
24
|
+
const name$24 = "@eslint-react/dom";
|
|
25
|
+
const rules$23 = {
|
|
26
26
|
"@eslint-react/dom-no-dangerously-set-innerhtml": "warn",
|
|
27
27
|
"@eslint-react/dom-no-dangerously-set-innerhtml-with-children": "error",
|
|
28
28
|
"@eslint-react/dom-no-find-dom-node": "error",
|
|
@@ -37,11 +37,11 @@ const rules$22 = {
|
|
|
37
37
|
};
|
|
38
38
|
// src/configs/jsx.ts
|
|
39
39
|
var jsx_exports = /* @__PURE__ */ __exportAll({
|
|
40
|
-
name: () => name$
|
|
41
|
-
rules: () => rules$
|
|
40
|
+
name: () => name$23,
|
|
41
|
+
rules: () => rules$22
|
|
42
42
|
});
|
|
43
|
-
const name$
|
|
44
|
-
const rules$
|
|
43
|
+
const name$23 = "@eslint-react/jsx";
|
|
44
|
+
const rules$22 = {
|
|
45
45
|
"@eslint-react/jsx-no-children-prop": "warn",
|
|
46
46
|
"@eslint-react/jsx-no-children-prop-with-children": "error",
|
|
47
47
|
"@eslint-react/jsx-no-comment-textnodes": "warn",
|
|
@@ -52,30 +52,30 @@ const rules$21 = {
|
|
|
52
52
|
};
|
|
53
53
|
// src/configs/naming-convention.ts
|
|
54
54
|
var naming_convention_exports = /* @__PURE__ */ __exportAll({
|
|
55
|
-
name: () => name$
|
|
56
|
-
rules: () => rules$
|
|
55
|
+
name: () => name$22,
|
|
56
|
+
rules: () => rules$21
|
|
57
57
|
});
|
|
58
|
-
const name$
|
|
59
|
-
const rules$
|
|
58
|
+
const name$22 = "@eslint-react/naming-convention";
|
|
59
|
+
const rules$21 = {
|
|
60
60
|
"@eslint-react/naming-convention-context-name": "warn",
|
|
61
61
|
"@eslint-react/naming-convention-id-name": "warn",
|
|
62
62
|
"@eslint-react/naming-convention-ref-name": "warn"
|
|
63
63
|
};
|
|
64
64
|
// src/configs/rsc.ts
|
|
65
65
|
var rsc_exports = /* @__PURE__ */ __exportAll({
|
|
66
|
-
name: () => name$
|
|
67
|
-
rules: () => rules$
|
|
66
|
+
name: () => name$21,
|
|
67
|
+
rules: () => rules$20
|
|
68
68
|
});
|
|
69
|
-
const name$
|
|
70
|
-
const rules$
|
|
69
|
+
const name$21 = "@eslint-react/rsc";
|
|
70
|
+
const rules$20 = { "@eslint-react/rsc-function-definition": "error" };
|
|
71
71
|
// src/configs/x.ts
|
|
72
72
|
var x_exports = /* @__PURE__ */ __exportAll({
|
|
73
|
-
name: () => name$
|
|
74
|
-
rules: () => rules$
|
|
75
|
-
settings: () => settings$
|
|
73
|
+
name: () => name$20,
|
|
74
|
+
rules: () => rules$19,
|
|
75
|
+
settings: () => settings$9
|
|
76
76
|
});
|
|
77
|
-
const name$
|
|
78
|
-
const rules$
|
|
77
|
+
const name$20 = "@eslint-react/x";
|
|
78
|
+
const rules$19 = {
|
|
79
79
|
"@eslint-react/error-boundaries": "error",
|
|
80
80
|
"@eslint-react/exhaustive-deps": "warn",
|
|
81
81
|
"@eslint-react/no-access-state-in-setstate": "error",
|
|
@@ -114,15 +114,15 @@ const rules$18 = {
|
|
|
114
114
|
"@eslint-react/use-memo": "error",
|
|
115
115
|
"@eslint-react/use-state": "warn"
|
|
116
116
|
};
|
|
117
|
-
const settings$
|
|
117
|
+
const settings$9 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
|
|
118
118
|
// src/configs/web-api.ts
|
|
119
119
|
var web_api_exports = /* @__PURE__ */ __exportAll({
|
|
120
|
-
name: () => name$
|
|
121
|
-
rules: () => rules$
|
|
122
|
-
settings: () => settings$
|
|
120
|
+
name: () => name$19,
|
|
121
|
+
rules: () => rules$18,
|
|
122
|
+
settings: () => settings$8
|
|
123
123
|
});
|
|
124
|
-
const name$
|
|
125
|
-
const rules$
|
|
124
|
+
const name$19 = "@eslint-react/web-api";
|
|
125
|
+
const rules$18 = {
|
|
126
126
|
"@eslint-react/web-api-no-leaked-event-listener": "warn",
|
|
127
127
|
"@eslint-react/web-api-no-leaked-fetch": "warn",
|
|
128
128
|
"@eslint-react/web-api-no-leaked-intersection-observer": "warn",
|
|
@@ -130,34 +130,34 @@ const rules$17 = {
|
|
|
130
130
|
"@eslint-react/web-api-no-leaked-resize-observer": "warn",
|
|
131
131
|
"@eslint-react/web-api-no-leaked-timeout": "warn"
|
|
132
132
|
};
|
|
133
|
-
const settings$
|
|
133
|
+
const settings$8 = { ...settings$9 };
|
|
134
134
|
// src/configs/recommended.ts
|
|
135
135
|
var recommended_exports = /* @__PURE__ */ __exportAll({
|
|
136
|
-
languageOptions: () => languageOptions$
|
|
137
|
-
name: () => name$
|
|
138
|
-
rules: () => rules$
|
|
139
|
-
settings: () => settings$
|
|
136
|
+
languageOptions: () => languageOptions$7,
|
|
137
|
+
name: () => name$18,
|
|
138
|
+
rules: () => rules$17,
|
|
139
|
+
settings: () => settings$7
|
|
140
140
|
});
|
|
141
|
-
const name$
|
|
142
|
-
const rules$
|
|
143
|
-
...rules$18,
|
|
144
|
-
...rules$21,
|
|
141
|
+
const name$18 = "@eslint-react/recommended";
|
|
142
|
+
const rules$17 = {
|
|
145
143
|
...rules$19,
|
|
146
144
|
...rules$22,
|
|
147
|
-
...rules$
|
|
148
|
-
...rules$
|
|
145
|
+
...rules$20,
|
|
146
|
+
...rules$23,
|
|
147
|
+
...rules$18,
|
|
148
|
+
...rules$21
|
|
149
149
|
};
|
|
150
|
-
const settings$
|
|
151
|
-
const languageOptions$
|
|
150
|
+
const settings$7 = { ...settings$9 };
|
|
151
|
+
const languageOptions$7 = { parserOptions: { ecmaFeatures: { jsx: true } } };
|
|
152
152
|
// src/configs/all.ts
|
|
153
153
|
var all_exports = /* @__PURE__ */ __exportAll({
|
|
154
|
-
languageOptions: () => languageOptions$
|
|
155
|
-
name: () => name$
|
|
156
|
-
rules: () => rules$
|
|
157
|
-
settings: () => settings$
|
|
154
|
+
languageOptions: () => languageOptions$6,
|
|
155
|
+
name: () => name$17,
|
|
156
|
+
rules: () => rules$16,
|
|
157
|
+
settings: () => settings$6
|
|
158
158
|
});
|
|
159
|
-
const name$
|
|
160
|
-
const rules$
|
|
159
|
+
const name$17 = "@eslint-react/all";
|
|
160
|
+
const rules$16 = {
|
|
161
161
|
"@eslint-react/error-boundaries": "error",
|
|
162
162
|
"@eslint-react/exhaustive-deps": "warn",
|
|
163
163
|
"@eslint-react/globals": "warn",
|
|
@@ -203,6 +203,7 @@ const rules$15 = {
|
|
|
203
203
|
"@eslint-react/set-state-in-effect": "warn",
|
|
204
204
|
"@eslint-react/set-state-in-render": "error",
|
|
205
205
|
"@eslint-react/static-components": "error",
|
|
206
|
+
"@eslint-react/unstable-exhaustive-deps": "warn",
|
|
206
207
|
"@eslint-react/unsupported-syntax": "error",
|
|
207
208
|
"@eslint-react/use-memo": "error",
|
|
208
209
|
"@eslint-react/use-state": "warn",
|
|
@@ -241,7 +242,25 @@ const rules$15 = {
|
|
|
241
242
|
"@eslint-react/naming-convention-id-name": "warn",
|
|
242
243
|
"@eslint-react/naming-convention-ref-name": "warn"
|
|
243
244
|
};
|
|
244
|
-
const settings$
|
|
245
|
+
const settings$6 = { ...settings$9 };
|
|
246
|
+
const languageOptions$6 = languageOptions$7;
|
|
247
|
+
// src/configs/all-type-checked.ts
|
|
248
|
+
var all_type_checked_exports = /* @__PURE__ */ __exportAll({
|
|
249
|
+
languageOptions: () => languageOptions$5,
|
|
250
|
+
name: () => name$16,
|
|
251
|
+
rules: () => rules$15,
|
|
252
|
+
settings: () => settings$5
|
|
253
|
+
});
|
|
254
|
+
const name$16 = "@eslint-react/all-type-checked";
|
|
255
|
+
const rules$15 = {
|
|
256
|
+
...rules$16,
|
|
257
|
+
"@eslint-react/no-implicit-children": "warn",
|
|
258
|
+
"@eslint-react/no-implicit-key": "warn",
|
|
259
|
+
"@eslint-react/no-implicit-ref": "warn",
|
|
260
|
+
"@eslint-react/no-leaked-conditional-rendering": "error",
|
|
261
|
+
"@eslint-react/no-unused-props": "warn"
|
|
262
|
+
};
|
|
263
|
+
const settings$5 = { ...settings$6 };
|
|
245
264
|
const languageOptions$5 = languageOptions$6;
|
|
246
265
|
// src/configs/disable-conflict-eslint-plugin-react.ts
|
|
247
266
|
var disable_conflict_eslint_plugin_react_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -263,7 +282,7 @@ var disable_dom_exports = /* @__PURE__ */ __exportAll({
|
|
|
263
282
|
rules: () => rules$12
|
|
264
283
|
});
|
|
265
284
|
const name$13 = "@eslint-react/disable-dom";
|
|
266
|
-
const rules$12 = Object.fromEntries(Object.entries(rules$
|
|
285
|
+
const rules$12 = Object.fromEntries(Object.entries(rules$23).map(([key]) => [key, "off"]));
|
|
267
286
|
// src/configs/disable-experimental.ts
|
|
268
287
|
var disable_experimental_exports = /* @__PURE__ */ __exportAll({
|
|
269
288
|
name: () => name$12,
|
|
@@ -293,21 +312,21 @@ var disable_jsx_exports = /* @__PURE__ */ __exportAll({
|
|
|
293
312
|
rules: () => rules$10
|
|
294
313
|
});
|
|
295
314
|
const name$11 = "@eslint-react/disable-jsx";
|
|
296
|
-
const rules$10 = Object.fromEntries(Object.entries(rules$
|
|
315
|
+
const rules$10 = Object.fromEntries(Object.entries(rules$22).map(([key]) => [key, "off"]));
|
|
297
316
|
// src/configs/disable-naming-convention.ts
|
|
298
317
|
var disable_naming_convention_exports = /* @__PURE__ */ __exportAll({
|
|
299
318
|
name: () => name$10,
|
|
300
319
|
rules: () => rules$9
|
|
301
320
|
});
|
|
302
321
|
const name$10 = "@eslint-react/disable-naming-convention";
|
|
303
|
-
const rules$9 = Object.fromEntries(Object.entries(rules$
|
|
322
|
+
const rules$9 = Object.fromEntries(Object.entries(rules$21).map(([key]) => [key, "off"]));
|
|
304
323
|
// src/configs/disable-rsc.ts
|
|
305
324
|
var disable_rsc_exports = /* @__PURE__ */ __exportAll({
|
|
306
325
|
name: () => name$9,
|
|
307
326
|
rules: () => rules$8
|
|
308
327
|
});
|
|
309
328
|
const name$9 = "@eslint-react/disable-rsc";
|
|
310
|
-
const rules$8 = Object.fromEntries(Object.entries(rules$
|
|
329
|
+
const rules$8 = Object.fromEntries(Object.entries(rules$20).map(([key]) => [key, "off"]));
|
|
311
330
|
// src/configs/disable-type-checked.ts
|
|
312
331
|
var disable_type_checked_exports = /* @__PURE__ */ __exportAll({
|
|
313
332
|
name: () => name$8,
|
|
@@ -327,7 +346,7 @@ var disable_web_api_exports = /* @__PURE__ */ __exportAll({
|
|
|
327
346
|
rules: () => rules$6
|
|
328
347
|
});
|
|
329
348
|
const name$7 = "@eslint-react/disable-web-api";
|
|
330
|
-
const rules$6 = Object.fromEntries(Object.entries(rules$
|
|
349
|
+
const rules$6 = Object.fromEntries(Object.entries(rules$18).map(([key]) => [key, "off"]));
|
|
331
350
|
// src/configs/off.ts
|
|
332
351
|
var off_exports = /* @__PURE__ */ __exportAll({
|
|
333
352
|
name: () => name$6,
|
|
@@ -335,7 +354,7 @@ var off_exports = /* @__PURE__ */ __exportAll({
|
|
|
335
354
|
});
|
|
336
355
|
const name$6 = "@eslint-react/off";
|
|
337
356
|
const rules$5 = {
|
|
338
|
-
...Object.fromEntries(Object.entries(rules$
|
|
357
|
+
...Object.fromEntries(Object.entries(rules$16).map(([key]) => [key, "off"])),
|
|
339
358
|
...rules$7
|
|
340
359
|
};
|
|
341
360
|
// src/configs/recommended-typescript.ts
|
|
@@ -346,9 +365,9 @@ var recommended_typescript_exports = /* @__PURE__ */ __exportAll({
|
|
|
346
365
|
settings: () => settings$4
|
|
347
366
|
});
|
|
348
367
|
const name$5 = "@eslint-react/recommended-typescript";
|
|
349
|
-
const rules$4 = { ...rules$
|
|
350
|
-
const settings$4 = { ...settings$
|
|
351
|
-
const languageOptions$4 = languageOptions$
|
|
368
|
+
const rules$4 = { ...rules$17 };
|
|
369
|
+
const settings$4 = { ...settings$7 };
|
|
370
|
+
const languageOptions$4 = languageOptions$7;
|
|
352
371
|
// src/configs/recommended-type-checked.ts
|
|
353
372
|
var recommended_type_checked_exports = /* @__PURE__ */ __exportAll({
|
|
354
373
|
languageOptions: () => languageOptions$3,
|
|
@@ -372,7 +391,7 @@ var strict_exports = /* @__PURE__ */ __exportAll({
|
|
|
372
391
|
});
|
|
373
392
|
const name$3 = "@eslint-react/strict";
|
|
374
393
|
const rules$2 = {
|
|
375
|
-
...rules$
|
|
394
|
+
...rules$17,
|
|
376
395
|
"@eslint-react/no-class-component": "error",
|
|
377
396
|
"@eslint-react/no-misused-capture-owner-stack": "error",
|
|
378
397
|
"@eslint-react/no-unstable-context-value": "warn",
|
|
@@ -383,8 +402,8 @@ const rules$2 = {
|
|
|
383
402
|
"@eslint-react/dom-no-missing-iframe-sandbox": "warn",
|
|
384
403
|
"@eslint-react/dom-no-unsafe-target-blank": "warn"
|
|
385
404
|
};
|
|
386
|
-
const settings$2 = { ...settings$
|
|
387
|
-
const languageOptions$2 = languageOptions$
|
|
405
|
+
const settings$2 = { ...settings$7 };
|
|
406
|
+
const languageOptions$2 = languageOptions$7;
|
|
388
407
|
// src/configs/strict-typescript.ts
|
|
389
408
|
var strict_typescript_exports = /* @__PURE__ */ __exportAll({
|
|
390
409
|
languageOptions: () => languageOptions$1,
|
|
@@ -413,7 +432,7 @@ const settings = { ...settings$1 };
|
|
|
413
432
|
const languageOptions = languageOptions$1;
|
|
414
433
|
// package.json
|
|
415
434
|
var name = "@eslint-react/eslint-plugin";
|
|
416
|
-
var version = "5.30.0-beta.
|
|
435
|
+
var version = "5.30.0-beta.13";
|
|
417
436
|
// src/utils/type-of.ts
|
|
418
437
|
function typeOf(t) {
|
|
419
438
|
return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/, "$1").toLowerCase();
|
|
@@ -461,6 +480,7 @@ const finalPlugin = {
|
|
|
461
480
|
...plugin,
|
|
462
481
|
configs: {
|
|
463
482
|
["all"]: createConfig(all_exports),
|
|
483
|
+
["all-type-checked"]: createConfig(all_type_checked_exports),
|
|
464
484
|
["disable-conflict-eslint-plugin-react"]: createConfig(disable_conflict_eslint_plugin_react_exports),
|
|
465
485
|
["disable-conflict-eslint-plugin-react-hooks"]: createConfig(disable_conflict_eslint_plugin_react_hooks_exports),
|
|
466
486
|
["disable-dom"]: createConfig(disable_dom_exports),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/eslint-plugin",
|
|
3
|
-
"version": "5.30.0-beta.
|
|
3
|
+
"version": "5.30.0-beta.13",
|
|
4
4
|
"description": "ESLint React's unified ESLint plugin that combines all individual plugins into one.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"dist"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@eslint-react/shared": "5.30.0-beta.
|
|
46
|
-
"eslint-plugin-react-dom": "5.30.0-beta.
|
|
47
|
-
"eslint-plugin-react-jsx": "5.30.0-beta.
|
|
48
|
-
"eslint-plugin-react-naming-convention": "5.30.0-beta.
|
|
49
|
-
"eslint-plugin-react-rsc": "5.30.0-beta.
|
|
50
|
-
"eslint-plugin-react-web-api": "5.30.0-beta.
|
|
51
|
-
"eslint-plugin-react-x": "5.30.0-beta.
|
|
45
|
+
"@eslint-react/shared": "5.30.0-beta.13",
|
|
46
|
+
"eslint-plugin-react-dom": "5.30.0-beta.13",
|
|
47
|
+
"eslint-plugin-react-jsx": "5.30.0-beta.13",
|
|
48
|
+
"eslint-plugin-react-naming-convention": "5.30.0-beta.13",
|
|
49
|
+
"eslint-plugin-react-rsc": "5.30.0-beta.13",
|
|
50
|
+
"eslint-plugin-react-web-api": "5.30.0-beta.13",
|
|
51
|
+
"eslint-plugin-react-x": "5.30.0-beta.13"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@local/configs": "0.0.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@types/react-dom": "^19.3.0",
|
|
59
59
|
"dedent": "^1.7.2",
|
|
60
60
|
"eslint": "^10.13.0",
|
|
61
|
-
"tsdown": "^0.23.
|
|
61
|
+
"tsdown": "^0.23.3",
|
|
62
62
|
"typescript": "6.0.3"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|