Skip to content

Commit

Permalink
@typescript-eslint/switch-exhaustiveness-check: Make it stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jan 1, 2024
1 parent d7fff2e commit df07e88
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
- 14
- 12
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,13 @@ module.exports = {
// }
// ],

'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/switch-exhaustiveness-check': [
'error',
{
allowDefaultCaseForExhaustiveSwitch: false,
requireDefaultForNonUnion: true
}
],
'@typescript-eslint/triple-slash-reference': [
'error',
{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"sideEffects": false,
"engines": {
"node": ">=16"
},
Expand Down

0 comments on commit df07e88

Please sign in to comment.