Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(linter):
no_shadow_restricted_names
only look up name in hashm…
…ap once (#4472) `eslint(no_shadow_restricted_names)` lint rule emits a diagnostic for every declaration of a symbol with a restricted name. Currently for a var which has redeclarations, the var name is looked up in hash map of restricted names repeatedly for each redeclaration. This PR changes that to only do a single hashmap lookup. Also, if the var name is `undefined`, skip looking it up in hash map, because we already know it's a restricted name.
- Loading branch information