A fork of Prettier (opinionated code formatter) maintained by Automattic. Adds a `--paren-spacing` command line option that inserts extra spaces inside parentheses, matching the formatting style used in projects like Calypso and Gutenberg. Current stable version is 3.0.3, based on Prettier 3.x. Released on demand when new Prettier versions are rebased; versioning uses alpha/beta suffixes (e.g., 2.0.5-beta-1). Supports JavaScript, TypeScript, CSS, HTML, JSON, Markdown, YAML, GraphQL, and more. Alternative to upstream Prettier for WordPress ecosystem projects.
npm install wp-prettierVerified import paths — ran on the pinned version, not inferred.
Demonstrates programmatic usage of wp-prettier with the custom `parenSpacing` option to format JavaScript code with extra spaces inside parentheses.
Run `npm i --save-dev 'prettier@npm:wp-prettier@latest'` instead of `npm i wp-prettier`.
Upgrade to Node.js 14 or later.
Update scripts to use the newer CLI syntax; review Prettier 3 migration guide.
Use exact versions or pin to a specific release to avoid unexpected alpha/beta updates.
Use wp-prettier alias with `parenSpacing: true` in config or CLI flag `--paren-spacing`.
Install with alias: `npm i --save-dev 'prettier@npm:wp-prettier@latest'` and then import from 'prettier'.
Ensure you are using the wp-prettier fork: verify package.json has `"prettier": "npm:wp-prettier@^3.0.0"`.
Add `--paren-spacing` flag or set `parenSpacing: true` in config; note that it only affects JavaScript/TypeScript/JSX parsers.
No dependency data recorded yet.