When formatting a function, whitespace is allowed between the function name or function
keyword and the opening parenthesis. Named functions also require a space between the function
keyword and the function name, but anonymous functions require no whitespace. For example:
function withoutSpace(x) {
// ...
}
function withSpace (x) {
// ...
}
var anonymousWithoutSpace = function() {};
var anonymousWithSpace = function () {};
Style guides may require a space after the function
keyword for anonymous functions, while others specify no whitespace. Similarly, the space after a function name may or may not be required.
This rule extends the base eslint/space-before-function-paren
rule.
It supports all options and features of the base rule.
This version adds support for generic type parameters on function calls.
{
// note you must disable the base rule as it can report incorrect errors
"space-before-function-paren": "off",
"@typescript-eslint/space-before-function-paren": ["error"]
}
See eslint/space-before-function-paren
options.
Taken with ❤️ from ESLint core