object-curly-spacing (ESLint: object-curly-spacing)
require or disallow padding inside curly braces
This rule takes one optional argument, an object which may include any of the following properties:
"arraysInObjects"
(defaulttrue
if 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"
(defaulttrue
if 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.
"object-curly-spacing": [true, "always"]
"object-curly-spacing": [true, "never"]
"object-curly-spacing": [true, "always", {"arraysInObjects": false, "objectsInObjects": false}]
{
"type": "array",
"items": [
{
"type": "object",
"properties": {
"arraysInObjects": {
"type": "boolean"
},
"objectsInObjects": {
"type": "boolean"
}
},
"additionalProperties": false
}
],
"maxLength": 1
}