Skip to content

Commit

Permalink
refactor: remove unneeded checks
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Nov 4, 2022
1 parent 3431af2 commit b1c1c35
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/rules/utils/parseJestFnCall.ts
Expand Up @@ -603,15 +603,7 @@ export const scopeHasLocalReference = (
}

// referenceName was found as a local variable or function declaration.
if (ref.name === referenceName) {
return true;
}
}

if (
currentScope.through.every(ref => ref.identifier.name !== referenceName)
) {
return true;
return ref.name === referenceName;
}

currentScope = currentScope.upper;
Expand Down

0 comments on commit b1c1c35

Please sign in to comment.