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
Better wording for the error reported by the rule "no-else-return" #6411
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
rule
Relates to ESLint's core rules
Comments
|
Hi @othomann, thanks for your issue! I think the wording you suggested would make things clearer. Would you be willing to work on a PR for this? |
|
Sure, I'll provide a PR for this today. |
othomann
added a commit
to othomann/eslint
that referenced
this issue
Jun 14, 2016
othomann
added a commit
to othomann/eslint
that referenced
this issue
Jun 14, 2016
…n" (fixes eslint#6411) Signed-off-by: Olivier Thomann <Olivier_Thomann@ca.ibm.com>
othomann
added a commit
to othomann/eslint
that referenced
this issue
Jun 14, 2016
…n" (fixes eslint#6411) Signed-off-by: Olivier Thomann <Olivier_Thomann@ca.ibm.com>
|
I think the PR is ready now. Let me know if you need anything else. |
|
Sounds reasonable to me. @pedrottimark could you take a look? |
|
👍 The current rule doc votes in favor of the change:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
rule
Relates to ESLint's core rules
What version are you using?
Latest.
What did you do?
When enabling the rule "no-else-return", the error message states:
"Unexpected 'else' after 'return'."
What did you expect to happen?
I would suggest to replace "Unexpected" with "Unnecessary" as the code is perfectly legit, but it is not necessary to have an else. So the new message would be:
"Unnecessary 'else' after 'return'."
The text was updated successfully, but these errors were encountered: