yml/flow-mapping-curly-spacing
enforce consistent spacing inside braces
- ⚙️ This rule is included in
configs.standard. - 🔧 The
--fixoption on the command line can automatically fix some of the problems reported by this rule.
📖 Rule Details
This rule enforces consistent spacing inside braces of flow mappings.
🔧 Options
yaml
yml/flow-mapping-curly-spacing:
- error
- always # or "never"
- arraysInObjects: false
objectsInObjects: false
emptyObjects: ignoreThis rule has two options, a string option and an object option.
First option:
"never"(default) disallows spacing inside of braces"always"requires spacing inside of braces (except{})
Second option:
"arraysInObjects"control spacing inside of braces of mappings beginning and/or ending with a sequence element.truerequires spacing inside of braces of mappings beginning and/or ending with a sequence element (applies when the first option is set tonever)falsedisallows spacing inside of braces of mappings beginning and/or ending with a sequence element (applies when the first option is set toalways)
"objectsInObjects"control spacing inside of braces of mappings beginning and/or ending with a mapping element.truerequires spacing inside of braces of mappings beginning and/or ending with a mapping element (applies when the first option is set tonever)falsedisallows spacing inside of braces of mappings beginning and/or ending with a mapping element (applies when the first option is set toalways)
"emptyObjects"control spacing within empty mappings."ignore"(default) do not check spacing in empty mappings."always"require a space in empty mappings."never"disallow spaces in empty mappings.
These options are almost identical to those of the @stylistic/object-curly-spacing rule. See the @stylistic/object-curly-spacing options for details.
👫 Related rules
🚀 Version
This rule was introduced in eslint-plugin-yml v0.1.0
🔍 Implementation
Taken with ❤️ from ESLint core