Skip to content

Commit

Permalink
feat(typescript): add allowDefaultCaseForExhaustiveSwitch: false op…
Browse files Browse the repository at this point in the history
…tion for `switch-exhaustiveness-check` rule
  • Loading branch information
xsjcTony committed Feb 9, 2024
1 parent a04c9eb commit 28f1ad0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/configs/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,14 @@ const typeAwareTypescriptRules: FlatConfigItem['rules'] = {
},
],
'ts/return-await': ['error', 'always'],
// @ts-expect-error - type definition is not up-to-date
'ts/switch-exhaustiveness-check': ['error', { requireDefaultForNonUnion: true }],
'ts/switch-exhaustiveness-check': [
'error',
// @ts-expect-error - type definition is not up-to-date
{
requireDefaultForNonUnion: true,
allowDefaultCaseForExhaustiveSwitch: false,
},
],
'ts/unbound-method': ['error', { ignoreStatic: false }],
'ts/prefer-find': 'error',
}
Expand Down

0 comments on commit 28f1ad0

Please sign in to comment.