space-in-parens (ESLint: space-in-parens)
require or disallow spaces inside parentheses
This rule will enforce consistency of spacing directly inside of parentheses, by disallowing or requiring one or more spaces to the right of (and to the left of). In either case, () will still be allowed.
There are two options for this rule:
"never"
(default) enforces zero spaces inside of parentheses"always"
enforces a space inside of parentheses
Depending on your coding conventions, you can choose either option by specifying it in your configuration.
"space-in-parens": [true, "always"]
"space-in-parens": [true, "never"]
"space-in-parens": [true, "always", { "exceptions": [ "{}", "[]", "()", "empty" ] }]
{
"type": "array",
"items": [
{
"enum": [
"always",
"never"
]
},
{
"type": "object",
"properties": {
"exceptions": {
"type": "array",
"items": [
{
"enum": [
"{}",
"[]",
"()",
"empty"
]
}
],
"uniqueItems": true
}
},
"additionalProperties": false
}
],
"minItems": 0,
"maxItems": 2
}