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): new extended rule 'no-invalid-this' #1823
feat(eslint-plugin): new extended rule 'no-invalid-this' #1823
Conversation
Thanks for the PR, @anikethsaha! 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! |
951faa1
to
08ef749
Compare
@bradzacher any suggestion to fix this ? |
The error message gives you the reason that it is incompatible:
You're attempting to assign a function with signature This is an error, |
I did try with but that one failed as well. |
Why bother adding an explicit type to the param? Just let TS infer the type from the usage. node.params.map(param => { ... }); |
e16b354
to
fd1f837
Compare
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.
mostly LGTM, a few comments.
Thanks for this!
Co-Authored-By: Brad Zacher <brad.zacher@gmail.com>
FYI - the CI is failing |
on it. |
Codecov Report
@@ Coverage Diff @@
## master #1823 +/- ##
==========================================
+ Coverage 93.88% 93.90% +0.01%
==========================================
Files 170 171 +1
Lines 7737 7758 +21
Branches 2227 2230 +3
==========================================
+ Hits 7264 7285 +21
Misses 218 218
Partials 255 255
|
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 for this
This is awesome, thank you @anikethsaha for implementing the new rule |
Supports functions with a
this
argumentFixes #604