Available Rules
The --fix
option on the command line automatically fixes problems reported by rules which have a wrench 🔧 below.
The rules with the following star ⭐ are included in the plugin:yml/recommended
config.
YAML Rules
Rule ID | Description | Fixable | RECOMMENDED | STANDARD |
---|---|---|---|---|
yml/block-mapping-colon-indicator-newline | enforce consistent line breaks after : indicator | 🔧 | ||
yml/block-mapping-question-indicator-newline | enforce consistent line breaks after ? indicator | 🔧 | ⭐ | |
yml/block-mapping | require or disallow block style mappings. | 🔧 | ⭐ | |
yml/block-sequence-hyphen-indicator-newline | enforce consistent line breaks after - indicator | 🔧 | ⭐ | |
yml/block-sequence | require or disallow block style sequences. | 🔧 | ⭐ | |
yml/file-extension | enforce YAML file extension | |||
yml/indent | enforce consistent indentation | 🔧 | ⭐ | |
yml/key-name-casing | enforce naming convention to key names | |||
yml/no-empty-document | disallow empty document | ⭐ | ⭐ | |
yml/no-empty-key | disallow empty mapping keys | ⭐ | ⭐ | |
yml/no-empty-mapping-value | disallow empty mapping values | ⭐ | ⭐ | |
yml/no-empty-sequence-entry | disallow empty sequence entries | ⭐ | ⭐ | |
yml/no-tab-indent | disallow tabs for indentation. | ⭐ | ⭐ | |
yml/no-trailing-zeros | disallow trailing zeros for floats | 🔧 | ||
yml/plain-scalar | require or disallow plain style scalar. | 🔧 | ⭐ | |
yml/quotes | enforce the consistent use of either double, or single quotes | 🔧 | ⭐ | |
yml/require-string-key | disallow mapping keys other than strings | |||
yml/sort-keys | require mapping keys to be sorted | 🔧 | ||
yml/sort-sequence-values | require sequence values to be sorted | 🔧 | ||
yml/vue-custom-block/no-parsing-error | disallow parsing errors in Vue custom blocks | ⭐ | ⭐ |
Extension Rules
Rule ID | Description | Fixable | RECOMMENDED | STANDARD |
---|---|---|---|---|
yml/flow-mapping-curly-newline | enforce consistent line breaks inside braces | 🔧 | ⭐ | |
yml/flow-mapping-curly-spacing | enforce consistent spacing inside braces | 🔧 | ⭐ | |
yml/flow-sequence-bracket-newline | enforce linebreaks after opening and before closing flow sequence brackets | 🔧 | ⭐ | |
yml/flow-sequence-bracket-spacing | enforce consistent spacing inside flow sequence brackets | 🔧 | ⭐ | |
yml/key-spacing | enforce consistent spacing between keys and values in mapping pairs | 🔧 | ⭐ | |
yml/no-irregular-whitespace | disallow irregular whitespace | ⭐ | ⭐ | |
yml/no-multiple-empty-lines | disallow multiple empty lines | 🔧 | ||
yml/spaced-comment | enforce consistent spacing after the # in a comment | 🔧 | ⭐ |