@eslint-react/ast 3.0.0-next.81 → 3.0.0-next.83

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 +2 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -652,7 +652,8 @@ function getFunctionId(node) {
652
652
  */
653
653
  function getFunctionInitPath(node) {
654
654
  if (node.type === AST_NODE_TYPES.FunctionDeclaration) return [node];
655
- const { parent } = node;
655
+ let parent = node.parent;
656
+ while (isTypeExpression(parent)) parent = parent.parent;
656
657
  switch (true) {
657
658
  case parent.type === AST_NODE_TYPES.VariableDeclarator: return [
658
659
  parent.parent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/ast",
3
- "version": "3.0.0-next.81",
3
+ "version": "3.0.0-next.83",
4
4
  "description": "ESLint React's TSESTree AST utility module.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "tsdown": "^0.21.0",
40
- "@local/configs": "0.0.0",
41
- "@local/eff": "3.0.0-beta.72"
40
+ "@local/eff": "3.0.0-beta.72",
41
+ "@local/configs": "0.0.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "eslint": "^10.0.0",