-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(eslint-plugin): unbound-method false positive when comparing to null #914
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
fix(eslint-plugin): unbound-method false positive when comparing to null #914
Conversation
Thanks for the PR, @a-tarasyuk! 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 |
Because I haven't used this rule.
enum BinaryOperator {
"==" | "!=" | "===" | "!=="
| "<" | "<=" | ">" | ">="
| "<<" | ">>" | ">>>"
| "+" | "-" | "*" | "/" | "%"
| "|" | "^" | "&" | "in"
| "instanceof"
} Are we okay with opening this rule up to "ignore" all of these operators? |
The issue in this case that if we check
|
Sorry - i meant rather than just saying "having a parent of type BinaryExpression is fine", I was meaning - do we want to limit the scope a little bit. I think this is fine as is though. I don't think any of the other binary operators should cause problems. |
9bfa9fc
to
7375663
Compare
@bradzacher oke. |
Codecov Report
@@ Coverage Diff @@
## master #914 +/- ##
==========================================
+ Coverage 94.07% 94.08% +<.01%
==========================================
Files 113 113
Lines 4915 4916 +1
Branches 1369 1369
==========================================
+ Hits 4624 4625 +1
Misses 165 165
Partials 126 126
|
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, thanks
Fixes #877