You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It claims interpolations in the overload signature is unused. However, it only makes sense to check for unused vars in functions with bodies. Here's the output:
❯ npx oxlint@latest test.ts
⚠ eslint(no-unused-vars): Variable 'interpolations' is declared but never used.
╭─[test.ts:1:38]
1 │ export function log(message: string, ...interpolations: unknown[]): void;
· ──────────────┬─────────────
· ╰── 'interpolations' is declared here
2 │ export function log(message: string, ...interpolations: unknown[]): void {
╰────
help: Consider removing this declaration.
Finished in 84ms on 1 file with 93 rules using 3 threads.
Found 1 warning and 0 errors.
The text was updated successfully, but these errors were encountered:
…n overloads (#5470)
- Fixes#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`:
https://github.com/oxc-project/oxc/blob/5187f384cb38b1ba69acc2cb9b677d72ef175e3e/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.
no-unused-vars
warns on the following code:It claims
interpolations
in the overload signature is unused. However, it only makes sense to check for unused vars in functions with bodies. Here's the output:The text was updated successfully, but these errors were encountered: