From 1c6b118b577fed2274bb354662aae2478c3e684c Mon Sep 17 00:00:00 2001 From: Rebecca Stevens Date: Fri, 3 May 2024 20:05:57 +1200 Subject: [PATCH] fix: special handling of identifiers no longer required --- src/utils/rule.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/rule.ts b/src/utils/rule.ts index fd168700d..f7edf4bf9 100644 --- a/src/utils/rule.ts +++ b/src/utils/rule.ts @@ -265,10 +265,9 @@ export function getTypeImmutabilityOfNode< const overrides = explicitOverrides ?? getImmutabilityOverrides(context.settings); const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node); - const typedNode = ts.isIdentifier(tsNode) ? tsNode.parent : tsNode; const typeLike = - (typedNode as { type?: TypeNode }).type ?? - getTypeOfNode(parserServices.tsNodeToESTreeNodeMap.get(typedNode), context); + (tsNode as { type?: TypeNode }).type ?? + getTypeOfNode(parserServices.tsNodeToESTreeNodeMap.get(tsNode), context); return getTypeImmutability( parserServices.program,