@eslint-react/core 5.8.8 → 5.8.10
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 +7 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -357,7 +357,13 @@ function isThisSetStateCall(node) {
|
|
|
357
357
|
*/
|
|
358
358
|
function isAssignmentToThisState(node) {
|
|
359
359
|
const { left } = node;
|
|
360
|
-
|
|
360
|
+
let current = Extract.unwrap(left);
|
|
361
|
+
while (current.type === AST_NODE_TYPES.MemberExpression) {
|
|
362
|
+
const { object, property } = current;
|
|
363
|
+
if (object.type === AST_NODE_TYPES.ThisExpression && Extract.getPropertyName(property) === "state") return true;
|
|
364
|
+
current = Extract.unwrap(object);
|
|
365
|
+
}
|
|
366
|
+
return false;
|
|
361
367
|
}
|
|
362
368
|
|
|
363
369
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/core",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.10",
|
|
4
4
|
"description": "ESLint React's ESLint utility module for static analysis of React core APIs and patterns.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"@typescript-eslint/types": "^8.60.0",
|
|
34
34
|
"@typescript-eslint/utils": "^8.60.0",
|
|
35
35
|
"ts-pattern": "^5.9.0",
|
|
36
|
-
"@eslint-react/ast": "5.8.
|
|
37
|
-
"@eslint-react/eslint": "5.8.
|
|
38
|
-
"@eslint-react/
|
|
39
|
-
"@eslint-react/
|
|
40
|
-
"@eslint-react/
|
|
36
|
+
"@eslint-react/ast": "5.8.10",
|
|
37
|
+
"@eslint-react/eslint": "5.8.10",
|
|
38
|
+
"@eslint-react/jsx": "5.8.10",
|
|
39
|
+
"@eslint-react/shared": "5.8.10",
|
|
40
|
+
"@eslint-react/var": "5.8.10"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@typescript-eslint/parser": "^8.60.0",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"tsdown": "^0.22.1",
|
|
47
47
|
"typescript": "5.9.3",
|
|
48
48
|
"vitest": "^4.1.7",
|
|
49
|
-
"@local/
|
|
50
|
-
"@local/
|
|
49
|
+
"@local/configs": "0.0.0",
|
|
50
|
+
"@local/eff": "0.0.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"eslint": "^10.3.0",
|