oxc/crates/oxc_linter
overlookmotel 2c7bb9f6c8 refactor(ast): pass final ScopeFlags into visit_function (#4283)
We have a strange workaround for `visit_function` where we pass in `ScopeFlags`, to support creating the scope inside `Function`, but setting different flags for `MethodDefinition`s.

Previously `visit_function` took `Option<ScopeFlags>` and then did `flags.unwrap_or(ScopeFlags::empty()) | ScopeFlags::Function` to it. Personally, I found this confusing. When I was looking at `MethodDefinition`, I was wondering "It's a function, why doesn't it set Function flag too?"

This changes makes it more explicit and clear what `ScopeFlags` everything has.
2024-07-16 07:22:07 +00:00
..
examples refactor(linter): improve diagnostic labeling (#3960) 2024-06-29 05:19:22 +00:00
fixtures feat(linter): support vitest/no-disabled-tests (#3717) 2024-06-24 15:16:32 +00:00
src refactor(ast): pass final ScopeFlags into visit_function (#4283) 2024-07-16 07:22:07 +00:00
tests
Cargo.toml Release oxlint v0.6.0 (#4194) 2024-07-11 14:38:41 +08:00
CHANGELOG.md Release oxlint v0.6.0 (#4194) 2024-07-11 14:38:41 +08:00