Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upUnexpected trailing comma #890
Comments
dcousens
added
the
question
label
May 19, 2017
This comment has been minimized.
This comment has been minimized.
|
Hi @jcalfee! Thanks for the thoughtful feedback! This rule change has been discussed previously, and here was the decision we came to at that time:
With the above in mind I'm going to close this issue now, but please feel free to continue the conversation! |
Flet
closed this
May 30, 2017
This comment has been minimized.
This comment has been minimized.
AJamesPhillips
commented
Aug 23, 2017
•
|
I agree that with only disallow and enforce, it should be disallow. But I'd rather have it be optional. I’m not opinionated enough to say we should have them, but I am opinionated enough to say we should not force people to have/not have them. I understand though that Standard is meant to say 'disallow' or 'enforce'. Also reordering a list is a common activity and not having a trailing comma would increase chances of introducing a bug, as I well know from occasionally forgetting to delete / insert a comma at the right place. It also increases the commit diff noise. A good list of these points is also made here: #907 |
This comment has been minimized.
This comment has been minimized.
|
I personally would love to have trailing comma enforced, but I don't think that making this optional is the way to go.
The whole point of standard is to be opinionated and to pick one way. Otherwise, that same argument could be made about semicolons, space vs. tabs, and basically every other rule. I think it's important that standard enforces one of them. |
jcalfee commentedMay 18, 2017
Would you consider turning off the warning for "Unexpected trailing comma" ??
I save time and mental load when reordering lists by not having to track that last comma. I'm not aware of any issues that could be caused by allowing this extra comma.