Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upPrevent confusing if-statement usage #616
Comments
dcousens
added
the
enhancement
label
Sep 10, 2016
This comment has been minimized.
This comment has been minimized.
|
That really should be disallowed. The wriggle room for accidents is pretty high. |
This comment has been minimized.
This comment has been minimized.
KhaledMohamedP
commented
Sep 10, 2016
|
Totally agree here. It should be disallowed |
This comment has been minimized.
This comment has been minimized.
|
Agreed. This should be prevented. However, there's no eslint rule that allows us to catch this case. I just opened an issue to get the eslint team's thoughts: eslint/eslint#7116 |
feross
changed the title
Discussion: lint formatting of if blocks
Prevent confusing if-statement usage
Sep 11, 2016
feross
added
the
blocked
label
Sep 11, 2016
feross
modified the milestone:
standard v9
Sep 11, 2016
feross
removed this from the
standard v9 milestone
Feb 9, 2017
This comment has been minimized.
This comment has been minimized.
|
Closing this, as we're blocked. I'll re-open if the ESLint issue makes any progress. |
feross
closed this
Feb 9, 2017
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.
willsoto commentedSep 9, 2016
As per the suggestion here, I am opening up a an issue to discuss extending the rules around
ifblocks.The blocks were originally indented like so:
I found this confusing because at first glance it looks like
if; else ifblocks.I would image the rule could be something like:
Other suggestions are welcome.