Skip to content
Riot Docs

Search is only available in production builds. Try building and previewing the site to test it out locally.

Install Riot GitHub

riot fmt

Formatting is one of the places where a toolchain either creates calm or creates churn.

riot fmt exists so formatting becomes:

  • consistent
  • automatable
  • review-friendly

instead of a team argument.

It should buy you:

  • smaller diffs
  • less style noise in code review
  • one source of truth for editor formatting

If the formatter path is ambiguous, editors and CI will drift apart quickly.

The best pattern is:

  • use riot fmt as the canonical formatter
  • wire the editor to the same formatter behavior
  • avoid package-local formatting exceptions unless absolutely necessary

That way, a formatted file means the same thing everywhere.

Formatting feels small until the workspace gets large. Then it becomes one of the strongest ways to keep the codebase legible and review friction low.

That is why it deserves first-class docs, not a throwaway mention.