Uh oh!
There was an error while loading. Please reload this page.
tools: lint for dangling commas - #5091
Conversation
Trott
commented
Feb 4, 2016
Fishrock123
commented
Feb 5, 2016
Why? It's actually potentially less churn into the future to enforce dangling commas in object literals since that means you never have to edit the previous land line. |
bnoordhuis
commented
Feb 5, 2016
I'm with Jeremiah. I like dangling commas, they keep diff noise down. |
Fishrock123
commented
Feb 5, 2016
Mind you since the no-comma style apparently that style has 4000 instances that probably isn't viable. I move we just don't do anything honestly. |
bnoordhuis
commented
Feb 5, 2016
Right, I'm not saying we update everything in one fell swoop. It would be nice if we could enforce it for new code, though. |
Trott
commented
Feb 5, 2016
@Fishrock123@bnoordhuis I too am a fan of the dangling comma. I'm just a bigger fan of consistent coding conventions enforced by tooling. But yeah, you're not wrong, for sure. |
rvagg
commented
Feb 8, 2016
oo! let's go wholesale comma-first, that's one I can get behind and it defiantly reduces diff noise! |
Lint for dangling commas in the final lines of object/array declarations.
The no-dangling-comma-on-final-line instances (over 4000) in the code base vastly outnumber the dangling comma instances (less than 80, mostly in tests). So, for consistency, convert those ~80 instances to the dominant practice.