cli
cli copied to clipboard
Run ESLint in parallel for multiple Nx projects
User story
For large Nx monorepos, it could help speed up Code PushUp runs if ESLint could run on different projects in parallel instead of sequentially. Adding an option to enable parallel execution, and even set the max number of processes, would give Code PushUp users more flexibility to optimize for performance. A lot like Nx's --parallel
flag.
Acceptance criteria
- [ ] new
parallel?: boolean | number
option is added toeslintPlugin
initializer - [ ] default is to lint projects sequentially - so effective default is
parallel: false
- [ ] if an integer is specified (e.g.
parallel: 4
), then projects are chunked by this max value- [ ] within each chunk, processes are executed in parallel using
Promise.all
andexecuteProcess
- [ ] chunks are executed sequentially
- [ ] within each chunk, processes are executed in parallel using
- [ ]
parallel: true
enables parallel execution with maximum set toos.cpus().length
- [ ] for future reusability, a generic function which orchestrates this sequential/parallel process execution is exported from
@code-pushup/utils
- [ ] test performance impact on some large Nx monorepos
- [ ] document usage in
@code-pushup/eslint-plugin
Implementation details
No response