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,