@eslint-react/var 3.0.0-next.28 → 3.0.0-next.31

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. 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 variableNode = getVariableInitializer(findVariable(prop.argument.name, initialScope), 0);
240
- if (variableNode?.type === AST_NODE_TYPES.ObjectExpression) {
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, variableNode.properties, initialScope, seen) != null;
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.28",
3
+ "version": "3.0.0-next.31",
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.28",
38
- "@eslint-react/eff": "3.0.0-next.28",
39
- "@eslint-react/shared": "3.0.0-next.28"
37
+ "@eslint-react/ast": "3.0.0-next.31",
38
+ "@eslint-react/shared": "3.0.0-next.31",
39
+ "@eslint-react/eff": "3.0.0-next.31"
40
40
  },
41
41
  "devDependencies": {
42
42
  "tsdown": "^0.20.3",