Having a dangling comma in multiline javascript objects and arrays results in cleaner commit diffs if the last line is removed or an item is added to the end. For some reason these trailing commas are forbidden in mediawiki's eslint config.
This suggests to change for our repositories the linting configuration from "comma-dangle": ["error", "never"] to "comma-dangle": ["error", "always-multiline"]. The respective places in code can be fixed automatically by eslint.
https://eslint.org/docs/rules/comma-dangle
acceptance criteria
eslint is changed and code adjusted for the following repos:
- Wikibase
- WikibaseLexeme
- WikibaseQualityConstraints
- EntitySchema
- FIXME -- do we maintain other repos with javascript/eslint?