-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(eslint-plugin): [no-use-before-define] fix false positive type reference in as, satisfies #8474
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
Conversation
…ference in as, satisfies
Thanks for the PR, @yeonjuan! 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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8474 +/- ##
=======================================
Coverage 86.89% 86.89%
=======================================
Files 250 250
Lines 12201 12202 +1
Branches 3852 3853 +1
=======================================
+ Hits 10602 10603 +1
Misses 1332 1332
Partials 267 267
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Looks good! A nice straightforward logic change that makes sense.
I think just requesting changes on the unit tests to have a bit more testing around both valid & invalid cases. But nothing architectural.
Co-authored-by: @auvred
It looks like |
Yeah, sorry for the noise: #8373 |
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, nice! Will defer to @auvred as we were both reviewing. 🙂
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.
PR Checklist
satisfies
oras
whenignoreTypeReferences: false
#8451Overview
I think the type reference should not be checked with
isInInitializer
.This PR changes
isInInitializer
to be used only for value references.