Closed crfrolik closed 1 month ago
Hi @crfrolik, this is because they are in the same Version Group.
Syncpack needs teaching about the rules of your project if you do not have a monorepo-wide single version policy. The Start Small section of the Getting Started guide I think is relevant here.
If you move one of them into a separate group then they will no longer be compared. There are lots of ways you might choose to organise your project, and the best way will be up to you, but the simplest example that would fix this specific case might be to mirror how you are slicing the project by semver range rules:
{
"semverGroups": [
{
"label": "dev dependencies are ~ prefixed",
"range": "~",
"dependencyTypes": ["dev"],
"dependencies": ["**"],
"packages": ["**"]
},
{
"label": "prod and peer dependencies are ^ prefixed",
"range": "^",
"dependencyTypes": ["prod", "peer"],
"dependencies": ["**"],
"packages": ["**"]
}
],
"versionGroups": [
{
"label": "dev dependencies should use the same version",
"range": "~",
"dependencyTypes": ["dev"]
},
{
"label": "prod and peer dependencies should use the same version",
"dependencyTypes": ["prod", "peer"]
}
]
}
Hope this helps, shout if you need any more help.
My config:
This works fine except I want to have a dependency
foo
that's in bothdevDependencies
andpeerDependencies
:syncpack lint
gives an error for this.How can I configure this so lint won't complain?