As we move towards rewriting the lib in modern ECMAScript, we should probably decide upon some standards beyond what's specified with jsHint. JSHint itself is moving towards being more of a code sanity checker and less of a code formatter, which is why JSCS has popped up. I'm also a fan of clang-format, which is nearly zero-config and works brilliantly.
To that end, we should probably decide the following things:
- JSCS or clang-format?
- Spaces vs. tabs
- 4 vs. 2 indentation
- double or single quotes?
- other stuff?
My personal preference is for clang-format + tabs + 2 indentation + single quotes. Please comment if you prefer something otherwise. N.b., I reserve the right to lock this thread at any time if it gets too bikeshed-y.
As we move towards rewriting the lib in modern ECMAScript, we should probably decide upon some standards beyond what's specified with jsHint. JSHint itself is moving towards being more of a code sanity checker and less of a code formatter, which is why JSCS has popped up. I'm also a fan of clang-format, which is nearly zero-config and works brilliantly.
To that end, we should probably decide the following things:
My personal preference is for clang-format + tabs + 2 indentation + single quotes. Please comment if you prefer something otherwise. N.b., I reserve the right to lock this thread at any time if it gets too bikeshed-y.