resource / Front-End-Standards

Front-end development standards for Resource.
MIT License
23 stars 1 forks source link

If/else statements always begin on new line. #20

Closed LukeAskew closed 11 years ago

LukeAskew commented 11 years ago

Consider the following for inclusion:

LukeAskew commented 11 years ago

Eric, what are your thoughts on this?

I prefer this style because makes comments on conditional logic more readable.

LukeAskew commented 11 years ago

@kevinmack18 feel free to weigh-in as well.

nicetransition commented 11 years ago

I prefer, but I can learn to change... To me it reads better but I have no reason why I think this...

if (expresion) { // ...stuff... } else { // ...stuff...
}

mcgaryes commented 11 years ago

I do like that. And I agree it is a bit more legible. It will take some getting used to though... And my fear is that you'll lose this styling if you try and run the code through any type of beautified out there... You would essentially have to write your own version for sublime as well as grunt. If you want it to hold through the beautifying process that's Is.

nicetransition commented 11 years ago

I agre with that, @mcgaryes.

LukeAskew commented 11 years ago

I will add the rules, but we should investigate ways to auto-format code that conforms to these standards.

Code Painter seems like it may be a good solution. You guys ever use it?

nicetransition commented 11 years ago

I have not heard of it... but sounds awesome. Have you used it?

mcgaryes commented 11 years ago

Nope never used that before... I've never written a plugin for sublime text 2 either.

If someone wants to take a stab at writing a plugin that works with code painter there's a tutorial on net tuts that looks promising. You'll have to bundle the cod painter executable with the plugin I'd imagine. http://net.tutsplus.com/tutorials/python-tutorials/how-to-create-a-sublime-text-2-plugin/

The grunt task would be easy enough to write.

On Apr 2, 2013, at 10:15 PM, LukeAskew notifications@github.com wrote:

I will add the rules, but we should investigate ways to auto-format code that conforms to these standards.

Code Painter seems like it may be a good solution. You guys ever use it?

— Reply to this email directly or view it on GitHub.