Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[space-before-function-paren] this rule to abstract function not work #2192

Closed
@adrielcodeco

Description

@adrielcodeco

Can anyone help to understand?
Im using vscode with eslint extension and the space-before-function-paren rule is not working for the abstract function

with this example code:

export abstract class CLASS {
  abstract ABSTRACT_FUNCTION(): void // not working here
  FUNCTION(): void { // working here
    // nothing
  }
}

with this config:
.eslintrc

{
  "root": true,
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "project": "./tsconfig.json"
  },
  "plugins": ["@typescript-eslint", "jest"],
  "extends": [
    "plugin:jest/recommended",
    "plugin:@typescript-eslint/recommended",
    "standard-with-typescript"
  ],
  "env": {
    "jest/globals": true
  },
  "rules": {
    "space-before-function-paren": "off",
    "@typescript-eslint/space-before-function-paren": ["error", "always"]
  }
}

Expected Result
warn and fix space between function name and the opening paren

Actual Result
for abstract functions the behavior not working

Versions

package version
@typescript-eslint/eslint-plugin 3.2.0
@typescript-eslint/parser 3.2.0
TypeScript 3.9.5
ESLint 7.2.0
node 14.4.0
npm 6.14.5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions