Skip to content

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 IDDescriptionFixableRECOMMENDEDSTANDARD
yml/block-mapping-colon-indicator-newlineenforce consistent line breaks after : indicator🔧
yml/block-mapping-question-indicator-newlineenforce consistent line breaks after ? indicator🔧
yml/block-mappingrequire or disallow block style mappings.🔧
yml/block-sequence-hyphen-indicator-newlineenforce consistent line breaks after - indicator🔧
yml/block-sequencerequire or disallow block style sequences.🔧
yml/file-extensionenforce YAML file extension
yml/indentenforce consistent indentation🔧
yml/key-name-casingenforce naming convention to key names
yml/no-empty-documentdisallow empty document
yml/no-empty-keydisallow empty mapping keys
yml/no-empty-mapping-valuedisallow empty mapping values
yml/no-empty-sequence-entrydisallow empty sequence entries
yml/no-tab-indentdisallow tabs for indentation.
yml/no-trailing-zerosdisallow trailing zeros for floats🔧
yml/plain-scalarrequire or disallow plain style scalar.🔧
yml/quotesenforce the consistent use of either double, or single quotes🔧
yml/require-string-keydisallow mapping keys other than strings
yml/sort-keysrequire mapping keys to be sorted🔧
yml/sort-sequence-valuesrequire sequence values to be sorted🔧
yml/vue-custom-block/no-parsing-errordisallow parsing errors in Vue custom blocks

Extension Rules

Rule IDDescriptionFixableRECOMMENDEDSTANDARD
yml/flow-mapping-curly-newlineenforce consistent line breaks inside braces🔧
yml/flow-mapping-curly-spacingenforce consistent spacing inside braces🔧
yml/flow-sequence-bracket-newlineenforce linebreaks after opening and before closing flow sequence brackets🔧
yml/flow-sequence-bracket-spacingenforce consistent spacing inside flow sequence brackets🔧
yml/key-spacingenforce consistent spacing between keys and values in mapping pairs🔧
yml/no-irregular-whitespacedisallow irregular whitespace
yml/no-multiple-empty-linesdisallow multiple empty lines🔧
yml/spaced-commentenforce consistent spacing after the # in a comment🔧