Skip to content

peerDependenciesInstallation

Enforces that peer dependencies are installed through devDependencies.

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

This rule reports dependencies declared in peerDependencies without a matching entry in devDependencies. Packages listed in peerDependencies express compatibility with consumer-installed versions. Declaring the same packages in devDependencies installs them locally for tests, builds, and editor tooling.

{
"peerDependencies": {
"typescript": "^5.0.0 || ^6.0.0"
}
}

If a package’s peer dependencies are installed by another guaranteed local development mechanism, such as a root workspace package that all package tasks run through, this rule might not be for you. For publishable packages that install and test from their own package manifests, this rule catches missing local installs.

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