ESLint: Set "no-unnecessary-condition" rule to warn
This adds "no-unnecessary-condition" and sets the output to warn. This should help us eliminate superfluous conditional chaining and uncover potentially faulty conditions. Docs: https://typescript-eslint.io/rules/no-unnecessary-condition/
This commit is contained in:
parent
8d34f85c48
commit
7986828f6c
1 changed files with 3 additions and 0 deletions
|
|
@ -13,6 +13,8 @@ globals:
|
|||
render: 'readonly'
|
||||
mount: 'readonly'
|
||||
parser: "@typescript-eslint/parser"
|
||||
parserOptions:
|
||||
project: ["tsconfig.json"]
|
||||
plugins:
|
||||
- import
|
||||
rules:
|
||||
|
|
@ -49,6 +51,7 @@ rules:
|
|||
ts-check: true
|
||||
minimumDescriptionLength: 5
|
||||
"@typescript-eslint/ban-types": off
|
||||
"@typescript-eslint/no-unnecessary-condition": warn
|
||||
# Temporarily disabled
|
||||
jsx-a11y/no-autofocus: off
|
||||
rulesdir/forbid-pf-relative-imports: off
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue