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.
What a formatting command should buy you
Section titled “What a formatting command should buy you”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.
How to use it well
Section titled “How to use it well”The best pattern is:
- use
riot fmtas 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.
When formatting becomes high leverage
Section titled “When formatting becomes high leverage”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.