has.js icon indicating copy to clipboard operation
has.js copied to clipboard

Code conventions: indentation? Space after `if`, `for`, etc?

Open mathiasbynens opened this issue 14 years ago • 2 comments

has.js mostly uses four-space-indents (it seems)m but sometimes two-space-indents are used instead. So which is it? Also, should there be spaces after if, for etc, or not? (Doesn’t look like it, but again, there are a few inconsistencies.)

It would be good to specify the preferred indentation in the README.

mathiasbynens avatar Apr 25 '11 16:04 mathiasbynens

It's 4 spaces per tab. If you see 2 spaces it's prolly my bad :D

jdalton avatar Apr 26 '11 12:04 jdalton

yah I've been enforcing the Dojo style guidelines minus "tabs set at 4 spaces", we're just using 4 spaces. No spaces between if( and with( and while( or function blocks, eg: function bar(a, b, c){ ... }

feel free to cleanup and send pull req, otherwise I'll hit some stuff next I have a moment to review everything

phiggins42 avatar Apr 27 '11 13:04 phiggins42