ota-meshi / eslint-plugin-yml

This ESLint plugin provides linting rules for YAML.
https://ota-meshi.github.io/eslint-plugin-yml/
MIT License
121 stars 13 forks source link

Add rule for disallowing boolean keys #280

Open DanaKirsh opened 11 months ago

DanaKirsh commented 11 months ago

Our software uses yaml files that are then processed by a third party which can't handle boolean yaml keys properly.

It would be helpful to have a rule that disallows boolean yaml keys:

y|Y|yes|Yes|YES|n|N|no|No|NO
|true|True|TRUE|false|False|FALSE
|on|On|ON|off|Off|OFF

https://yaml.org/type/bool.html

ota-meshi commented 11 months ago

Thanks for the rule suggestion! That rule sounds good to me. I think the rule should only be enabled if the YAML document version is 1.1.