@eslint-react/eslint-plugin 5.28.7 → 5.30.0-beta.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 +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +31 -61
- 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
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ESLint, Linter } from "eslint";
|
|
2
|
-
//#region src/index.d.ts
|
|
3
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";
|
|
4
3
|
declare const finalPlugin: ESLint.Plugin & {
|
|
5
4
|
/**
|
|
@@ -8,5 +7,4 @@ declare const finalPlugin: ESLint.Plugin & {
|
|
|
8
7
|
*/
|
|
9
8
|
configs: Record<ConfigName, Linter.Config>;
|
|
10
9
|
};
|
|
11
|
-
//#endregion
|
|
12
10
|
export { finalPlugin as default };
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import reactJsxPlugin from "eslint-plugin-react-jsx";
|
|
|
5
5
|
import reactNamingConventionPlugin from "eslint-plugin-react-naming-convention";
|
|
6
6
|
import reactRscPlugin from "eslint-plugin-react-rsc";
|
|
7
7
|
import reactWebApiPlugin from "eslint-plugin-react-web-api";
|
|
8
|
-
|
|
8
|
+
// \0rolldown/runtime.js
|
|
9
9
|
var __defProp = Object.defineProperty;
|
|
10
10
|
var __exportAll = (all, no_symbols) => {
|
|
11
11
|
let target = {};
|
|
@@ -16,8 +16,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
16
16
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
17
17
|
return target;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
//#region src/configs/dom.ts
|
|
19
|
+
// src/configs/dom.ts
|
|
21
20
|
var dom_exports = /* @__PURE__ */ __exportAll({
|
|
22
21
|
name: () => name$23,
|
|
23
22
|
rules: () => rules$22
|
|
@@ -36,8 +35,7 @@ const rules$22 = {
|
|
|
36
35
|
"@eslint-react/dom-no-use-form-state": "error",
|
|
37
36
|
"@eslint-react/dom-no-void-elements-with-children": "error"
|
|
38
37
|
};
|
|
39
|
-
|
|
40
|
-
//#region src/configs/jsx.ts
|
|
38
|
+
// src/configs/jsx.ts
|
|
41
39
|
var jsx_exports = /* @__PURE__ */ __exportAll({
|
|
42
40
|
name: () => name$22,
|
|
43
41
|
rules: () => rules$21
|
|
@@ -52,8 +50,7 @@ const rules$21 = {
|
|
|
52
50
|
"@eslint-react/jsx-no-leaked-semicolon": "warn",
|
|
53
51
|
"@eslint-react/jsx-no-namespace": "error"
|
|
54
52
|
};
|
|
55
|
-
|
|
56
|
-
//#region src/configs/naming-convention.ts
|
|
53
|
+
// src/configs/naming-convention.ts
|
|
57
54
|
var naming_convention_exports = /* @__PURE__ */ __exportAll({
|
|
58
55
|
name: () => name$21,
|
|
59
56
|
rules: () => rules$20
|
|
@@ -64,16 +61,14 @@ const rules$20 = {
|
|
|
64
61
|
"@eslint-react/naming-convention-id-name": "warn",
|
|
65
62
|
"@eslint-react/naming-convention-ref-name": "warn"
|
|
66
63
|
};
|
|
67
|
-
|
|
68
|
-
//#region src/configs/rsc.ts
|
|
64
|
+
// src/configs/rsc.ts
|
|
69
65
|
var rsc_exports = /* @__PURE__ */ __exportAll({
|
|
70
66
|
name: () => name$20,
|
|
71
67
|
rules: () => rules$19
|
|
72
68
|
});
|
|
73
69
|
const name$20 = "@eslint-react/rsc";
|
|
74
70
|
const rules$19 = { "@eslint-react/rsc-function-definition": "error" };
|
|
75
|
-
|
|
76
|
-
//#region src/configs/x.ts
|
|
71
|
+
// src/configs/x.ts
|
|
77
72
|
var x_exports = /* @__PURE__ */ __exportAll({
|
|
78
73
|
name: () => name$19,
|
|
79
74
|
rules: () => rules$18,
|
|
@@ -120,8 +115,7 @@ const rules$18 = {
|
|
|
120
115
|
"@eslint-react/use-state": "warn"
|
|
121
116
|
};
|
|
122
117
|
const settings$8 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
|
|
123
|
-
|
|
124
|
-
//#region src/configs/web-api.ts
|
|
118
|
+
// src/configs/web-api.ts
|
|
125
119
|
var web_api_exports = /* @__PURE__ */ __exportAll({
|
|
126
120
|
name: () => name$18,
|
|
127
121
|
rules: () => rules$17,
|
|
@@ -137,8 +131,7 @@ const rules$17 = {
|
|
|
137
131
|
"@eslint-react/web-api-no-leaked-timeout": "warn"
|
|
138
132
|
};
|
|
139
133
|
const settings$7 = { ...settings$8 };
|
|
140
|
-
|
|
141
|
-
//#region src/configs/recommended.ts
|
|
134
|
+
// src/configs/recommended.ts
|
|
142
135
|
var recommended_exports = /* @__PURE__ */ __exportAll({
|
|
143
136
|
languageOptions: () => languageOptions$6,
|
|
144
137
|
name: () => name$17,
|
|
@@ -156,8 +149,7 @@ const rules$16 = {
|
|
|
156
149
|
};
|
|
157
150
|
const settings$6 = { ...settings$8 };
|
|
158
151
|
const languageOptions$6 = { parserOptions: { ecmaFeatures: { jsx: true } } };
|
|
159
|
-
|
|
160
|
-
//#region src/configs/all.ts
|
|
152
|
+
// src/configs/all.ts
|
|
161
153
|
var all_exports = /* @__PURE__ */ __exportAll({
|
|
162
154
|
languageOptions: () => languageOptions$5,
|
|
163
155
|
name: () => name$16,
|
|
@@ -251,32 +243,28 @@ const rules$15 = {
|
|
|
251
243
|
};
|
|
252
244
|
const settings$5 = { ...settings$8 };
|
|
253
245
|
const languageOptions$5 = languageOptions$6;
|
|
254
|
-
|
|
255
|
-
//#region src/configs/disable-conflict-eslint-plugin-react.ts
|
|
246
|
+
// src/configs/disable-conflict-eslint-plugin-react.ts
|
|
256
247
|
var disable_conflict_eslint_plugin_react_exports = /* @__PURE__ */ __exportAll({
|
|
257
248
|
name: () => name$15,
|
|
258
249
|
rules: () => rules$14
|
|
259
250
|
});
|
|
260
251
|
const name$15 = "@eslint-react/disable-conflict-eslint-plugin-react";
|
|
261
252
|
const rules$14 = reactX.configs["disable-conflict-eslint-plugin-react"].rules ?? {};
|
|
262
|
-
|
|
263
|
-
//#region src/configs/disable-conflict-eslint-plugin-react-hooks.ts
|
|
253
|
+
// src/configs/disable-conflict-eslint-plugin-react-hooks.ts
|
|
264
254
|
var disable_conflict_eslint_plugin_react_hooks_exports = /* @__PURE__ */ __exportAll({
|
|
265
255
|
name: () => name$14,
|
|
266
256
|
rules: () => rules$13
|
|
267
257
|
});
|
|
268
258
|
const name$14 = "@eslint-react/disable-conflict-eslint-plugin-react-hooks";
|
|
269
259
|
const rules$13 = reactX.configs["disable-conflict-eslint-plugin-react-hooks"].rules ?? {};
|
|
270
|
-
|
|
271
|
-
//#region src/configs/disable-dom.ts
|
|
260
|
+
// src/configs/disable-dom.ts
|
|
272
261
|
var disable_dom_exports = /* @__PURE__ */ __exportAll({
|
|
273
262
|
name: () => name$13,
|
|
274
263
|
rules: () => rules$12
|
|
275
264
|
});
|
|
276
265
|
const name$13 = "@eslint-react/disable-dom";
|
|
277
266
|
const rules$12 = Object.fromEntries(Object.entries(rules$22).map(([key]) => [key, "off"]));
|
|
278
|
-
|
|
279
|
-
//#region src/configs/disable-experimental.ts
|
|
267
|
+
// src/configs/disable-experimental.ts
|
|
280
268
|
var disable_experimental_exports = /* @__PURE__ */ __exportAll({
|
|
281
269
|
name: () => name$12,
|
|
282
270
|
rules: () => rules$11
|
|
@@ -298,32 +286,28 @@ const rules$11 = {
|
|
|
298
286
|
"@eslint-react/rsc-function-definition": "off",
|
|
299
287
|
"@eslint-react/web-api-no-leaked-fetch": "off"
|
|
300
288
|
};
|
|
301
|
-
|
|
302
|
-
//#region src/configs/disable-jsx.ts
|
|
289
|
+
// src/configs/disable-jsx.ts
|
|
303
290
|
var disable_jsx_exports = /* @__PURE__ */ __exportAll({
|
|
304
291
|
name: () => name$11,
|
|
305
292
|
rules: () => rules$10
|
|
306
293
|
});
|
|
307
294
|
const name$11 = "@eslint-react/disable-jsx";
|
|
308
295
|
const rules$10 = Object.fromEntries(Object.entries(rules$21).map(([key]) => [key, "off"]));
|
|
309
|
-
|
|
310
|
-
//#region src/configs/disable-naming-convention.ts
|
|
296
|
+
// src/configs/disable-naming-convention.ts
|
|
311
297
|
var disable_naming_convention_exports = /* @__PURE__ */ __exportAll({
|
|
312
298
|
name: () => name$10,
|
|
313
299
|
rules: () => rules$9
|
|
314
300
|
});
|
|
315
301
|
const name$10 = "@eslint-react/disable-naming-convention";
|
|
316
302
|
const rules$9 = Object.fromEntries(Object.entries(rules$20).map(([key]) => [key, "off"]));
|
|
317
|
-
|
|
318
|
-
//#region src/configs/disable-rsc.ts
|
|
303
|
+
// src/configs/disable-rsc.ts
|
|
319
304
|
var disable_rsc_exports = /* @__PURE__ */ __exportAll({
|
|
320
305
|
name: () => name$9,
|
|
321
306
|
rules: () => rules$8
|
|
322
307
|
});
|
|
323
308
|
const name$9 = "@eslint-react/disable-rsc";
|
|
324
309
|
const rules$8 = Object.fromEntries(Object.entries(rules$19).map(([key]) => [key, "off"]));
|
|
325
|
-
|
|
326
|
-
//#region src/configs/disable-type-checked.ts
|
|
310
|
+
// src/configs/disable-type-checked.ts
|
|
327
311
|
var disable_type_checked_exports = /* @__PURE__ */ __exportAll({
|
|
328
312
|
name: () => name$8,
|
|
329
313
|
rules: () => rules$7
|
|
@@ -336,16 +320,14 @@ const rules$7 = {
|
|
|
336
320
|
"@eslint-react/no-leaked-conditional-rendering": "off",
|
|
337
321
|
"@eslint-react/no-unused-props": "off"
|
|
338
322
|
};
|
|
339
|
-
|
|
340
|
-
//#region src/configs/disable-web-api.ts
|
|
323
|
+
// src/configs/disable-web-api.ts
|
|
341
324
|
var disable_web_api_exports = /* @__PURE__ */ __exportAll({
|
|
342
325
|
name: () => name$7,
|
|
343
326
|
rules: () => rules$6
|
|
344
327
|
});
|
|
345
328
|
const name$7 = "@eslint-react/disable-web-api";
|
|
346
329
|
const rules$6 = Object.fromEntries(Object.entries(rules$17).map(([key]) => [key, "off"]));
|
|
347
|
-
|
|
348
|
-
//#region src/configs/off.ts
|
|
330
|
+
// src/configs/off.ts
|
|
349
331
|
var off_exports = /* @__PURE__ */ __exportAll({
|
|
350
332
|
name: () => name$6,
|
|
351
333
|
rules: () => rules$5
|
|
@@ -355,8 +337,7 @@ const rules$5 = {
|
|
|
355
337
|
...Object.fromEntries(Object.entries(rules$15).map(([key]) => [key, "off"])),
|
|
356
338
|
...rules$7
|
|
357
339
|
};
|
|
358
|
-
|
|
359
|
-
//#region src/configs/recommended-typescript.ts
|
|
340
|
+
// src/configs/recommended-typescript.ts
|
|
360
341
|
var recommended_typescript_exports = /* @__PURE__ */ __exportAll({
|
|
361
342
|
languageOptions: () => languageOptions$4,
|
|
362
343
|
name: () => name$5,
|
|
@@ -367,8 +348,7 @@ const name$5 = "@eslint-react/recommended-typescript";
|
|
|
367
348
|
const rules$4 = { ...rules$16 };
|
|
368
349
|
const settings$4 = { ...settings$6 };
|
|
369
350
|
const languageOptions$4 = languageOptions$6;
|
|
370
|
-
|
|
371
|
-
//#region src/configs/recommended-type-checked.ts
|
|
351
|
+
// src/configs/recommended-type-checked.ts
|
|
372
352
|
var recommended_type_checked_exports = /* @__PURE__ */ __exportAll({
|
|
373
353
|
languageOptions: () => languageOptions$3,
|
|
374
354
|
name: () => name$4,
|
|
@@ -382,8 +362,7 @@ const rules$3 = {
|
|
|
382
362
|
};
|
|
383
363
|
const settings$3 = { ...settings$4 };
|
|
384
364
|
const languageOptions$3 = languageOptions$4;
|
|
385
|
-
|
|
386
|
-
//#region src/configs/strict.ts
|
|
365
|
+
// src/configs/strict.ts
|
|
387
366
|
var strict_exports = /* @__PURE__ */ __exportAll({
|
|
388
367
|
languageOptions: () => languageOptions$2,
|
|
389
368
|
name: () => name$3,
|
|
@@ -405,8 +384,7 @@ const rules$2 = {
|
|
|
405
384
|
};
|
|
406
385
|
const settings$2 = { ...settings$6 };
|
|
407
386
|
const languageOptions$2 = languageOptions$6;
|
|
408
|
-
|
|
409
|
-
//#region src/configs/strict-typescript.ts
|
|
387
|
+
// src/configs/strict-typescript.ts
|
|
410
388
|
var strict_typescript_exports = /* @__PURE__ */ __exportAll({
|
|
411
389
|
languageOptions: () => languageOptions$1,
|
|
412
390
|
name: () => name$2,
|
|
@@ -417,8 +395,7 @@ const name$2 = "@eslint-react/strict-typescript";
|
|
|
417
395
|
const rules$1 = { ...rules$2 };
|
|
418
396
|
const settings$1 = { ...settings$2 };
|
|
419
397
|
const languageOptions$1 = languageOptions$2;
|
|
420
|
-
|
|
421
|
-
//#region src/configs/strict-type-checked.ts
|
|
398
|
+
// src/configs/strict-type-checked.ts
|
|
422
399
|
var strict_type_checked_exports = /* @__PURE__ */ __exportAll({
|
|
423
400
|
languageOptions: () => languageOptions,
|
|
424
401
|
name: () => name$1,
|
|
@@ -433,30 +410,25 @@ const rules = {
|
|
|
433
410
|
};
|
|
434
411
|
const settings = { ...settings$1 };
|
|
435
412
|
const languageOptions = languageOptions$1;
|
|
436
|
-
|
|
437
|
-
//#region package.json
|
|
413
|
+
// package.json
|
|
438
414
|
var name = "@eslint-react/eslint-plugin";
|
|
439
|
-
var version = "5.
|
|
440
|
-
|
|
441
|
-
//#region src/utils/type-of.ts
|
|
415
|
+
var version = "5.30.0-beta.0";
|
|
416
|
+
// src/utils/type-of.ts
|
|
442
417
|
function typeOf(t) {
|
|
443
418
|
return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/, "$1").toLowerCase();
|
|
444
419
|
}
|
|
445
|
-
|
|
446
|
-
//#region src/utils/transform-keys.ts
|
|
420
|
+
// src/utils/transform-keys.ts
|
|
447
421
|
function transformKeys(obj, transform) {
|
|
448
422
|
if (typeOf(obj) !== "object") return obj;
|
|
449
423
|
const res = {};
|
|
450
424
|
for (const key in obj) res[transform(key)] = obj[key];
|
|
451
425
|
return res;
|
|
452
426
|
}
|
|
453
|
-
|
|
454
|
-
//#region src/utils/pad-keys-left.ts
|
|
427
|
+
// src/utils/pad-keys-left.ts
|
|
455
428
|
function padKeysLeft(obj, left) {
|
|
456
429
|
return transformKeys(obj, (key) => `${left}${key}`);
|
|
457
430
|
}
|
|
458
|
-
|
|
459
|
-
//#region src/plugin.ts
|
|
431
|
+
// src/plugin.ts
|
|
460
432
|
const plugin = {
|
|
461
433
|
meta: {
|
|
462
434
|
name,
|
|
@@ -472,8 +444,7 @@ const plugin = {
|
|
|
472
444
|
...padKeysLeft(reactNamingConventionPlugin.rules, "naming-convention-")
|
|
473
445
|
}
|
|
474
446
|
};
|
|
475
|
-
|
|
476
|
-
//#region src/index.ts
|
|
447
|
+
// src/index.ts
|
|
477
448
|
function createConfig(base) {
|
|
478
449
|
return {
|
|
479
450
|
...base,
|
|
@@ -513,5 +484,4 @@ const finalPlugin = {
|
|
|
513
484
|
["x"]: createConfig(x_exports)
|
|
514
485
|
}
|
|
515
486
|
};
|
|
516
|
-
//#endregion
|
|
517
487
|
export { finalPlugin as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/eslint-plugin",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.30.0-beta.0",
|
|
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.
|
|
46
|
-
"eslint-plugin-react-dom": "5.
|
|
47
|
-
"eslint-plugin-react-jsx": "5.
|
|
48
|
-
"eslint-plugin-react-naming-convention": "5.
|
|
49
|
-
"eslint-plugin-react-rsc": "5.
|
|
50
|
-
"eslint-plugin-react-web-api": "5.
|
|
51
|
-
"eslint-plugin-react-x": "5.
|
|
45
|
+
"@eslint-react/shared": "5.30.0-beta.0",
|
|
46
|
+
"eslint-plugin-react-dom": "5.30.0-beta.0",
|
|
47
|
+
"eslint-plugin-react-jsx": "5.30.0-beta.0",
|
|
48
|
+
"eslint-plugin-react-naming-convention": "5.30.0-beta.0",
|
|
49
|
+
"eslint-plugin-react-rsc": "5.30.0-beta.0",
|
|
50
|
+
"eslint-plugin-react-web-api": "5.30.0-beta.0",
|
|
51
|
+
"eslint-plugin-react-x": "5.30.0-beta.0"
|
|
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.2",
|
|
62
62
|
"typescript": "6.0.3"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|