@eslint-react/var 3.0.0-next.29 → 3.0.0-next.32
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 +3 -3
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -236,10 +236,10 @@ function findProperty(name, properties, initialScope, seen = /* @__PURE__ */ new
|
|
|
236
236
|
if (prop.type === AST_NODE_TYPES.SpreadElement) switch (prop.argument.type) {
|
|
237
237
|
case AST_NODE_TYPES.Identifier: {
|
|
238
238
|
if (seen.has(prop.argument.name)) return false;
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
239
|
+
const initNode = getVariableInitializer(findVariable(prop.argument.name, initialScope), 0);
|
|
240
|
+
if (initNode?.type === AST_NODE_TYPES.ObjectExpression) {
|
|
241
241
|
seen.add(prop.argument.name);
|
|
242
|
-
return findProperty(name,
|
|
242
|
+
return findProperty(name, initNode.properties, initialScope, seen) != null;
|
|
243
243
|
}
|
|
244
244
|
return false;
|
|
245
245
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/var",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.32",
|
|
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": {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"@typescript-eslint/types": "canary",
|
|
35
35
|
"@typescript-eslint/utils": "canary",
|
|
36
36
|
"ts-pattern": "^5.9.0",
|
|
37
|
-
"@eslint-react/ast": "3.0.0-next.
|
|
38
|
-
"@eslint-react/
|
|
39
|
-
"@eslint-react/
|
|
37
|
+
"@eslint-react/ast": "3.0.0-next.32",
|
|
38
|
+
"@eslint-react/shared": "3.0.0-next.32",
|
|
39
|
+
"@eslint-react/eff": "3.0.0-next.32"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"tsdown": "^0.20.3",
|