emptyMappingKeys
Reports empty mapping keys.
✅ This rule is included in the yaml logicalpresets.
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
