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): add rule strict-boolean-expressions #579
feat(eslint-plugin): add rule strict-boolean-expressions #579
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done, @jonathanrdelgado, LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few suggestions. Code looks good otherwise. Thanks for contributing!
Codecov Report
@@ Coverage Diff @@
## master #579 +/- ##
==========================================
+ Coverage 94.33% 94.36% +0.02%
==========================================
Files 109 110 +1
Lines 4540 4560 +20
Branches 1254 1258 +4
==========================================
+ Hits 4283 4303 +20
Misses 149 149
Partials 108 108
|
- Add support for generics - Abstract Logical/Unary expressions - Abstract reports for multiple calls - Filter UnaryExpressions at the walker
Thank you for the specific feedback and suggestions, it was very helpful! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great work. I'll merge it as soon as the CI finishes.
It's kinda useless without the Edit: At least until we get nullish coalescing operator |
Someone else has PR'd it #691 Also, please don't leave comments on closed PRs. It's unnecessary notification spam that serves zero purpose. |
I ported over the strict-boolean-expressions rule from TSLint. I made the conscious decision to not move the previous options, as I felt they directly contradicted the rule itself.
For quick reference: https://palantir.github.io/tslint/rules/strict-boolean-expressions
This was my first implementation of an ESLint rule, so I am very open to any and all feedback. Thank you for your time!