-
-
Notifications
You must be signed in to change notification settings - Fork 670
Labels
A-linterArea - LinterArea - Linter
Description
What version of Oxlint are you using?
0.16.6
What command did you run?
oxlint
What does your .oxlintrc.json
config file look like?
What happened?
It reports unused vars wrongly in this code.
❌
const onClick =
(
value: string,
key: string,
// ^ reports key as unused
) => {
const obj: Record<string, string> = {};
// ^ reports obj as unused
(obj[key] as any) = value;
}
Seems like caused by as any
. Below works fine.
✅
const onClick =
(
value: string,
key: string,
) => {
const obj: Record<string, string> = {};
obj[key] = value;
}
Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - Linter