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 upTrailing Comma #400
Comments
aakashsigdel
changed the title
[feature request] Trailing Comma
Trailing Comma
Feb 4, 2016
feross
added
the
question
label
Feb 4, 2016
This comment has been minimized.
This comment has been minimized.
|
Sorry, we can't even consider this change because it would break 100% of the packages that use If you're using |
feross
closed this
Feb 4, 2016
This comment has been minimized.
This comment has been minimized.
garex
commented
Mar 20, 2016
|
Standards should respect comma-first rule. Then this feature will not be needed:
|
This comment has been minimized.
This comment has been minimized.
|
@garex Sorry, no. |
This comment has been minimized.
This comment has been minimized.
channprj
commented
Apr 5, 2018
|
How can I turn it off temporarily? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
lehelk
commented
Jun 22, 2018
|
Ok, I can understand the need for a standard/set of rules to follow and once setting these rules to not deviate from them. It feels like this specific rule was pushed due to IE8 & below bug. This should also not be an issue when using compilers. I would really appreciate knowing the reasoning behind this choice. |
This comment has been minimized.
This comment has been minimized.
qqtrend
commented
Aug 13, 2018
|
Is there a way to change this project-wide? (Because we are blessed with not having to support IE8 ever again, and don't want ugly diffs, not even in the name of standards!) This works if put at the top of each js file:
But each of these package.json edits were ignored: (the "babel-eslint" config is working; I left that in these examples to show I am editing the correct part of package.json)
and
For completeness, I also tried:
|
aakashsigdel commentedFeb 4, 2016
It would be good if there was a rule for ending a object entry with comma.
This would be helpful as we won't accidentally forget to add a comma before adding a new property while editing the object later in time.