Currently, CommunityConfiguration code style rules disallow trailing commas in JavaScript code, and there is no rule regarding trailing commas in effect for PHP code.
I propose that in both languages / linters we adjust the rules to require trailing commas in multi-line contexts (as long as they're allowed by the language, obviously).
The main case in favor of trailing commas is:
- it is easier to add another element to a multi-line list, reorder lists, etc.
- the git diffs are sometimes much cleaner if there is not an extra two lines for a comma being added to the previously last element