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

Proposal: Disallow needless `else` statements #810

Closed
tunnckoCore opened this issue Mar 3, 2017 · 3 comments

Comments

@tunnckoCore
Copy link

commented Mar 3, 2017

Enforces more clean code. For years I have very rare cases when I need else or even else if statements.

Fixable, no-else-return

@feross

This comment has been minimized.

Copy link
Member

commented Mar 3, 2017

This seems overly prescriptive to me.

@feross feross added the enhancement label Mar 17, 2017

@feross

This comment has been minimized.

Copy link
Member

commented Apr 4, 2017

@tunnckoCore Thanks for the proposal. This rule would disrupt the way that too many people write code and it doesn't prevent bugs or improve code consistency enough to justify the cost to users, in my opinion.

Here are the results of the test suite:

# tests 238
# pass  213
# fail  25

10.5% breakage is too high to really even consider a change like this.

@feross feross closed this Apr 4, 2017

@tunnckoCore

This comment has been minimized.

Copy link
Author

commented Apr 4, 2017

10.5% breakage is too high to really even consider a change like this.

Daaamn :D Okey, no problem. We only can hope these numbers to get low in time.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.