oxc/crates/oxc_language_server
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
..
src refactor(linter): LintContext can now only be constructed with a cfg enabled semantic. (#3761) 2024-06-19 13:01:33 +00:00
Cargo.toml chore: crates should only publish src and examples directory 2024-06-08 16:35:16 +08:00