SharePoint / SharePoint/spfx

Enable strictPeerDependencies in Rush with globalPeerDependencyRules for known upstream issues

Open
#77 0 comments 0 reactions 1 assignee View on GitHub

@iclanton is already working on this.

Since Mar 5, 2026.

area: tooling type: maintenance
Dominant language
TypeScript
Stars
32
Forks
18
PR merge metrics
No merged PRs in 30d

Description

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

  • #73 — Missing peer: swiper@^8.2.6 (from adaptivecards)
  • #74 — Missing peer: scheduler@>=0.19.0 (from @fluentui/react-context-selector)
  • #75 — Unmet peer: @microsoft/microsoft-graph-client@3.0.2 (version mismatch)
  • #76 — Unmet peer: @rushstack/heft@^0.71.1 (version mismatch in build rig)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.