Conversation
|
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. |
|
I'm with Jeremiah. I like dangling commas, they keep diff noise down. |
|
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. |
|
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. |
|
@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. |
|
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.