Skip to content

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.

name:
config:
host:
port: 8080

This rule is not configurable.

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.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.