trailingComma
Trailing comma, sometimes written as trailingComma, is a comma placed after the final element in a list, such as an array or object literal, or in a parameter or argument list. The usage varies by language, but the intent is to simplify editing and diffs by making it easier to add, reorder, or remove items without changing the previous last item’s line.
In JSON, trailing commas are not allowed by the standard specification; parsers will typically reject them.
JavaScript and related languages commonly support trailing commas in several constructs. In modern JavaScript, trailing commas
Other languages have explicit conventions. Go requires a trailing comma after the last element in multi-line
Pros of using trailing commas include improved diffs, easier reordering, and more robust code-generation. Cons include