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] add option to specify target of return type #782
Comments
Why do you think this rule is redundant? Based on what you're asking for, it seems like you want to use our rule |
I understand the purpose of the rule, I also think we should ensure our functions to return the correct values. So, should I stop using the rule? No. I still have reason to use it. I want to use We can detect a change like types not My English may be unclear, please feel free to ask me detail. 🙏 |
I think I'm understanding you.
There isn't any case that it should be That shouldn't mean that you, as a consumer of the types, should just blindly use the
That belongs in a separate rule - I've opened #791. |
Oh, I forgot about
I read the issue. That solves my request more than expected 🚀. |
Repro
I request to add option for
explicit-function-return-type
.It is awesome rule, but I think it make a little redundant. What I want this rule at least is warning implicit any in return type.
Expected Result
(Result what I want)
eslint warns only:
myFunc0_0_1
myFunc1_0_1
myFunc2_0_1
Actual Result
(Current Result)
eslint warns only:
myFunc0_0_1
myFunc0_1_1
myFunc1_0_1
myFunc1_1_1
myFunc2_0_1
myFunc2_1_1
Additional Info
I'm not sure the option name
target
and value"any"
are the best.I'd like to discuss it.
Versions
@typescript-eslint/eslint-plugin
1.13.0
@typescript-eslint/parser
1.13.0
TypeScript
3.5.3
ESLint
6.1.0
node
10.15.3
npm
6.4.1
The text was updated successfully, but these errors were encountered: