-
-
Notifications
You must be signed in to change notification settings - Fork 930
Closed
Labels
A-linterArea - LinterArea - LinterC-bugCategory - BugCategory - Buggood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Description
no-unused-vars warns on the following code:
export function log(message: string, ...interpolations: unknown[]): void;
export function log(message: string, ...interpolations: unknown[]): void {
console.log(message, interpolations);
}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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - LinterC-bugCategory - BugCategory - Buggood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Type
Fields
Give feedbackPriority
None yet