yarn dlx prettier --write .

Category: Node.js & npm/yarn

yarn dlx prettier --write .

Run a tool without installing it

Downloads prettier into a temporary environment and formats the current directory, leaving package.json untouched. yarn dlx is the Berry equivalent of npx for one-off tools. Use -p to run a binary from a differently named package.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.