What the formatter normalises
- Indentation to 2 or 4 spaces at every level.
- Extra spaces after colons and inside flow collections.
- Unnecessary quotes around plain strings.
Comments and document separators (---) are preserved. The file is parsed first, so an invalid file is reported with its line instead of being reformatted wrongly.