oxc/crates
rzvxa 4d2b7f1227 refactor(linter): LintContext can now only be constructed with a cfg enabled semantic. (#3761)
It has the same spirit as #3747 but with a much simpler approach. I've used the fact that @Boshen mentioned about linter always using CFG so now we assert `semantic.cfg().is_some()` in the `LintContext::new` because of this assertion we can have a `LintContext::cfg` that unwraps unchecked.
Eliminates unnecessary checks in our hot paths.

It has the best of both worlds, No complicated typing yet we still get the CFG as a non-optional value without extra ASM or branching.
2024-06-19 13:01:33 +00:00
..
oxc feat(oxc): export isolated-declarations (#3765) 2024-06-19 12:54:02 +00:00
oxc_allocator Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_ast Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_ast_macros Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_cfg Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_codegen Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_diagnostics Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_index Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_isolated_declarations chore(isolated-declarations): add snapshot testing (#3756) 2024-06-19 09:20:17 +00:00
oxc_js_regex chore: crates should only publish src and examples directory 2024-06-08 16:35:16 +08:00
oxc_language_server refactor(linter): LintContext can now only be constructed with a cfg enabled semantic. (#3761) 2024-06-19 13:01:33 +00:00
oxc_linter refactor(linter): LintContext can now only be constructed with a cfg enabled semantic. (#3761) 2024-06-19 13:01:33 +00:00
oxc_macros refactor(linter): LintContext can now only be constructed with a cfg enabled semantic. (#3761) 2024-06-19 13:01:33 +00:00
oxc_minifier Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_module_lexer Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_parser Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_prettier chore: fix some nightly clippy warnings 2024-06-19 00:53:58 +08:00
oxc_semantic chore(semantic): regenerate snapshot (#3757) 2024-06-19 09:28:31 +00:00
oxc_sourcemap Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_span Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_syntax Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_transformer refactor(transformer): move TSImportEqualsDeclaration transform code (#3764) 2024-06-19 12:48:44 +00:00
oxc_traverse Release crates v0.15.0 (#3743) 2024-06-19 01:15:55 +08:00
oxc_wasm refactor(linter): LintContext can now only be constructed with a cfg enabled semantic. (#3761) 2024-06-19 13:01:33 +00:00