@eslint-react/eslint-plugin 1.24.0-next.8 → 1.24.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 +7 -7
- package/dist/index.d.mts +108 -18
- package/dist/index.d.ts +108 -18
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -12,13 +12,13 @@ A set of composable ESLint rules for libraries and frameworks that use React as
|
|
|
12
12
|
- **Comprehensive**: First-class support for TypeScript, React 19, polymorphic components.
|
|
13
13
|
- **Advanced Analysis**: Handles complex scenarios and identifies problems that other tools might miss.
|
|
14
14
|
|
|
15
|
-
## Public
|
|
15
|
+
## Public Packages
|
|
16
16
|
|
|
17
|
-
### All-
|
|
17
|
+
### All-In-One Plugin
|
|
18
18
|
|
|
19
19
|
- [`@eslint-react/eslint-plugin`](https://www.npmjs.com/package/@eslint-react/eslint-plugin) - The main ESLint plugin package including all rules and config presets in this repository.
|
|
20
20
|
|
|
21
|
-
### Modular
|
|
21
|
+
### Modular Plugins
|
|
22
22
|
|
|
23
23
|
- [`eslint-plugin-react-x`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) - Core rules (renderer-agnostic, compatible with x-platform).
|
|
24
24
|
- [`eslint-plugin-react-dom`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) - DOM specific rules for React DOM.
|
|
@@ -93,7 +93,7 @@ export default tseslint.config({
|
|
|
93
93
|
- **Recommended Type-Checked** (`recommended-type-checked`)\
|
|
94
94
|
Same as the `recommended-typescript` preset but enables additional rules that require type information.
|
|
95
95
|
|
|
96
|
-
[Full Presets List↗](https://eslint-react.xyz/docs/presets)
|
|
96
|
+
[Full Presets List ↗](https://eslint-react.xyz/docs/presets)
|
|
97
97
|
|
|
98
98
|
## Rules
|
|
99
99
|
|
|
@@ -107,11 +107,11 @@ export default tseslint.config({
|
|
|
107
107
|
|
|
108
108
|
- [Milestone 2.0 ↗](https://eslint-react.xyz/roadmap#milestone-20)
|
|
109
109
|
|
|
110
|
-
##
|
|
110
|
+
## Notable Projects Using ESLint React
|
|
111
111
|
|
|
112
|
-

|
|
112
|
+
[](https://github.com/Rel1cx/eslint-react/blob/main/assets/NOTABLE_PROJECTS_USING_ESLINT_REACT)
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
## Community ESLint Configs Adopting ESLint React
|
|
115
115
|
|
|
116
116
|
- [`antfu/eslint-config`](https://github.com/antfu/eslint-config) - Anthony's ESLint config preset.
|
|
117
117
|
- [`eslint-config-rebeccastevens`](https://github.com/RebeccaStevens/eslint-config-rebeccastevens) - Rebecca's ESLint config preset.
|
package/dist/index.d.mts
CHANGED
|
@@ -231,12 +231,27 @@ declare const plugins$6: {
|
|
|
231
231
|
};
|
|
232
232
|
declare const settings$5: {
|
|
233
233
|
"react-x": {
|
|
234
|
-
readonly
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
readonly importSource: "react";
|
|
235
|
+
readonly jsxPragma: "createElement";
|
|
236
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
237
237
|
readonly polymorphicPropName: "as";
|
|
238
|
+
readonly strict: false;
|
|
238
239
|
readonly strictImportCheck: false;
|
|
239
240
|
readonly version: "detect";
|
|
241
|
+
readonly additionalHooks: {
|
|
242
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
243
|
+
};
|
|
244
|
+
readonly additionalComponents?: {
|
|
245
|
+
name: string;
|
|
246
|
+
as?: string;
|
|
247
|
+
attributes?: {
|
|
248
|
+
name: string;
|
|
249
|
+
as?: string;
|
|
250
|
+
controlled?: boolean;
|
|
251
|
+
defaultValue?: string;
|
|
252
|
+
}[];
|
|
253
|
+
selector?: string;
|
|
254
|
+
}[];
|
|
240
255
|
};
|
|
241
256
|
};
|
|
242
257
|
|
|
@@ -351,12 +366,27 @@ declare const plugins$5: {
|
|
|
351
366
|
};
|
|
352
367
|
declare const settings$4: {
|
|
353
368
|
"react-x": {
|
|
354
|
-
readonly
|
|
355
|
-
|
|
356
|
-
|
|
369
|
+
readonly importSource: "react";
|
|
370
|
+
readonly jsxPragma: "createElement";
|
|
371
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
357
372
|
readonly polymorphicPropName: "as";
|
|
373
|
+
readonly strict: false;
|
|
358
374
|
readonly strictImportCheck: false;
|
|
359
375
|
readonly version: "detect";
|
|
376
|
+
readonly additionalHooks: {
|
|
377
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
378
|
+
};
|
|
379
|
+
readonly additionalComponents?: {
|
|
380
|
+
name: string;
|
|
381
|
+
as?: string;
|
|
382
|
+
attributes?: {
|
|
383
|
+
name: string;
|
|
384
|
+
as?: string;
|
|
385
|
+
controlled?: boolean;
|
|
386
|
+
defaultValue?: string;
|
|
387
|
+
}[];
|
|
388
|
+
selector?: string;
|
|
389
|
+
}[];
|
|
360
390
|
};
|
|
361
391
|
};
|
|
362
392
|
|
|
@@ -483,12 +513,27 @@ declare const plugins$3: {
|
|
|
483
513
|
};
|
|
484
514
|
declare const settings$3: {
|
|
485
515
|
"react-x": {
|
|
486
|
-
readonly
|
|
487
|
-
|
|
488
|
-
|
|
516
|
+
readonly importSource: "react";
|
|
517
|
+
readonly jsxPragma: "createElement";
|
|
518
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
489
519
|
readonly polymorphicPropName: "as";
|
|
520
|
+
readonly strict: false;
|
|
490
521
|
readonly strictImportCheck: false;
|
|
491
522
|
readonly version: "detect";
|
|
523
|
+
readonly additionalHooks: {
|
|
524
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
525
|
+
};
|
|
526
|
+
readonly additionalComponents?: {
|
|
527
|
+
name: string;
|
|
528
|
+
as?: string;
|
|
529
|
+
attributes?: {
|
|
530
|
+
name: string;
|
|
531
|
+
as?: string;
|
|
532
|
+
controlled?: boolean;
|
|
533
|
+
defaultValue?: string;
|
|
534
|
+
}[];
|
|
535
|
+
selector?: string;
|
|
536
|
+
}[];
|
|
492
537
|
};
|
|
493
538
|
};
|
|
494
539
|
|
|
@@ -792,12 +837,27 @@ declare const plugins$2: {
|
|
|
792
837
|
};
|
|
793
838
|
declare const settings$2: {
|
|
794
839
|
"react-x": {
|
|
795
|
-
readonly
|
|
796
|
-
|
|
797
|
-
|
|
840
|
+
readonly importSource: "react";
|
|
841
|
+
readonly jsxPragma: "createElement";
|
|
842
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
798
843
|
readonly polymorphicPropName: "as";
|
|
844
|
+
readonly strict: false;
|
|
799
845
|
readonly strictImportCheck: false;
|
|
800
846
|
readonly version: "detect";
|
|
847
|
+
readonly additionalHooks: {
|
|
848
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
849
|
+
};
|
|
850
|
+
readonly additionalComponents?: {
|
|
851
|
+
name: string;
|
|
852
|
+
as?: string;
|
|
853
|
+
attributes?: {
|
|
854
|
+
name: string;
|
|
855
|
+
as?: string;
|
|
856
|
+
controlled?: boolean;
|
|
857
|
+
defaultValue?: string;
|
|
858
|
+
}[];
|
|
859
|
+
selector?: string;
|
|
860
|
+
}[];
|
|
801
861
|
};
|
|
802
862
|
};
|
|
803
863
|
|
|
@@ -1022,12 +1082,27 @@ declare const plugins$1: {
|
|
|
1022
1082
|
};
|
|
1023
1083
|
declare const settings$1: {
|
|
1024
1084
|
"react-x": {
|
|
1025
|
-
readonly
|
|
1026
|
-
|
|
1027
|
-
|
|
1085
|
+
readonly importSource: "react";
|
|
1086
|
+
readonly jsxPragma: "createElement";
|
|
1087
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
1028
1088
|
readonly polymorphicPropName: "as";
|
|
1089
|
+
readonly strict: false;
|
|
1029
1090
|
readonly strictImportCheck: false;
|
|
1030
1091
|
readonly version: "detect";
|
|
1092
|
+
readonly additionalHooks: {
|
|
1093
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
1094
|
+
};
|
|
1095
|
+
readonly additionalComponents?: {
|
|
1096
|
+
name: string;
|
|
1097
|
+
as?: string;
|
|
1098
|
+
attributes?: {
|
|
1099
|
+
name: string;
|
|
1100
|
+
as?: string;
|
|
1101
|
+
controlled?: boolean;
|
|
1102
|
+
defaultValue?: string;
|
|
1103
|
+
}[];
|
|
1104
|
+
selector?: string;
|
|
1105
|
+
}[];
|
|
1031
1106
|
};
|
|
1032
1107
|
};
|
|
1033
1108
|
|
|
@@ -1251,12 +1326,27 @@ declare const plugins: {
|
|
|
1251
1326
|
};
|
|
1252
1327
|
declare const settings: {
|
|
1253
1328
|
"react-x": {
|
|
1254
|
-
readonly
|
|
1255
|
-
|
|
1256
|
-
|
|
1329
|
+
readonly importSource: "react";
|
|
1330
|
+
readonly jsxPragma: "createElement";
|
|
1331
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
1257
1332
|
readonly polymorphicPropName: "as";
|
|
1333
|
+
readonly strict: false;
|
|
1258
1334
|
readonly strictImportCheck: false;
|
|
1259
1335
|
readonly version: "detect";
|
|
1336
|
+
readonly additionalHooks: {
|
|
1337
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
1338
|
+
};
|
|
1339
|
+
readonly additionalComponents?: {
|
|
1340
|
+
name: string;
|
|
1341
|
+
as?: string;
|
|
1342
|
+
attributes?: {
|
|
1343
|
+
name: string;
|
|
1344
|
+
as?: string;
|
|
1345
|
+
controlled?: boolean;
|
|
1346
|
+
defaultValue?: string;
|
|
1347
|
+
}[];
|
|
1348
|
+
selector?: string;
|
|
1349
|
+
}[];
|
|
1260
1350
|
};
|
|
1261
1351
|
};
|
|
1262
1352
|
|
package/dist/index.d.ts
CHANGED
|
@@ -231,12 +231,27 @@ declare const plugins$6: {
|
|
|
231
231
|
};
|
|
232
232
|
declare const settings$5: {
|
|
233
233
|
"react-x": {
|
|
234
|
-
readonly
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
readonly importSource: "react";
|
|
235
|
+
readonly jsxPragma: "createElement";
|
|
236
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
237
237
|
readonly polymorphicPropName: "as";
|
|
238
|
+
readonly strict: false;
|
|
238
239
|
readonly strictImportCheck: false;
|
|
239
240
|
readonly version: "detect";
|
|
241
|
+
readonly additionalHooks: {
|
|
242
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
243
|
+
};
|
|
244
|
+
readonly additionalComponents?: {
|
|
245
|
+
name: string;
|
|
246
|
+
as?: string;
|
|
247
|
+
attributes?: {
|
|
248
|
+
name: string;
|
|
249
|
+
as?: string;
|
|
250
|
+
controlled?: boolean;
|
|
251
|
+
defaultValue?: string;
|
|
252
|
+
}[];
|
|
253
|
+
selector?: string;
|
|
254
|
+
}[];
|
|
240
255
|
};
|
|
241
256
|
};
|
|
242
257
|
|
|
@@ -351,12 +366,27 @@ declare const plugins$5: {
|
|
|
351
366
|
};
|
|
352
367
|
declare const settings$4: {
|
|
353
368
|
"react-x": {
|
|
354
|
-
readonly
|
|
355
|
-
|
|
356
|
-
|
|
369
|
+
readonly importSource: "react";
|
|
370
|
+
readonly jsxPragma: "createElement";
|
|
371
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
357
372
|
readonly polymorphicPropName: "as";
|
|
373
|
+
readonly strict: false;
|
|
358
374
|
readonly strictImportCheck: false;
|
|
359
375
|
readonly version: "detect";
|
|
376
|
+
readonly additionalHooks: {
|
|
377
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
378
|
+
};
|
|
379
|
+
readonly additionalComponents?: {
|
|
380
|
+
name: string;
|
|
381
|
+
as?: string;
|
|
382
|
+
attributes?: {
|
|
383
|
+
name: string;
|
|
384
|
+
as?: string;
|
|
385
|
+
controlled?: boolean;
|
|
386
|
+
defaultValue?: string;
|
|
387
|
+
}[];
|
|
388
|
+
selector?: string;
|
|
389
|
+
}[];
|
|
360
390
|
};
|
|
361
391
|
};
|
|
362
392
|
|
|
@@ -483,12 +513,27 @@ declare const plugins$3: {
|
|
|
483
513
|
};
|
|
484
514
|
declare const settings$3: {
|
|
485
515
|
"react-x": {
|
|
486
|
-
readonly
|
|
487
|
-
|
|
488
|
-
|
|
516
|
+
readonly importSource: "react";
|
|
517
|
+
readonly jsxPragma: "createElement";
|
|
518
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
489
519
|
readonly polymorphicPropName: "as";
|
|
520
|
+
readonly strict: false;
|
|
490
521
|
readonly strictImportCheck: false;
|
|
491
522
|
readonly version: "detect";
|
|
523
|
+
readonly additionalHooks: {
|
|
524
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
525
|
+
};
|
|
526
|
+
readonly additionalComponents?: {
|
|
527
|
+
name: string;
|
|
528
|
+
as?: string;
|
|
529
|
+
attributes?: {
|
|
530
|
+
name: string;
|
|
531
|
+
as?: string;
|
|
532
|
+
controlled?: boolean;
|
|
533
|
+
defaultValue?: string;
|
|
534
|
+
}[];
|
|
535
|
+
selector?: string;
|
|
536
|
+
}[];
|
|
492
537
|
};
|
|
493
538
|
};
|
|
494
539
|
|
|
@@ -792,12 +837,27 @@ declare const plugins$2: {
|
|
|
792
837
|
};
|
|
793
838
|
declare const settings$2: {
|
|
794
839
|
"react-x": {
|
|
795
|
-
readonly
|
|
796
|
-
|
|
797
|
-
|
|
840
|
+
readonly importSource: "react";
|
|
841
|
+
readonly jsxPragma: "createElement";
|
|
842
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
798
843
|
readonly polymorphicPropName: "as";
|
|
844
|
+
readonly strict: false;
|
|
799
845
|
readonly strictImportCheck: false;
|
|
800
846
|
readonly version: "detect";
|
|
847
|
+
readonly additionalHooks: {
|
|
848
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
849
|
+
};
|
|
850
|
+
readonly additionalComponents?: {
|
|
851
|
+
name: string;
|
|
852
|
+
as?: string;
|
|
853
|
+
attributes?: {
|
|
854
|
+
name: string;
|
|
855
|
+
as?: string;
|
|
856
|
+
controlled?: boolean;
|
|
857
|
+
defaultValue?: string;
|
|
858
|
+
}[];
|
|
859
|
+
selector?: string;
|
|
860
|
+
}[];
|
|
801
861
|
};
|
|
802
862
|
};
|
|
803
863
|
|
|
@@ -1022,12 +1082,27 @@ declare const plugins$1: {
|
|
|
1022
1082
|
};
|
|
1023
1083
|
declare const settings$1: {
|
|
1024
1084
|
"react-x": {
|
|
1025
|
-
readonly
|
|
1026
|
-
|
|
1027
|
-
|
|
1085
|
+
readonly importSource: "react";
|
|
1086
|
+
readonly jsxPragma: "createElement";
|
|
1087
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
1028
1088
|
readonly polymorphicPropName: "as";
|
|
1089
|
+
readonly strict: false;
|
|
1029
1090
|
readonly strictImportCheck: false;
|
|
1030
1091
|
readonly version: "detect";
|
|
1092
|
+
readonly additionalHooks: {
|
|
1093
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
1094
|
+
};
|
|
1095
|
+
readonly additionalComponents?: {
|
|
1096
|
+
name: string;
|
|
1097
|
+
as?: string;
|
|
1098
|
+
attributes?: {
|
|
1099
|
+
name: string;
|
|
1100
|
+
as?: string;
|
|
1101
|
+
controlled?: boolean;
|
|
1102
|
+
defaultValue?: string;
|
|
1103
|
+
}[];
|
|
1104
|
+
selector?: string;
|
|
1105
|
+
}[];
|
|
1031
1106
|
};
|
|
1032
1107
|
};
|
|
1033
1108
|
|
|
@@ -1251,12 +1326,27 @@ declare const plugins: {
|
|
|
1251
1326
|
};
|
|
1252
1327
|
declare const settings: {
|
|
1253
1328
|
"react-x": {
|
|
1254
|
-
readonly
|
|
1255
|
-
|
|
1256
|
-
|
|
1329
|
+
readonly importSource: "react";
|
|
1330
|
+
readonly jsxPragma: "createElement";
|
|
1331
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
1257
1332
|
readonly polymorphicPropName: "as";
|
|
1333
|
+
readonly strict: false;
|
|
1258
1334
|
readonly strictImportCheck: false;
|
|
1259
1335
|
readonly version: "detect";
|
|
1336
|
+
readonly additionalHooks: {
|
|
1337
|
+
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
1338
|
+
};
|
|
1339
|
+
readonly additionalComponents?: {
|
|
1340
|
+
name: string;
|
|
1341
|
+
as?: string;
|
|
1342
|
+
attributes?: {
|
|
1343
|
+
name: string;
|
|
1344
|
+
as?: string;
|
|
1345
|
+
controlled?: boolean;
|
|
1346
|
+
defaultValue?: string;
|
|
1347
|
+
}[];
|
|
1348
|
+
selector?: string;
|
|
1349
|
+
}[];
|
|
1260
1350
|
};
|
|
1261
1351
|
};
|
|
1262
1352
|
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/eslint-plugin",
|
|
3
|
-
"version": "1.24.0
|
|
3
|
+
"version": "1.24.0",
|
|
4
4
|
"description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"@typescript-eslint/type-utils": "^8.20.0",
|
|
49
49
|
"@typescript-eslint/types": "^8.20.0",
|
|
50
50
|
"@typescript-eslint/utils": "^8.20.0",
|
|
51
|
-
"@eslint-react/eff": "1.24.0
|
|
52
|
-
"@eslint-react/shared": "1.24.0
|
|
53
|
-
"eslint-plugin-react-
|
|
54
|
-
"eslint-plugin-react-
|
|
55
|
-
"eslint-plugin-react-
|
|
56
|
-
"eslint-plugin-react-
|
|
57
|
-
"eslint-plugin-react-
|
|
58
|
-
"eslint-plugin-react-
|
|
51
|
+
"@eslint-react/eff": "1.24.0",
|
|
52
|
+
"@eslint-react/shared": "1.24.0",
|
|
53
|
+
"eslint-plugin-react-debug": "1.24.0",
|
|
54
|
+
"eslint-plugin-react-dom": "1.24.0",
|
|
55
|
+
"eslint-plugin-react-naming-convention": "1.24.0",
|
|
56
|
+
"eslint-plugin-react-web-api": "1.24.0",
|
|
57
|
+
"eslint-plugin-react-hooks-extra": "1.24.0",
|
|
58
|
+
"eslint-plugin-react-x": "1.24.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"tsup": "^8.3.5",
|