Normalize indentation and layout automatically.
Section: Linting and safe edits
Format YAML with Prettier
bash
bash
prettier --write config.yamlExplanation
Prettier helps reduce noisy diffs and keeps YAML files consistent across a repo.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Linting and safe edits
Reveal hidden whitespace
Print tabs and line endings to spot indentation issues.
Mixed indentation example
Illustrate a broken file caused by inconsistent nesting.