Comfy-Org / Comfy-Org/ComfyUI_frontend
Refine watchEffect rendering rule scope and synchronous-call detection
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
- Narrow rule to canvas rendering.
- Detect synchronous nested execution.
- Follow-up to approved PR #15980.
Full context for agent readers
Source comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/15980#discussion_r3867993722
## Scope
Refine `tools/oxlint-plugins/watchEffectRendering.ts` so the custom Oxlint rule enforces the documented canvas invariant rather than matching every property named `draw` or `setDirty`. Cover provably synchronous nested execution such as an immediately invoked function expression inside a `watchEffect` callback.
## Acceptance criteria
- Unrelated APIs such as `watchEffect(() => renderer.draw())` are not reported.
- Canvas `draw()` and `setDirty()` calls executed synchronously during `watchEffect` dependency collection are reported.
- Direct calls and synchronous nested/IIFE calls have focused valid/invalid fixtures.
- Existing rule integration remains enabled and green.
## Why deferred
DrJKL explicitly approved commit `877397f4165917c951b0527ad02e9bd5a2ce01ec` and described this as one of three follow-up comments. The current rule still provides the intended guardrail; tightening its static-analysis boundary is useful but not a merge blocker and would expand the approved PR's scope.
Contributor guide
Research direction
Start with tools/oxlint-plugins/watchEffectRendering.ts and read the linked discussion in approved PR #15980 for the intended canvas invariant. Inspect the rule's existing integration and fixtures, then run them before covering direct and synchronous nested/IIFE calls. Done means unrelated renderer.draw() calls are valid, canvas draw() and setDirty() calls during dependency collection are reported, and integration remains green.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100