Other: Require trailing commas for multiline for most

Require trailing commas for multiline for arrays, objects, imports and
exports and disallow trailing commas for functions.
Do this by updating the ESLint config and fixing new complaints.

The reason for this change are the resulting future cleaner version
diffs.

Also see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas
https://eslint.org/docs/latest/rules/comma-dangle
This commit is contained in:
June 2023-10-05 14:50:36 +02:00
commit d903274d73
No known key found for this signature in database
GPG key ID: 094C2AC34192FA11
6 changed files with 22 additions and 15 deletions

View file

@ -49,5 +49,12 @@ rules:
object-curly-spacing:
- error
- always
comma-dangle:
- error
- arrays: always-multiline
objects: always-multiline
imports: always-multiline
exports: always-multiline
functions: never
globals:
log: readonly