Skip to content

linter: no-unused-vars false positive when variable is used as default parameter with postfix/prefix increment/decrement #24313

Description

@dylansteele8

What version of Oxlint are you using?

latest

What command did you run?

No response

What does your .oxlintrc.json (or oxlint.config.ts) config file look like?

Not using a config file

What happened?

eslint/no-unused-vars reports a variable as unused if the variable is only used as a default parameter with either prefix increment, postfix increment, prefix decrement, or postfix decrement operators. Reproducing in the playground (commit b227a069a5ef302ed94bc06e8b0dd4cc2249f8d6) (playground link). Variables that use unary operators (e.g., unary negation or typeof) are correctly considered as used.

Metadata

Metadata

Assignees

Labels

Type

Fields

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions