From bbe81a64763895b50b713d7bc1f5abdbd366cd23 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,