emptyMappingValues
Reports empty mapping values.
✅ This rule is included in the yaml logical presets.
Empty values in YAML mappings can lead to unexpected runtime behavior.
Parsers may interpret them as null, empty strings, or other values depending on the implementation.
If an empty value is intentional, use an explicit null to clarify intent.
Examples
Section titled “Examples”name:config: host: port: 8080name: nullname: ""config: host: localhost port: 8080Options
Section titled “Options”This rule is not configurable.
When Not To Use It
Section titled “When Not To Use It”If your project intentionally uses empty mapping values to represent null values and you have consistent parser behavior, you may not need this rule. Projects with established conventions around implicit null values in YAML may also choose to disable this rule.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
yml/no-empty-mapping-value
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.