-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(eslint-plugin): [no-confusing-non-null-assertion] check !in and !instanceof #9994
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): [no-confusing-non-null-assertion] check !in and !instanceof #9994
Conversation
Thanks for the PR, @kirkwaiblinger! 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. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Swell! 🙌
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9994 +/- ##
==========================================
+ Coverage 88.70% 88.71% +0.01%
==========================================
Files 426 426
Lines 14835 14845 +10
Branches 4312 4310 -2
==========================================
+ Hits 13159 13170 +11
Misses 1533 1533
+ Partials 143 142 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
PR Checklist
Overview
Basically just shares the logic from the other operators. The only difference is that, since it's not always safe to remove the non-null assertion before an
in
orinstanceof
, I additionally added the wrapping suggestion fora! in b
->(a!) in b
anda! instanceof b
->(a!) instanceof b
.