yml/block-mapping
require or disallow block style mappings.
- ⚙️ This rule is included in
"plugin:yml/standard"
. - 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
📖 Rule Details
This rule aims to use consistent style of block or flow styles.
🔧 Options
yaml
yml/block-mapping:
- error
- always # or "never"
---
# or
yml/block-mapping:
- error
- singleline: always # or "never" or "ignore"
multiline: always # or "never" or "ignore"
Styles
"always"
... Enforce the use of block style mappings."never"
... Disallow the use of block style mappings."ignore"
... Does not apply consistent style.
Properties
- As a string ... Specify the style you want to apply to mappings.
"singleline"
... Specify the style you want to apply when the mapping is single-line. default"ignore"
"multiline"
... Specify the style you want to apply when the mapping is multi-line. default"always"
"always"
"never"
👫 Related rules
🚀 Version
This rule was introduced in eslint-plugin-yml v0.1.0