mirror of
https://github.com/millionco/react-doctor.git
synced 2026-09-14 20:00:24 +08:00
905607f7fc
* fix: prevent stack overflow in function resolution with depth limiting Add depth limiting to resolveExactLocalFunction to prevent infinite recursion when resolving function references through deeply nested expressions, TypeScript path aliases, or complex import chains. The function now enforces a configurable depth limit (FUNCTION_RESOLUTION_MAX_DEPTH = 15) and returns null when exhausted rather than continuing to recurse. - Add FUNCTION_RESOLUTION_MAX_DEPTH constant (15 levels) - Thread remainingDepth parameter through all resolution helpers - Add unit tests for depth limiting - Add regression test for zustand + Next.js + path aliases case Closes #1657 Co-authored-by: Skosh <skoshx@users.noreply.github.com> * test: exercise function resolution stack guard * refactor: share function chain fixture builder * test: tighten function resolution regressions --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Skosh <skoshx@users.noreply.github.com> Co-authored-by: Aiden Bai <aiden.bai05@gmail.com>
6 lines
244 B
Markdown
6 lines
244 B
Markdown
---
|
|
"oxlint-plugin-react-doctor": patch
|
|
---
|
|
|
|
Prevent stack overflows while resolving deeply nested local function references. React Doctor now stops following a reference chain after a bounded number of steps instead of aborting the lint scan.
|