lint: enforce exhaustive switches

This commit is contained in:
Peter Steinberger
2026-04-23 06:02:01 +01:00
parent 4aa35d85fa
commit e3caacd530
9 changed files with 40 additions and 0 deletions

View File

@@ -132,6 +132,15 @@ describe("oxlint config", () => {
]);
});
it("enables exhaustive switch linting", () => {
const config = readJson(".oxlintrc.json") as OxlintConfig;
expect(config.rules?.["typescript/switch-exhaustiveness-check"]).toEqual([
"error",
{ considerDefaultExhaustiveForUnions: true },
]);
});
it("enables clean zero-baseline lint rules", () => {
const config = readJson(".oxlintrc.json") as OxlintConfig;