react-native doctor reports a large amount of false positive unused-file warnings when using expo-router.
Files inside the app/ directory are detected as unused even though they are valid routes automatically discovered by Expo Router.
Example warnings:
⚠ deslop/unused-file
Unused file — not reachable from any entry point
src/app/(tabs)/_layout.tsx
src/app/(tabs)/accueil.tsx
src/app/(tabs)/assistance.tsx
src/app/_layout.tsx
Expected behavior
Files used by Expo Router's file-based routing system should not be reported as unused.
Actual behavior
The doctor only seems to analyze explicit imports and does not recognize Expo Router route discovery.
Additional context
Expo Router relies on filesystem conventions instead of direct imports, so route files are intentionally not imported manually.
react-native doctorreports a large amount of false positiveunused-filewarnings when usingexpo-router.Files inside the
app/directory are detected as unused even though they are valid routes automatically discovered by Expo Router.Example warnings:
Expected behavior
Files used by Expo Router's file-based routing system should not be reported as unused.
Actual behavior
The doctor only seems to analyze explicit imports and does not recognize Expo Router route discovery.
Additional context
Expo Router relies on filesystem conventions instead of direct imports, so route files are intentionally not imported manually.