CalcSnippets Search
JavaScript 1 min read

`prettier --write` Is the Formatting Command You Run When Style Noise Is Hiding the Real Code Review Conversation

A practical guide to `prettier --write` for applying consistent formatting automatically so code review can focus on behavior and design instead of spacing and line wrapping arguments.

Why this command matters: code review quality drops fast when half the diff is style churn that could have been fixed automatically before anyone looked at it.

Prettier exists to make formatting boring on purpose. prettier --write applies that boring consistency directly to files, which is often the cleanest way to remove style-only noise from a branch.

The command

npx prettier --write .

Or more narrowly:

npx prettier --write "src/**/*.{js,ts,tsx,json,md}"

That rewrites matching files using the project’s Prettier configuration.

Why it helps

It is especially useful when:

  1. a branch has accumulated style drift
  2. multiple contributors touched files with different editor settings
  3. generated style churn is overwhelming review
  4. you want CI formatting checks to stop failing for trivial reasons

Formatting is not the hard part of software work, so it makes sense to automate it aggressively.

Final recommendation

If formatting noise is crowding out the real engineering discussion, run prettier --write before review. It is still one of the simplest ways to turn style debates back into product and code-quality discussions.

Sources

Keep reading

Related guides