Skip to content

peerDependenciesMetaRelationship

Enforces that any dependencies declared in peerDependenciesMeta are also defined in the package's peerDependencies.

✅ This rule is included in the package-json logical presets.

The rule checks that any dependencies declared in peerDependenciesMeta are also defined in the package’s peerDependencies.

peerDependenciesMeta is meant to provide metadata about peer dependencies. So entries that do not correspond to an existing peerDependencies dependency are considered redundant.

{
"peerDependencies": {
"one-package": "^1.0.0"
},
"peerDependenciesMeta": {
"some-other-package": {
"optional": true
}
}
}

When this rule reports an invalid peerDependenciesMeta entry, it provides an editor suggestion to remove that property.

Made with ❤️‍🔥 around the world by the Flint team and contributors.