Skip to content

linter: typescript/switch-exhaustiveness-check allowDefaultCaseForExhaustiveSwitch differs from typescript-eslint #16263

@KieranP

Description

@KieranP

What version of Oxlint are you using?

1.30.0

What command did you run?

oxlint --type-aware src/**/*.{js,ts}

What does your .oxlintrc.json config file look like?

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "ignorePatterns": ["/dist", "/node_modules"],
  "plugins": ["eslint", "oxc", "typescript", "import", "promise", "unicorn"],
  "categories": {
    "correctness": "error",
    "nursery": "error",
    "pedantic": "error",
    "perf": "error",
    "restriction": "error",
    "style": "error",
    "suspicious": "error"
  }
}

What happened?

https://typescript-eslint.io/rules/switch-exhaustiveness-check/

In typescript-eslint, option allowDefaultCaseForExhaustiveSwitch is true

In oxlint, option allowDefaultCaseForExhaustiveSwitch is false

This result in errors in oxlint that don't show up with typescript-eslint

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions