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.
Examples
Section titled “Examples”{ "peerDependencies": { "typescript": "^5.0.0 || ^6.0.0" }}{ "peerDependencies": { "typescript": "^5.0.0 || ^6.0.0" }, "devDependencies": { "typescript": "^5.9.0" }}When Not To Use It
Section titled “When Not To Use It”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.