npx prettier --write .

Category: Node.js & npm/yarn

npx prettier --write .

Auto-format all files in the project with Prettier without a global install required

Reformats every file in the project to match Prettier's style rules. A quick way to standardize code style without a global install.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.