oxc/crates/oxc_linter
Cam McHenry ff88c1fc07
fix(linter): Don't mark binding rest elements as unused in TS function overloads (#5470)
- Fixes https://github.com/oxc-project/oxc/issues/5406

This implements a fix for the `BindingRestElement` symbol, which is
currently unhandled and gets automatically marked as unused. If we
happen to find that it is a child of declaration, then we will
automatically allow the binding rest element.

The code for this was based on what we currently do in
`is_allowed_param_because_of_method`:
5187f384cb/crates/oxc_linter/src/rules/eslint/no_unused_vars/allowed.rs (L258)

I opted not to refactor this to re-use the same code though, as I think
the duplication is still incidental and the implementations could
diverge in the future.
2024-09-06 08:30:28 +01:00
..
examples
fixtures refactor(linter): replace Windows-style line breaks with Unix-style in test fixture (#4768) 2024-08-08 17:33:04 +00:00
src fix(linter): Don't mark binding rest elements as unused in TS function overloads (#5470) 2024-09-06 08:30:28 +01:00
tests
Cargo.toml refactor(linter): use "parsed pattern" in no_div_regex rule. (#5417) 2024-09-04 14:00:47 +00:00
CHANGELOG.md Release oxlint v0.9.2 (#5401) 2024-09-02 20:30:22 +08:00