WebUI: Enforce trailing commas for arrays and objects, part 12 (last).

Per the JS styleguide at [1] and [2] trailing commas are required
whenever there is a linebreak between the final entry and the closing
brace or bracket.

In this CL fixing all remaining violations using ESLint's --fix flag,
and then running clang-format and enabling the check by default in the
top-level .eslintrc.js file.

[1] https://google.github.io/styleguide/jsguide.html#features-arrays-trailing-comma
[2] https://google.github.io/styleguide/jsguide.html#features-objects-use-trailing-comma

Bug: 720034
Change-Id: I58720026ac6ddfe983fc6b581c116a3dcd538178
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3764286
Commit-Queue: Demetrios Papadopoulos <[email protected]>
Reviewed-by: Abigail Klein <[email protected]>
Reviewed-by: Luciano Pacheco <[email protected]>
Reviewed-by: Tibor Goldschwendt <[email protected]>
Reviewed-by: John Lee <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1025510}
diff --git a/.eslintrc.js b/.eslintrc.js
index 26cbada..454db16e 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -15,6 +15,11 @@
   'rules': {
     // Enabled checks.
     'brace-style': ['error', '1tbs'],
+
+    // https://google.github.io/styleguide/jsguide.html#features-arrays-trailing-comma
+    // https://google.github.io/styleguide/jsguide.html#features-objects-use-trailing-comma
+    'comma-dangle': ['error', 'always-multiline'],
+
     'curly': ['error', 'multi-line', 'consistent'],
     'new-parens': 'error',
     'no-array-constructor': 'error',