Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(type-utils): allowFileSpecifier
to exclude paths#6860
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…luding node_modules
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 onhttps://opencollective.com/typescript-eslint. |
netlifybot commentedApr 7, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify site settings. |
nx-cloudbot commentedApr 7, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@## v6 #6860 +/- ##==========================================- Coverage 87.46% 87.45% -0.02%========================================== Files 374 374 Lines 12879 12884 +5 Branches 3811 3814 +3 ==========================================+ Hits 11265 11268 +3- Misses 1229 1230 +1- Partials 385 386 +1
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.
Thanks for the PR, you truly beat me to it by just a few minutes :D
As I wrote in the comments, I'm not a fan of the paths being configurable and would just hard-codenode_modules
there.
However, if you do decide to go ahead with theexcludePaths
option,typeOrValueSpecifierSchema
needs to be modified as well :)
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
I'm going to wait on discussion in#6839 - it might impact the config option here. |
JoshuaKGoldberg commentedJul 10, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This was unintentionally auto-closed when we merged the |
Sorry for the delay -#6839 is accepting PRs so this is unblocked! |
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.
Sorry for the delay here! I think the changes generally make sense, but I'm leaning towards keeping it less complex by not makingexcludePaths
andpath
mutually exclusive. What do you think?
path?: undefined; | ||
excludePaths?: string | string[]; // defaults to `["node_modules"]`. | ||
} | ||
); |
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.
Starting a new conversation here: why makeexcludePaths
andpath
mutually exclusive? What if someone wants to provide both? E.g.:
{path:"examples",excludePaths:["examples/*/node_modules"]}
Proposal: can we switch this back to a straightforward interface?
interfaceFileSpecifier{from:'file';name:string|string[];path?:string;excludePaths?:string|string[];// defaults to `["node_modules"]`.}
} | ||
| { | ||
path?: undefined; | ||
excludePaths?: string | string[]; // defaults to `["node_modules"]`. |
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 also wonder if we should call thispathExcludes
, to visually lump it in withpath
... 🤔
👋 ping@RebeccaStevens, just checking in - is this still something you have time for? No worries if not! I just don't want to leave it hanging. |
Closing this PR as it's been stale for a while without activity. Feel free to reopen@RebeccaStevens if you have time - but no worries if not! If anybody wants to drive it forward, please do post your own PR - and if you use this as a start, consider adding a co-author at the end of your PR description. Thanks! 😊 |
PR Checklist
typeMatchesSpecifier
FileSpecifier
checks in node modules #6819Overview
Adds
excludePaths
option toFileSpecifier
(has no effect if apath
is given).This new option defaults to
["node_modules"]
.