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

Better wording for the error reported by the rule "no-else-return" #6411

Closed
othomann opened this issue Jun 14, 2016 · 5 comments
Closed

Better wording for the error reported by the rule "no-else-return" #6411

othomann opened this issue Jun 14, 2016 · 5 comments
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

@othomann
Copy link
Contributor

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'."

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Jun 14, 2016
@vitorbal vitorbal added enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Jun 14, 2016
@vitorbal
Copy link
Member

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?

@othomann
Copy link
Contributor Author

Sure, I'll provide a PR for this today.

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>
@othomann
Copy link
Contributor Author

I think the PR is ready now. Let me know if you need anything else.

@ilyavolodin
Copy link
Member

Sounds reasonable to me. @pedrottimark could you take a look?

@ilyavolodin ilyavolodin added the rule Relates to ESLint's core rules label Jun 15, 2016
@pedrottimark
Copy link
Member

👍 The current rule doc votes in favor of the change:

  • 2 occurrences of unnecessary
  • 0 occurrences of unexpected

@ilyavolodin ilyavolodin added accepted There is consensus among the team that this change meets the criteria for inclusion and removed enhancement This change enhances an existing feature of ESLint labels Jun 27, 2016
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
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
Projects
None yet
Development

No branches or pull requests

5 participants