-
Notifications
You must be signed in to change notification settings - Fork 50
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
manypkg check
shouldn't warn to mirror peerDependencies
into devDependencies
when they're already available in the root's dependencies
.
#88
Comments
This sounds good, happy to accept a PR for it |
I will work on this (maybe a little slowly haha), unless someone gets to it before me. Thank you! |
Hello. I like your suggestion @threepointone but I'm thinking it would make more sense to choose one rule and not allow a combination of both because I think this would mean people would have to arbitrarily decide where to put dependencies - the package devDependencies or the root dependencies. My thinking was inspired by the "Root has devDependencies" check:
|
@threepointone this feature will be highly appreciated! |
Not all monorepos that use Manypkg have all dependencies hoisted to the root. I'd like this to be an option to ignore the rule, rather than removing this entirely. |
That's a long title, but let me explain.
The broad rule that manypkg warns about, is that anything in
peerDependencies
, should also be indevDependencies
. This is reasonable (and imo also correct).However, in a monorepo (i.e. something using workspaces), root level
dependencies
are used as a substitute for package leveldevDependencies
. This keeps it easier to keep the versioning of those deps across workspaces simple, and avoids repeating them across workspaces.Hence my feature request: You shouldn't warn about mirroring
peerDependencies
anddevDependencies
if it's already available in a root'sdependencies
. It should still do a version check ("External Mistmatch" rule), however.The text was updated successfully, but these errors were encountered: