@eslint-react/var 2.0.0-next.174 → 2.0.0-next.176
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 +4 -8
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -81,16 +81,12 @@ function getConstruction(node, initialScope, hint = ConstructionDetectionHint.No
|
|
|
81
81
|
case AST_NODE_TYPES.AssignmentPattern:
|
|
82
82
|
if (!("right" in node)) return unit;
|
|
83
83
|
return getConstruction(node.right, initialScope, hint);
|
|
84
|
-
case AST_NODE_TYPES.LogicalExpression:
|
|
85
|
-
|
|
86
|
-
if (lvc == null) return unit;
|
|
84
|
+
case AST_NODE_TYPES.LogicalExpression:
|
|
85
|
+
if (getConstruction(node.left, initialScope, hint) == null) return unit;
|
|
87
86
|
return getConstruction(node.right, initialScope, hint);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const cvc = getConstruction(node.consequent, initialScope, hint);
|
|
91
|
-
if (cvc == null) return unit;
|
|
87
|
+
case AST_NODE_TYPES.ConditionalExpression:
|
|
88
|
+
if (getConstruction(node.consequent, initialScope, hint) == null) return unit;
|
|
92
89
|
return getConstruction(node.alternate, initialScope, hint);
|
|
93
|
-
}
|
|
94
90
|
case AST_NODE_TYPES.Identifier: {
|
|
95
91
|
if (!("name" in node) || typeof node.name !== "string") return unit;
|
|
96
92
|
const variable = initialScope.set.get(node.name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/var",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.176",
|
|
4
4
|
"description": "ESLint React's TSESTree AST utility module for static analysis of variables.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"./package.json"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@typescript-eslint/scope-manager": "^8.
|
|
31
|
-
"@typescript-eslint/types": "^8.
|
|
32
|
-
"@typescript-eslint/utils": "^8.
|
|
30
|
+
"@typescript-eslint/scope-manager": "^8.43.0",
|
|
31
|
+
"@typescript-eslint/types": "^8.43.0",
|
|
32
|
+
"@typescript-eslint/utils": "^8.43.0",
|
|
33
33
|
"string-ts": "^2.2.1",
|
|
34
34
|
"ts-pattern": "^5.8.0",
|
|
35
|
-
"@eslint-react/
|
|
36
|
-
"@eslint-react/
|
|
35
|
+
"@eslint-react/ast": "2.0.0-next.176",
|
|
36
|
+
"@eslint-react/eff": "2.0.0-next.176"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"tsdown": "^0.14.2",
|