Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
slikts opened this issue Mar 11, 2019 · 0 comments · Fixed by #377
Closed

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

slikts opened this issue Mar 11, 2019 · 0 comments · Fixed by #377
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@slikts
Copy link

slikts commented Mar 11, 2019

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
@slikts slikts added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Mar 11, 2019
@bradzacher bradzacher added bug Something isn't working and removed triage Waiting for team members to take a look labels Mar 11, 2019
bradzacher pushed a commit that referenced this issue Mar 27, 2019
@typescript-eslint typescript-eslint locked as resolved and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants