Skip to content

Commit

Permalink
compat whoopsie
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwilsonvu committed Apr 27, 2024
1 parent e110062 commit 7b81ba5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/compat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,14 @@ export function findVariable(context: CompatContext, node: TSESTree.Identifier)
return ASTUtils.findVariable(getScope(context, node), node);
}

export function markVariableAsUsed(context: CompatContext, name: string, node: TSESTree.Node) {
export function markVariableAsUsed(
context: CompatContext,
name: string,
node: TSESTree.Node
): void {
if (typeof context.markVariableAsUsed === "function") {
context.markVariableAsUsed(name);
} else {
getSourceCode(context).markVariableAsUsed(name, node);
}
getSourceCode(context).markVariableAsUsed(name, node);
}

0 comments on commit 7b81ba5

Please sign in to comment.