@eslint-react/core 2.0.0-next.152 → 2.0.0-next.154

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 +4 -4
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -405,11 +405,11 @@ function getAttribute(context, name, attributes, initialScope) {
405
405
  switch (attr.argument.type) {
406
406
  case AST_NODE_TYPES.Identifier: {
407
407
  const variable = VAR.findVariable(attr.argument.name, initialScope);
408
- const variableNode = VAR.getVariableInitNode(variable, 0);
409
- if (variableNode?.type === AST_NODE_TYPES.ObjectExpression) return VAR.findPropertyInProperties(name, variableNode.properties, initialScope) != null;
408
+ const variableNode = VAR.getVariableDefinitionNode(variable, 0);
409
+ if (variableNode?.type === AST_NODE_TYPES.ObjectExpression) return VAR.findProperty(name, variableNode.properties, initialScope) != null;
410
410
  return false;
411
411
  }
412
- case AST_NODE_TYPES.ObjectExpression: return VAR.findPropertyInProperties(name, attr.argument.properties, initialScope) != null;
412
+ case AST_NODE_TYPES.ObjectExpression: return VAR.findProperty(name, attr.argument.properties, initialScope) != null;
413
413
  }
414
414
  return false;
415
415
  });
@@ -570,7 +570,7 @@ function isJsxLike(code, node, hint = DEFAULT_JSX_DETECTION_HINT) {
570
570
  if (name === "undefined") return !(hint & JSXDetectionHint.SkipUndefined);
571
571
  if (AST.isJSXTagNameExpression(node)) return true;
572
572
  const variable = VAR.findVariable(name, code.getScope(node));
573
- const variableNode = variable && VAR.getVariableInitNode(variable, 0);
573
+ const variableNode = variable && VAR.getVariableDefinitionNode(variable, 0);
574
574
  return !!variableNode && isJsxLike(code, variableNode, hint);
575
575
  }
576
576
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "2.0.0-next.152",
3
+ "version": "2.0.0-next.154",
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": {
@@ -34,11 +34,11 @@
34
34
  "birecord": "^0.1.1",
35
35
  "ts-api-utils": "^2.1.0",
36
36
  "ts-pattern": "^5.8.0",
37
- "@eslint-react/ast": "2.0.0-next.152",
38
- "@eslint-react/eff": "2.0.0-next.152",
39
- "@eslint-react/shared": "2.0.0-next.152",
40
- "@eslint-react/kit": "2.0.0-next.152",
41
- "@eslint-react/var": "2.0.0-next.152"
37
+ "@eslint-react/ast": "2.0.0-next.154",
38
+ "@eslint-react/shared": "2.0.0-next.154",
39
+ "@eslint-react/eff": "2.0.0-next.154",
40
+ "@eslint-react/kit": "2.0.0-next.154",
41
+ "@eslint-react/var": "2.0.0-next.154"
42
42
  },
43
43
  "devDependencies": {
44
44
  "tsdown": "^0.14.2",