objectCurlySpacingRule.md
July 20, 2018 ยท View on GitHub
object-curly-spacing (ESLint: object-curly-spacing)
require or disallow padding inside curly braces
Config
This rule takes one optional argument, an object which may include any of the following properties:
"arraysInObjects"(defaulttrueif rule is set to"always", otherwise defaultfalse) When set totrue, this option requires a space inside of braces ending with an array literal. When set tofalse, this option requires no space inside of braces ending with an array literal."objectsInObjects"(defaulttrueif rule is set to"always", otherwise defaultfalse) When set totrue, this option requires a space inside of braces ending with an object literal, or object destructuring. When set tofalse, this option requires no space inside of braces ending with an object literal, or object destructuring.
Examples
"object-curly-spacing": [true, "always"]
"object-curly-spacing": [true, "never"]
"object-curly-spacing": [true, "always", {"arraysInObjects": false, "objectsInObjects": false}]
Schema
{
"type": "array",
"items": [
{
"type": "object",
"properties": {
"arraysInObjects": {
"type": "boolean"
},
"objectsInObjects": {
"type": "boolean"
}
},
"additionalProperties": false
}
],
"maxLength": 1
}