eslint-plugin-react-x 5.9.5 → 5.10.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.
- package/dist/index.js +8 -8
- package/package.json +14 -14
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { JsxDetectionHint, findParentAttribute, getElementFullType, hasAttribute
|
|
|
7
7
|
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
8
8
|
import { DefinitionType, ScopeType } from "@typescript-eslint/scope-manager";
|
|
9
9
|
import { findVariable, getStaticValue } from "@typescript-eslint/utils/ast-utils";
|
|
10
|
-
import { computeObjectType, isAssignmentTargetEqual, resolve, resolveEnclosingAssignmentTarget } from "@eslint-react/var";
|
|
10
|
+
import { computeObjectType, isAssignmentTargetEqual, isInitializedFromReact, resolve, resolveEnclosingAssignmentTarget } from "@eslint-react/var";
|
|
11
11
|
import { P, match } from "ts-pattern";
|
|
12
12
|
import { compare } from "compare-versions";
|
|
13
13
|
import { getConstrainedTypeAtLocation } from "@typescript-eslint/type-utils";
|
|
@@ -89,15 +89,16 @@ var disable_conflict_eslint_plugin_react_hooks_exports = /* @__PURE__ */ __expor
|
|
|
89
89
|
rules: () => rules$8
|
|
90
90
|
});
|
|
91
91
|
const conflictingRules = [
|
|
92
|
-
"react-hooks/exhaustive-deps",
|
|
93
|
-
"react-hooks/rules-of-hooks",
|
|
94
92
|
"react-hooks/error-boundaries",
|
|
93
|
+
"react-hooks/exhaustive-deps",
|
|
95
94
|
"react-hooks/globals",
|
|
96
95
|
"react-hooks/immutability",
|
|
97
96
|
"react-hooks/purity",
|
|
98
97
|
"react-hooks/refs",
|
|
98
|
+
"react-hooks/rules-of-hooks",
|
|
99
99
|
"react-hooks/set-state-in-effect",
|
|
100
100
|
"react-hooks/set-state-in-render",
|
|
101
|
+
"react-hooks/static-components",
|
|
101
102
|
"react-hooks/unsupported-syntax",
|
|
102
103
|
"react-hooks/use-memo"
|
|
103
104
|
];
|
|
@@ -143,7 +144,7 @@ const rules$6 = {
|
|
|
143
144
|
//#endregion
|
|
144
145
|
//#region package.json
|
|
145
146
|
var name$6 = "eslint-plugin-react-x";
|
|
146
|
-
var version = "5.
|
|
147
|
+
var version = "5.10.1";
|
|
147
148
|
|
|
148
149
|
//#endregion
|
|
149
150
|
//#region src/utils/create-rule.ts
|
|
@@ -2447,8 +2448,8 @@ function canFix(context, node) {
|
|
|
2447
2448
|
const initialScope = context.sourceCode.getScope(node);
|
|
2448
2449
|
const callee = Extract.unwrap(node.callee);
|
|
2449
2450
|
switch (callee.type) {
|
|
2450
|
-
case AST_NODE_TYPES.Identifier: return
|
|
2451
|
-
case AST_NODE_TYPES.MemberExpression: return callee.object.type === AST_NODE_TYPES.Identifier &&
|
|
2451
|
+
case AST_NODE_TYPES.Identifier: return isInitializedFromReact(callee.name, initialScope, importSource);
|
|
2452
|
+
case AST_NODE_TYPES.MemberExpression: return callee.object.type === AST_NODE_TYPES.Identifier && isInitializedFromReact(callee.object.name, initialScope, importSource);
|
|
2452
2453
|
default: return false;
|
|
2453
2454
|
}
|
|
2454
2455
|
}
|
|
@@ -7338,8 +7339,7 @@ function create$3(context) {
|
|
|
7338
7339
|
//#endregion
|
|
7339
7340
|
//#region src/rules/unsupported-syntax/lib.ts
|
|
7340
7341
|
function isEvalCall(node) {
|
|
7341
|
-
|
|
7342
|
-
return callee.type === AST_NODE_TYPES.Identifier && callee.name === "eval";
|
|
7342
|
+
return Check.isIdentifier("eval")(Extract.unwrap(node.callee));
|
|
7343
7343
|
}
|
|
7344
7344
|
function isIifeCall(node) {
|
|
7345
7345
|
let parent = node.parent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.1",
|
|
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",
|
|
@@ -36,32 +36,32 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@typescript-eslint/scope-manager": "^8.62.
|
|
40
|
-
"@typescript-eslint/type-utils": "^8.62.
|
|
41
|
-
"@typescript-eslint/types": "^8.62.
|
|
42
|
-
"@typescript-eslint/typescript-estree": "^8.62.
|
|
43
|
-
"@typescript-eslint/utils": "^8.62.
|
|
39
|
+
"@typescript-eslint/scope-manager": "^8.62.1",
|
|
40
|
+
"@typescript-eslint/type-utils": "^8.62.1",
|
|
41
|
+
"@typescript-eslint/types": "^8.62.1",
|
|
42
|
+
"@typescript-eslint/typescript-estree": "^8.62.1",
|
|
43
|
+
"@typescript-eslint/utils": "^8.62.1",
|
|
44
44
|
"compare-versions": "^6.1.1",
|
|
45
45
|
"string-ts": "^2.3.1",
|
|
46
46
|
"ts-api-utils": "^2.5.0",
|
|
47
47
|
"ts-pattern": "^5.9.0",
|
|
48
|
-
"@eslint-react/ast": "5.
|
|
49
|
-
"@eslint-react/core": "5.
|
|
50
|
-
"@eslint-react/eslint": "5.
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/
|
|
53
|
-
"@eslint-react/
|
|
48
|
+
"@eslint-react/ast": "5.10.1",
|
|
49
|
+
"@eslint-react/core": "5.10.1",
|
|
50
|
+
"@eslint-react/eslint": "5.10.1",
|
|
51
|
+
"@eslint-react/jsx": "5.10.1",
|
|
52
|
+
"@eslint-react/shared": "5.10.1",
|
|
53
|
+
"@eslint-react/var": "5.10.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/react": "^19.2.17",
|
|
57
57
|
"@types/react-dom": "^19.2.3",
|
|
58
58
|
"dedent": "^1.7.2",
|
|
59
|
-
"eslint": "^10.
|
|
59
|
+
"eslint": "^10.6.0",
|
|
60
60
|
"react": "^19.2.7",
|
|
61
61
|
"react-dom": "^19.2.7",
|
|
62
62
|
"tsdown": "^0.22.3",
|
|
63
63
|
"tsl": "^1.0.30",
|
|
64
|
-
"tsl-dx": "^0.13.
|
|
64
|
+
"tsl-dx": "^0.13.2",
|
|
65
65
|
"typescript": "6.0.3",
|
|
66
66
|
"@local/configs": "0.0.0",
|
|
67
67
|
"@local/eff": "0.0.0"
|