app:
name: Cheatsheet.today
seo:
enabled: trueTwo spaces is the most common convention and works well across teams.
Indentation patterns, nested lists and maps, and practical commands for catching whitespace and structure mistakes.
Examples that show what valid nesting looks like and how structure changes.
app:
name: Cheatsheet.today
seo:
enabled: trueTwo spaces is the most common convention and works well across teams.
app:
name: Cheatsheet.today
seo:
enabled: trueEven one extra space can change meaning or break parsing altogether.
services:
- api
- web
- workerList items should align consistently under the key they belong to.
users:
- name: Jonathan
role: admin
- name: Sarah
role: editorA common pattern for config, deployments, pipelines, and API fixtures.
Commands that reduce indentation errors before they hit production.
yamllint -d '{extends: default, rules: {line-length: disable}}' config.yamlHelpful when you want structural checks without enforcing every style rule.
sed -n 'l' config.yamlUseful when a file looks correct but still fails because of hidden whitespace or tabs.
grep -nP '\t' config.yamlYAML should use spaces, not tabs, for indentation.
prettier --write config.yamlPrettier helps reduce noisy diffs and keeps YAML files consistent across a repo.