requireSpacesInFunctionExpression

Requires space before () or {} in function expressions (both named and anonymous).

Type: Object

Values: "beforeOpeningRoundBrace" and "beforeOpeningCurlyBrace" as child properties. Child properties must be set to true.

Example

"requireSpacesInFunctionExpression": {
    "beforeOpeningRoundBrace": true,
    "beforeOpeningCurlyBrace": true
}
Valid
var x = function () {};
var x = function a () {};
var x = async function () {};
var x = async function a () {};
Invalid
var x = function() {};
var x = function (){};
var x = function(){};
var x = function a() {};
var x = function a (){};
var x = function a(){};
var x = function async a() {};
var x = function async a (){};
var x = function async a(){};
Rule source
Test source