ckolderup/picaro — Issue #8: Discuss code formatting conventions
Author: hoverbird
Created: 2012-02-01 18:15:14+00:00
State: open
Labels: Open Questions

Hey y'all, if this comes off as anal retentive, please close this issue and smack me in the gob.

I've noticed a fair amount of inconsistency in the way the JS and JSON is formatted- a natural case because we're all likely working in different editors. It's hard to scan the code when the indentation is sometimes 9 spaces, sometimes 8, sometimes a ix of tabs & spaces etc. Tthe fact that some JSON properties are capitalized and some aren't leads to frustration too. So I'd like to propose a convention for these two things, but I'm less attached to any one style than I am to us all using one style on the project. Whatever we agree to, I'll volunteer to format all of the code that way in one commit.

My proposal:
JS indentation should always be 2 spaces (sometimes called 1 "soft tab"). No hard tabs.
JSON property names should all be camelCased.

What are your thoughts, @JoeBernardi? Do you prefer the super-wide indentation? We could also standardize on 4 spaces, which is pretty common in Python-land.