-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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(type-utils): treat intrinsic types as if they are from lib and never match error types #6869
fix(type-utils): treat intrinsic types as if they are from lib and never match error types #6869
Conversation
Thanks for the PR, @RebeccaStevens! 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. |
Hmm, good catch that native types aren't covered... Treating them as being from a lib is a bit of a simplification, but I think it's OK. Not a maintainer, but could you please add a test? |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## v6 #6869 +/- ##
==========================================
- Coverage 87.70% 87.46% -0.25%
==========================================
Files 372 374 +2
Lines 12813 12887 +74
Branches 3795 3812 +17
==========================================
+ Hits 11238 11271 +33
- Misses 1199 1231 +32
- Partials 376 385 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
|
c5fe22d
to
86372df
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.
Yup seems reasonable so far, but I'll take a closer look once there's some test coverage. 👍
6815b8c
to
cae8223
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.
Great, thanks @RebeccaStevens! 🚀
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.
I'd like to see one more test for error types, otherwise LGTM, thanks!
@RebeccaStevens is this still something you have time to look into soon? No worries if not, I can touch things up myself tomorrow / this weekend in preparation for v6 (currently scheduled for Monday!). |
0990cf6
to
e04ca7b
Compare
I just rebase this PR off the latest v6 branch and updated Let me know if there is anything else that needs doing. |
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.
💯 woop!
PR Checklist
typeMatchesSpecifier
LibSpecifier
should return true for intrinsic types (string, number, boolean, etc) #6867Overview
Adds explicit logic for intrinsic types and error types.