Skip to content

Commit 22a3742

Browse files
committed
Turn on '@typescript-eslint/no-unnecessary-condition'.
1 parent d5b2250 commit 22a3742

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

eslint.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,14 @@ export default defineConfig(
193193
// (it can make `yarn ts` fail after `yarn lint-fix`)
194194
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
195195

196+
'@typescript-eslint/no-unnecessary-condition': [
197+
'error',
198+
{
199+
allowConstantLoopConditions: 'only-allowed-literals',
200+
checkTypePredicates: true,
201+
},
202+
],
203+
196204
// Consider enabling these in the future
197205
'@typescript-eslint/unbound-method': 'off',
198206
'@typescript-eslint/only-throw-error': 'off',

0 commit comments

Comments
 (0)