Pre-flight Checks
Problem Description
apps/mobile/doctor.config.ts currently has ~40 rule exceptions across 4 files — the core screens of the app:
experiences.tsx
explore.tsx
track-detail-view.tsx
track-map.tsx
These aren't false positives. They're documented technical debt masking 5 structural anti-patterns:
| Exempted Rule |
What It Masks |
set-state-in-effect |
Data fetching lives in useEffect instead of a custom hook |
prefer-useReducer |
Multiple independent useState calls that should be a reducer |
no-initialize-state |
State initialized from props without key sync |
no-giant-component |
These screens are too large |
react-compiler |
React Compiler can't optimize these components |
Proposed Solution
Refactor each screen to eliminate the exceptions systematically:
- Extract data fetching — Move
useEffect fetch patterns into a custom hook (e.g., useExperiences, useTrack). This kills set-state-in-effect.
- Group state into reducers — Replace multiple
useState combos with useReducer. This kills prefer-useReducer and no-initialize-state.
- Split giant components — Break each screen into smaller, focused sub-components. This kills
no-giant-component.
- React Compiler auto-fixes — Steps 1-2-3 naturally unblock the compiler.
Affected Area
Code quality / linting
Alternatives Considered
Keeping the exceptions indefinitely — but they're a growing source of false negatives and block React Compiler adoption.
Additional Context
File with all exceptions: apps/mobile/doctor.config.ts
The react-compiler exception is partially justified by try/finally in async data functions (a known compiler limitation), but the other 3 rules have no technical blocker — they need refactoring.
Pre-flight Checks
Problem Description
apps/mobile/doctor.config.tscurrently has ~40 rule exceptions across 4 files — the core screens of the app:experiences.tsxexplore.tsxtrack-detail-view.tsxtrack-map.tsxThese aren't false positives. They're documented technical debt masking 5 structural anti-patterns:
set-state-in-effectuseEffectinstead of a custom hookprefer-useReduceruseStatecalls that should be a reducerno-initialize-stateno-giant-componentreact-compilerProposed Solution
Refactor each screen to eliminate the exceptions systematically:
useEffectfetch patterns into a custom hook (e.g.,useExperiences,useTrack). This killsset-state-in-effect.useStatecombos withuseReducer. This killsprefer-useReducerandno-initialize-state.no-giant-component.Affected Area
Code quality / linting
Alternatives Considered
Keeping the exceptions indefinitely — but they're a growing source of false negatives and block React Compiler adoption.
Additional Context
File with all exceptions:
apps/mobile/doctor.config.tsThe
react-compilerexception is partially justified bytry/finallyin async data functions (a known compiler limitation), but the other 3 rules have no technical blocker — they need refactoring.