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 upCuddled "else" ? #88
Comments
This comment has been minimized.
This comment has been minimized.
|
While I prefer the 2nd over the 1st, I'm pretty sure that |
This comment has been minimized.
This comment has been minimized.
|
@jprichardson You are correct that |
This comment has been minimized.
This comment has been minimized.
|
Fun fact: standard uses standard to lint standard. If you're curious how some rule is used, there's a chance there's an example in source. |
This comment has been minimized.
This comment has been minimized.
|
@yoshuawuyts I'm now confused though. The formatter I use implements rules to fix uncuddled else, but it doesn't seem to be within @jprichardson |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Thank you @dcousens for giving the error. That rule is unmentioned, and I agree once something is added to the readme (or the " and other goodness" is expanded upon elsewhere) this is good to close. |
This comment has been minimized.
This comment has been minimized.
|
Right now, only a few rules are actually mentioned in the readme. Most aren't listed explicitly because there are just too many. The Let's try to enumerate all the rules over on the wiki: https://github.com/feross/standard/wiki for those who learn better that way. Please help out as you discover rules that aren't mentioned! |
NadyaNayme commentedMar 26, 2015
Standard currently doesn't hold an opinion on:
vs
The Mozilla Style Guide suggests not to cuddle. Examples given by
standarduse cuddled else.Personally I prefer a cuddled else as I find it far more readable. However, I'm raising this issue as the goal of
standardis to be highly opinionated on stylistic matters.Edit:
Same thing for Try/Catch