Skip to content

fix(core): resolve local Expo Metro config wrappers - #1718

Merged
aidenybai merged 2 commits into
mainfrom
cursor/triage-1715-14e5
Aug 30, 2026
Merged

fix(core): resolve local Expo Metro config wrappers#1718
aidenybai merged 2 commits into
mainfrom
cursor/triage-1715-14e5

Conversation

@skoshx

@skoshx skoshx commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Why

expo-metro-config only read the root Metro config. It reported a false positive when that file delegated to a local helper that imported expo/metro-config, including the reproduction in #1715.

Before: any local helper hid the valid Expo signal from the check.

After: the check follows statically resolvable runtime imports inside the project and reports only when the reachable config graph has no Expo signal.

What changed

  • Extract static module-specifier collection for reuse.
  • Follow relative Metro config imports with cycle protection and a bounded, fail-open scan.
  • Ignore type-only imports when building the runtime config graph.
  • Recognize the verified posthog-react-native/metro Expo wrapper.
  • Add positive and negative regressions for local helpers, PostHog, type-only imports, and cycles.
  • Add a patch changeset for @react-doctor/core.

Test plan

  • nr test
  • nr lint
  • nr typecheck
  • nr format:check
  • nr build
  • nr smoke:json-report
  • REACT_DOCTOR_NO_TELEMETRY=1 nlx react-doctor@latest --verbose --scope changed — 100/100

RDE was not run because this is a core Expo project check, not an Oxlint rule.

Closes #1715

Co-authored-by: Skosh <skoshx@users.noreply.github.com>
@pkg-pr-new

pkg-pr-new Bot commented Aug 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/eslint-plugin-react-doctor@1718
npm i https://pkg.pr.new/oxlint-plugin-react-doctor@1718
npm i https://pkg.pr.new/react-doctor@1718

commit: 9784017

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Interactive terminal E2E

Terminal Control verified the built CLI at 9784017 in a real PTY:

  • selected a project interactively and observed Scanning... before the three-second Git delay completed
  • waited for the clean result and exercised the compact report
  • opened copy context and the GitHub Actions confirmation, then cancelled safely

Download the edited MP4 and PNG evidence

@skoshx
skoshx marked this pull request as ready for review August 30, 2026 04:25
@aidenybai aidenybai changed the title fix(expo): handle relative imports in metro config check fix(core): resolve local Expo Metro config wrappers Aug 30, 2026
@aidenybai
aidenybai merged commit 990daaf into main Aug 30, 2026
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

expo-metro-config: false positive when expo/metro-config is reached through a wrapper instead of required directly

3 participants