Closed KevinVandy closed 7 months ago
You can use --ignore-dependency
(or -i
) followed by the package name to ignore it.
It was requested in https://github.com/QuiiBz/sherif/issues/49 but I'm actually not sure if we should keep it or not.
Maybe a config option? I feel like this would be a common requirement. Maybe even make checking peerDependency opt in?
I think it's the norm, especially in repos for npm packages, to have a different version specifyer than an exact version in the peerDependency fields.
One of the goal of this project is to avoid as much as possible for users the need to use cli options, or to introduce a configuration file. But I agree with you that Sherif should be smarter here, and not error.
Yes, this rule is problematic and IMO wrong.
When you define peers, you typically want to specify the version using a caret, e.g. ^10.3.0
.
And then you want to install the exact pinned version (10.3.0
) as a devDep to develop against to ensure that the package being developed adheres to the minimum peer version.
Currently, sherif will flag it as an issue.
⨯ error Dependency constructs has multiple versions defined in the workspace. multiple-dependency-versions
Sorry for the delay, I reverted #49 and released https://github.com/QuiiBz/sherif/releases/tag/v0.8.4
Just upgraded to the latest version of sherif. How can we tell sherif to ignore the versions of peer dependencies? They should not be considered IMO.