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] allowTypedFunctionExpressions flag should ignore class methods written as arrow functions #484

Closed
ayush000 opened this issue Apr 28, 2019 · 0 comments · Fixed by #502
Labels
bug Something isn't working has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@ayush000
Copy link

ayush000 commented Apr 28, 2019

Repro

"rules": {
    "@typescript-eslint/explicit-function-return-type": [1, {
      "allowTypedFunctionExpressions": true
    }]
  },
type MethodType = () => void;

class App {
  private method: MethodType = () => {}
}

Expected Result
The explicit-function-return-type rule (with allowTypedFunctionExpressions=true) should not complain/be triggered by the code above.

Actual Result
I get the warning "Missing return type on function." for the private method

Versions

package version
@typescript-eslint/eslint-plugin 1.7.0
@typescript-eslint/parser 1.7.0
TypeScript 3.4.5
ESLint 5.16.0
node 12.0.0
yarn 1.15.2
@ayush000 ayush000 added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Apr 28, 2019
@j-f1 j-f1 added bug Something isn't working and removed triage Waiting for maintainers to take a look labels Apr 29, 2019
@bradzacher bradzacher added the has pr there is a PR raised to close this label May 8, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 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 has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
3 participants