Skip to content

linter: no-useless-return false positive on early return after statement in switch case #23978

Description

@groomain

What version of Oxlint are you using?

1.71.0

What command did you run?

oxlint -c

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

{
  "rules": {
    "no-useless-return": "error"
  }
}

What happened?

Oxlint reports no-useless-return on early return statements that are not useless — they prevent subsequent code in the same switch case from running.

Steps to reproduce

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