Skip to content

Commit

Permalink
ESLint: Set "no-unnecessary-condition" rule to warn
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
regexowl authored and lucasgarfield committed Jan 17, 2025
1 parent 8d34f85 commit 7986828
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ globals:
render: 'readonly'
mount: 'readonly'
parser: "@typescript-eslint/parser"
parserOptions:
project: ["tsconfig.json"]
plugins:
- import
rules:
Expand Down Expand Up @@ -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

0 comments on commit 7986828

Please sign in to comment.