Skip to content

Enable strictPeerDependencies in Rush with globalPeerDependencyRules for known upstream issues #77

@nick-pape

Description

@nick-pape

Summary

The Rush pnpm-config.json currently has strictPeerDependencies: false to work around upstream peer dependency issues in Microsoft's SPFx packages. This should be changed to strictPeerDependencies: true with appropriate globalPeerDependencyRules to suppress the known upstream issues, so that any new peer dependency problems are caught immediately.

Current State

In common/config/rush/pnpm-config.json:

"strictPeerDependencies": false,

This silently ignores all peer dependency issues, including any new ones introduced by future dependency changes.

Proposed Change

Enable strict peer dependencies and add rules to suppress the known upstream issues:

"strictPeerDependencies": true,

"globalPeerDependencyRules": {
  "ignoreMissing": [
    "swiper",
    "scheduler",
    "@microsoft/microsoft-graph-client"
  ],
  "allowedVersions": {
    "@rushstack/heft": ">=0.71.1"
  }
}

Why This Matters

With strictPeerDependencies: false, any new unmet peer dependency introduced by a dependency upgrade will be silently ignored. This can lead to:

  • Runtime errors that are hard to diagnose
  • Version conflicts that go unnoticed
  • Subtle bugs from incompatible dependency versions

With strictPeerDependencies: true + targeted suppression rules, the known upstream issues are documented and suppressed, while any new peer dependency problems will cause rush update to fail — catching issues early.

Related Issues

Metadata

Metadata

Assignees

Labels

area: toolingBuild config, ESLint, Rush, Heft, test setuptype: maintenanceNice-to-have repo hygiene

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions