oxc/crates
overlookmotel b60bdf1ff7 perf(linter): no_shadow_restricted_names only look up name in hashmap 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.
2024-07-26 01:30:06 +01:00
..
oxc Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_allocator Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_ast feat(ast): add AstKind::AssignmentTargetPattern, AstKind::ArrayAssignmentTarget and AstKind::ObjectAssignmentTarget (#4456) 2024-07-25 09:32:33 +00:00
oxc_ast_macros Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_cfg Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_codegen chore(codegen): port over esbuild codegen tests (all ignored right now) (#4457) 2024-07-25 10:00:34 +00:00
oxc_diagnostics Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_index Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_isolated_declarations Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_js_regex
oxc_language_server refactor(linter): use diagnostic codes in lint rules (#4349) 2024-07-20 03:35:00 +00:00
oxc_linter perf(linter): no_shadow_restricted_names only look up name in hashmap once (#4472) 2024-07-26 01:30:06 +01:00
oxc_macros perf(linter): disable lint rules by file type (#4380) 2024-07-21 15:22:54 +00:00
oxc_mangler refactor(syntax): give ScopeId a niche (#4468) 2024-07-26 00:14:50 +00:00
oxc_minifier chore(codegen): port over esbuild codegen tests (all ignored right now) (#4457) 2024-07-25 10:00:34 +00:00
oxc_module_lexer Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_parser Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_prettier chore: remove unsafe_code = "warn" rust lint 2024-07-15 10:39:08 +08:00
oxc_semantic refactor(semantic): methods take Span as param, not &Span (#4470) 2024-07-26 00:14:56 +00:00
oxc_sourcemap Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_span Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_syntax perf(semantic): give AstNodeId a niche (#4469) 2024-07-26 00:14:53 +00:00
oxc_transformer refactor(semantic): populate declarations field in SymbolTable::create_symbol (#4461) 2024-07-26 00:14:32 +00:00
oxc_traverse perf(semantic): remove span field from Reference (#4464) 2024-07-26 00:14:38 +00:00
oxc_wasm refactor(syntax): give ScopeId a niche (#4468) 2024-07-26 00:14:50 +00:00