emptyMappingKeys
Reports empty mapping keys.
✅ This rule is included in the yml logical
preset.
Empty keys are invalid in YAML and may cause parsers to reject the document or misinterpret its structure. Even if allowed by a parser, empty keys can be confusing for developers and lead to accidental mistakes in code.
Examples
Section titled “Examples”: "value"
"key": "value"
Options
Section titled “Options”This rule is not configurable.
Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
yml/no-empty-key
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.