Closed MichalZalecki closed 9 years ago
It looks ugly, but I'm buying the vcs diff argument. On Tue 23 Jun 2015 at 22:04 Michał notifications@github.com wrote:
http://www.2ality.com/2013/07/trailing-commas.html
The link is for the brief only and as you might think is not only JS matter. It's not mentioned in the article, but my point is the VCS history cleanliness. If you'd like to add an element you won't left your comma on the previous line. Small improvement but the idea is interesting. I read about that in some comment under some dummy "there are 2 kinds of programmers..." fb post.
— Reply to this email directly or view it on GitHub https://github.com/monterail/guidelines/issues/229.
Yep, it's not the prettiest for sure. It more vcs vs the look. I'm also not used to leaving trailing commas, but it's good to be aware of the advantage.
Trailing commas are awesome, not only because of the vcs diff but also because you can remove/add whole line (works with js objects or ruby hashes, but not only) without thinking about whether you should work with commas as well.
:+1:
always using that style
@MichalZalecki Please submit a PR.
http://www.2ality.com/2013/07/trailing-commas.html
The link is for the brief only and as you might think is not only JS matter. It's not mentioned in the article, but my point is the VCS history cleanliness. If you'd like to add an element you won't left your comma on the previous line. Small improvement but the idea is interesting. I read about that in some comment under some dummy "there are 2 kinds of programmers..." fb post. What do you think?