pretty-parallel
raw JSON → 1.0.2 verified Sat Apr 25 auth: no javascript
A CLI tool that wraps Prettier to format files in parallel, significantly speeding up formatting for large codebases. Currently at stable v1.0.2, with Prettier v3 as a peer dependency. It resolves Prettier config correctly and supports a --config flag. Differentiators from vanilla Prettier: uses worker threads for concurrency, easy to install globally, and reduces formatting time by utilizing all CPU cores.
Common errors
error Error: Cannot find module 'prettier' ↓
cause Prettier not installed as peer dependency.
fix
Run 'npm install prettier@^3.0.0' in your project.
error pretty-parallel: No files matched ↓
cause Glob pattern did not match any files.
fix
Ensure glob pattern is correct and quoted: pretty-parallel 'src/**/*.js'
error SyntaxError: Invalid or unexpected token ↓
cause Using an older Node.js version <16.13.0.
fix
Upgrade Node.js to v16.13.0 or later.
Warnings
gotcha Glob patterns must be quoted to prevent shell expansion. ↓
fix Use quotes around glob patterns: pretty-parallel 'src/**/*.js'
deprecated Uses worker threads; ensure Node.js version >=16.13.0. ↓
fix Upgrade Node.js to v16.13.0 or later.
gotcha Prettier config may not be picked up if --config flag is not used in some versions. ↓
fix Upgrade to v1.0.0+ or use --config flag.
breaking Prettier v2 config files are incompatible; peer dep requires Prettier v3. ↓
fix Migrate Prettier config to v3 format (e.g., use 'plugins' array).
Install
npm install pretty-parallel yarn add pretty-parallel pnpm add pretty-parallel Imports
- pretty-parallel (CLI) wrong
npm run pretty-parallelcorrectnpx pretty-parallel
Quickstart
npm install -g pretty-parallel
pretty-parallel 'src/**/*.js'