Closed XhmikosR closed 11 years ago
Thanks for tidying this up and picking the commits I'd missed. I mainly wanted to get some form of JSHint in and passing first.
Please remove the curly rule - not really a fan of that one. Looks good after that and I'll get it merged in.
@ashb: How about not using one line statements?
Not fussed either way on one line statements, You've done it so sure why not? :)
I wasn't done yet :(
Oh sorry.
But generally please keep pull requests small and too one thing - it makes it much easier to us to look at them and give feedback.
And if you just want feedback but don't want one merged just yet add a note in the description.
I was waiting for your answer about one line statements.
No big deal.
Here is the final patch https://github.com/XhmikosR/markdown-js/commit/389fc9ac7c1f1f7a573f68bcbc3c1a7b84bc1727
BTW, what do you think about using 4 spaces for indentation? Currently, 2 spaces are mostly used, but there are many cases 4 are used.
Perhaps you could add a CONTRIBUTING.md
file with these guidelines.
We're in favour of 2 spaces and yes, a contribution section/file is needed - evilstreak and I were talking about this last night and it should also include things like 'Add a line to the changelog' and 'make sure its tested' etc.
Picked up that last commit too.
4 spaces looks better in my opinion, because it's more consistent in cases like:
var foo = bar,
fooo = barr;
But it's your call...
Ah so there is indentation (the number of spaces a block is aligned) and alignment (the case you just mentioned).
On the subject of alignment - I'm happy with aligning vars like that, I'm very much against aligning on =
like this:
x.foo = y;
x.longer = z;
because if someone adds a longer property then the diff touches lines that haven't really changed, or you end up with some things aligned and some not:
x.foo = y;
x.longer = z;
x.even_longer = w;
I agree with not aligning on =
.
Using 4 spaces for indentation is simpler/more convenient, I think.
I can remove the curly rule addition if you don't agree with it; it's a leftover from my original JSHint patch.