-
Notifications
You must be signed in to change notification settings - Fork 41
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
Consider enabling the allowExpressions
option for @typescript-eslint/explicit-function-return-type
#51
Labels
Comments
mrmckeb
added a commit
that referenced
this issue
Aug 29, 2023
…it-function-return-type` Resolves #51 BREAKING CHANGE: Types are no longer required in expressions (callbacks), as the parent will flag unexpected return types.
mrmckeb
added a commit
that referenced
this issue
Aug 29, 2023
…it-function-return-type` Resolves #51 BREAKING CHANGE: Types are no longer required in expressions (callbacks), as the parent will flag unexpected return types.
mrmckeb
added a commit
that referenced
this issue
Aug 29, 2023
…it-function-return-type` Resolves #51 BREAKING CHANGE: Types are no longer required in expressions (callbacks), as the parent will flag unexpected return types.
mrmckeb
added a commit
that referenced
this issue
Aug 29, 2023
…it-function-return-type` Resolves #51 BREAKING CHANGE: Types are no longer required in expressions (callbacks), as the parent will flag unexpected return types.
mrmckeb
added a commit
that referenced
this issue
Aug 29, 2023
…it-function-return-type` Resolves #51 BREAKING CHANGE: Types are no longer required in expressions (callbacks), as the parent will flag unexpected return types.
mrmckeb
added a commit
that referenced
this issue
Aug 29, 2023
…it-function-return-type` Resolves #51 BREAKING CHANGE: Types are no longer required in expressions (callbacks), as the parent will flag unexpected return types.
🎉 This PR is included in version 5.0.0 🎉 The release is available on: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After enabling the
@typescript-eslint/explicit-function-return-type
rule, we saw lot's of return types added within expressions that already have a required return type, for example:Typescript will catch this usually which makes the void return type redundant. The rule has this
allowExpressions
option that allows for not requiring return types in this example that we should look into enabling since it is false by default.The downside to this rule is it will allow you to skip specifying the return type in functions like
map
that you might want to only return a single type from.The text was updated successfully, but these errors were encountered: