From 605b74d6b2ead475b391507092e0142f7e5365fa Mon Sep 17 00:00:00 2001 From: Hazmi Alfarizqi Date: Wed, 30 Oct 2024 18:28:11 +0700 Subject: [PATCH] fix(typescript): fix typescript/switch-exhaustiveness-check options --- conf/typescript.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/conf/typescript.js b/conf/typescript.js index 559391f..d55361e 100644 --- a/conf/typescript.js +++ b/conf/typescript.js @@ -269,7 +269,14 @@ export default tseslint.config({ "typescript/return-await": ["error", "in-try-catch"], "typescript/sort-type-constituents": "error", "typescript/strict-boolean-expressions": "error", - "typescript/switch-exhaustiveness-check": "error", + "typescript/switch-exhaustiveness-check": [ + "error", + { + allowDefaultCaseForExhaustiveSwitch: true, + considerDefaultExhaustiveForUnions: true, + requireDefaultForNonUnion: true + } + ], "typescript/triple-slash-reference": [ "error", {