-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): [strict-boolean-expression] rework options #1631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(eslint-plugin): [strict-boolean-expression] rework options #1631
Conversation
Thanks for the PR, @phaux! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day. |
Added [WIP] because I forgot to update docs |
Added docs! |
Codecov Report
@@ Coverage Diff @@
## v3 #1631 +/- ##
==========================================
+ Coverage 93.74% 93.75% +0.01%
==========================================
Files 172 172
Lines 7813 7810 -3
Branches 2245 2240 -5
==========================================
- Hits 7324 7322 -2
Misses 228 228
+ Partials 261 260 -1
|
# Conflicts: # packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts
closes #1515
Changes from last PR (#1480 ):
&&
/||
) nested in test expressions (if/while/for/?:
/!
) all the operands are checked.I also refactored the rule slightly so it is now trivial to add fixers or suggestions for every case. A follow-up PR could add a fixer for nullable object error which changes
expr
toexpr != null