目录

@typescript-eslint/space-before-function-paren

Enforce consistent spacing before a function name and opening parenthesis.

  • By default, this rule requires a space between a function name and opening parenthesis. For any adjustments, see Options.
  • This rule is recommended for checking .ts files. To check .ets files, consider using @hw-stylistic/space-before-function-paren.

Rule Configuration

// code-linter.json5
{
  "rules": {
    "@typescript-eslint/space-before-function-paren": "error"
  }
}

Options

For details, see @typescript-eslint/space-before-function-paren.

Example of Correct Code

// By default, a space is required between foo and (.
export function foo () {
  // ...
}

Example of Incorrect Code

// By default, a space is required between foo and (.
export function foo() {
  // ...
}

Rule Set

plugin:@typescript-eslint/all

For details about how to configure Code Linter check rules, see Code Linter.