Comfy-Org / Comfy-Org/ComfyUI_frontend
lint-staged repeats repository-wide checks for each chunk on large merge commits
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 704
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 512
Description
## Problem
A large merge commit causes `lint-staged.config.ts` to schedule `pnpm lint` separately for each staged-file chunk. Those commands each lint the entire repository, so argument chunking does not bound the expensive work and can run duplicate full scans concurrently.
## Evidence
Observed while integrating main `dab829a54b` into #16177 on macOS arm64, Node 26.8.2 / pnpm 11.13.1. The normal pre-commit output reports two 669-file task groups and two `[STARTED] pnpm lint` entries after separate formatter chunks. Both commands are identical repository-wide checks. No hook was disabled.
`lintCommands()` selects `pnpm lint` whenever the chunk has more than 10 code/style files. `typecheckCommands()` also returns repository-wide checks from the per-chunk configuration; verify and deduplicate those as part of the fix.
## Expected result
Run applicable repository-wide gates once per commit, while retaining safe argument chunking for file-scoped formatting/lint. Preserve every required gate and the failure exit status. Validate the command plan with a staged-file set large enough to cross the chunk threshold.
Related: #14788 discussed lint coverage and large-merge resource pressure. This issue specifically tracks repeated repository-wide scheduling; it is deferred from the Agent consent PR to keep that change scoped.
Contributor guide
Research direction
Start in lint-staged.config.ts, tracing lintCommands() and typecheckCommands() for a staged-file set large enough to cross the chunk threshold. Validate the command plan against the reported duplicate pnpm lint entries, then confirm repository-wide gates run once, file-scoped checks remain chunked, and failures preserve their exit status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100