Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(linter): no_shadow_restricted_names only look up name in hashmap once #4472

Commits on Jul 26, 2024

  1. 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.
    overlookmotel committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    b60bdf1 View commit details
    Browse the repository at this point in the history