Documentation
react-native-doctor-ci
Policy-as-code CI gate for React Native dependency health: fail pull requests that add abandoned, non-New-Architecture, or npm-deprecated dependencies, with inline annotations and an allowlist workflow.
Unmaintained dependencies are one of the most reported pains in React Native, and the New Architecture era raised the stakes: a package that was fine when it was added quietly stops getting releases, never gains New Architecture support, or gets deprecated on npm — and you find out during an upgrade, months after the PR that introduced it merged.
Lookup tools exist; the React Native Directory will tell you a
package's status if you go ask. rn-doctor is the missing enforcement half: a check that runs on
every pull request, fails when someone adds a dying dependency, and annotates the exact
package.json line — so the conversation happens at review time, when swapping the package costs
five minutes instead of a quarter.
npx --yes --package react-native-doctor-ci rn-doctor # check the current project
rn-doctor --changed-only --base origin/main # PR mode: only new/changed deps
rn-doctor --workspaces # monorepo: every workspace manifest
rn-doctor --json # stable machine-readable reportPure TypeScript, zero native code, one runtime dependency. Node >= 20.
What it checks
Each dependency is enriched in parallel from the npm registry (latest publish time, deprecation,
codegenConfig), the React Native Directory (New Architecture support, unmaintained flag), and
the GitHub API (archived state, last push). Six rules evaluate the result:
| Rule | Fires when | Default |
|---|---|---|
newArchitecture | Directory says the package does not support New Arch | error |
newArchUnknown | New Arch support is unknown (no data, no codegen) | warn |
lastPublish | Latest npm publish is older than the thresholds | warn 12mo / error 24mo |
githubArchived | The GitHub repository is archived | error |
npmDeprecated | The latest version is deprecated on npm | error |
directoryUnmaintained | The RN Directory flags the package as unmaintained | warn |
Missing data degrades honestly: no token or a rate limit means fields become unknown with a
warning — never a failed run, and never a fabricated verdict. Every finding carries an evidence
link so you can check the claim yourself.
Where to go next
- Getting started — run it locally in two minutes.
- GitHub Action — the recommended CI setup.
- Policy file — tune rules per repo with
.rn-doctor.yml.
Out of scope
Security/CVE auditing (npm audit and OSV exist), fixing or upgrading packages (findings suggest
npx expo install --fix or Renovate where relevant), and being a website — this is a CLI and a
CI gate, nothing more.
The source lives at github.com/AmrithVengalath/react-native-doctor-ci under the MIT license.