Commit aa04fda
fix(react-doctor): fix 3 bugs, resolve AGENTS.md violations, upgrade oxc
Bugs fixed:
- tanstackStartRedirectInTryCatch: was using node.parent which oxlint JS
plugins don't populate — rule never fired. Rewrote to use ThrowStatement
visitor with tryCatchDepth tracking (matches existing nextjs pattern)
- tanstackStartServerFnValidateInput: fragile chain-walking logic with
potential infinite loop. Extracted shared walkServerFnChain() helper,
removed unused serverFnChains variable
- tanstackStartNoNavigateInRender: componentDepth never decremented for
arrow components (no VariableDeclarator:exit), eventHandlerDepth was
declared but never modified. Removed dead variable, simplified
AGENTS.md violations fixed:
- Removed unused hasDirective import
- Moved SEQUENTIAL_AWAIT_THRESHOLD_FOR_LOADER to constants.ts
- Moved TANSTACK_REDIRECT_FUNCTIONS to constants.ts
- Moved TANSTACK_SERVER_FN_FILE_PATTERN to constants.ts
- Replaced inline /^[A-Z]/ with existing UPPERCASE_PATTERN constant
- Replaced duplicate MUTATION_CALLEE_NAMES with existing MUTATION_METHOD_NAMES
- Removed 'as string' type cast, replaced with typeof guard
Upgraded oxc:
- oxlint: 1.59.0 → 1.60.0
- oxfmt: 0.44.0 → 0.45.0
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>1 parent 34b7828 commit aa04fda
5 files changed
Lines changed: 304 additions & 337 deletions
File tree
- packages/react-doctor
- src/plugin
- rules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
213 | 219 | | |
214 | 220 | | |
215 | 221 | | |
| |||
0 commit comments