What version of Oxlint are you using?
1.64.0
What command did you run?
oxlint
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
Reproduces without a config file (requires no-unused-var to be enabled)
What happened?
Code:
export function foo(a: unknown): a is string {
return true;
}
oxlint flags a as unused despite its use in return type (a is string).
Error message
⚠ eslint(no-unused-vars): Parameter 'a' is declared but never used. Unused parameters should start with a '_'.
╭─[test.ts:2:21]
1 │
2 │ export function foo(a: unknown): a is string {
· ┬
· ╰── 'a' is declared here
3 │ return true;
╰────
help: Consider removing this parameter.
I am not sure if this should be treated as a bug; it's totally understandable to flag a as unused particularly because you can't write meaningful code without using such a parameter inside function body.
I'm reporting this anyway because it diverges from ESLint behavior and I encountered this while migrating from ESLint.
Thank you for the great tool. It's fast 🙂
What version of Oxlint are you using?
1.64.0
What command did you run?
oxlintWhat does your
.oxlintrc.json(oroxlint.config.ts) config file look like?Reproduces without a config file (requires
no-unused-varto be enabled)What happened?
Code:
oxlint flags
aas unused despite its use in return type (a is string).Error message
I am not sure if this should be treated as a bug; it's totally understandable to flag
aas unused particularly because you can't write meaningful code without using such a parameter inside function body.I'm reporting this anyway because it diverges from ESLint behavior and I encountered this while migrating from ESLint.
Thank you for the great tool. It's fast 🙂