disallowSpacesInsideParenthesizedExpression

Disallows space after opening and before closing grouping parentheses.

Types: Boolean or Object

Values:

  • true: always disallow spaces inside grouping parentheses
  • Object:
    • "allExcept": [ "{", "}", "function" ] Ignore parenthesized objects and functions

Example

"disallowSpacesInsideParenthesizedExpression": true

// or

"disallowSpacesInsideParenthesizedExpression": {
    "allExcept": [ "{", "}" ]
}
Valid for mode true
var x = (1 + obj.size) * (2);
Valid for mode { allExcept": [ "{", "}", "function" ] }
var x = (options || { x: true } ).x;
var global = ( function() { return this; } )();
Invalid
var x = ( 1 + obj.size ) * ( 2 );
Rule source
Test source