Skip to content

[explicit-function-return-type] Rule doesn't work with class arrow methods #348

Closed
@slikts

Description

@slikts

Repro

{
  "rules": {
    "@typescript-eslint/explicit-function-return-type": "error"
  }
}
export class Foo {
  bar() { return 123; } // Error
  baz = () => 123; // Missing error
}
export const foo = () => 123; // Error

Expected Result

Class arrow method with no return type annotation should be an error.

Actual Result

No error.

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 1.4.2
@typescript-eslint/parser 1.4.2
TypeScript 3.3.3
ESLint 5.14.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions