Merge "Bazel: Force sourcemaps inlining in polymer bundler" into stable-2.16
diff --git a/.bazelversion b/.bazelversion
index 26aaba0..227cea2 100644
--- a/.bazelversion
+++ b/.bazelversion
@@ -1 +1 @@
-1.2.0
+2.0.0
diff --git a/Jenkinsfile b/Jenkinsfile
index dff9932..2b5414a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -53,15 +53,11 @@
 
 class GerritCheck {
     String uuid
-    String changeNum
-    String sha1
     Build build
 
-    GerritCheck(name, changeNum, sha1, build) {
+    GerritCheck(name, build) {
         this.uuid = "gerritforge:" + name.replaceAll("(bazel/)", "") +
             Globals.gerritRepositoryNameSha1Suffix
-        this.changeNum = changeNum
-        this.sha1 = sha1
         this.build = build
     }
 
@@ -93,21 +89,7 @@
 }
 
 def postCheck(check) {
-    def gerritPostUrl = Globals.gerritUrl +
-        "a/changes/${check.changeNum}/revisions/${check.sha1}/checks"
-
-    try {
-        def json = check.createCheckPayload()
-        httpRequest(httpMode: 'POST', authentication: Globals.gerritCredentialsId,
-            contentType: 'APPLICATION_JSON', requestBody: json,
-            validResponseCodes: '200', url: gerritPostUrl)
-        echo "----------------------------------------------------------------------------"
-        echo "Gerrit Check: ${check.uuid}=" + check.build.result + " to change " +
-            check.changeNum + "/" + check.sha1
-        echo "----------------------------------------------------------------------------"
-    } catch(Exception e) {
-        echo "ERROR> Failed to post check results to Gerrit: ${e}"
-    }
+    gerritCheck(checks: [ "${check.uuid}" : "${check.getCheckResultFromBuild()}" ])
 }
 
 def queryChangedFiles(url, changeNum, sha1) {
@@ -313,7 +295,7 @@
             gerritReview(
                 labels: ['Code-Style': resCodeStyle],
                 message: createCodeStyleMsgBody(Builds.codeStyle, resCodeStyle))
-            postCheck(new GerritCheck("codestyle", Change.number, Change.sha1, Builds.codeStyle))
+            postCheck(new GerritCheck("codestyle", Builds.codeStyle))
 
             def verificationResults = Builds.verification.collect { k, v -> v }
             def resVerify = verificationResults.inject(1) {
@@ -324,7 +306,7 @@
                 message: createVerifyMsgBody(Builds.verification))
 
             Builds.verification.each { type, build -> postCheck(
-                new GerritCheck(type, Change.number, Change.sha1, build)
+                new GerritCheck(type, build)
             )}
 
             setResult(resVerify, resCodeStyle)
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..b200b9c
--- /dev/null
+++ b/package.json
@@ -0,0 +1,30 @@
+{
+  "name": "gerrit",
+  "version": "2.16.16-SNAPSHOT",
+  "description": "Gerrit Code Review",
+  "dependencies": {},
+  "devDependencies": {
+    "eslint": "^6.6.0",
+    "eslint-config-google": "^0.13.0",
+    "eslint-plugin-html": "^6.0.0",
+    "eslint-plugin-jsdoc": "^18.4.3",
+    "fried-twinkie": "^0.2.2",
+    "polylint": "^2.10.4",
+    "typescript": "^2.x.x",
+    "web-component-tester": "^6.5.0"
+  },
+  "scripts": {
+    "start": "polygerrit-ui/run-server.sh",
+    "test": "WCT_HEADLESS_MODE=1 WCT_ARGS='--verbose -l chrome' ./polygerrit-ui/app/run_test.sh",
+    "eslint": "./node_modules/eslint/bin/eslint.js --ext .html,.js polygerrit-ui/app",
+    "eslintfix": "npm run eslint -- --fix",
+    "test-template": "./polygerrit-ui/app/run_template_test.sh",
+    "polylint": "bazel test polygerrit-ui/app:polylint_test"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://gerrit.googlesource.com/gerrit"
+  },
+  "author": "",
+  "license": "Apache-2.0"
+}
diff --git a/polygerrit-ui/README.md b/polygerrit-ui/README.md
index 5d0d22f..2d8096a 100644
--- a/polygerrit-ui/README.md
+++ b/polygerrit-ui/README.md
@@ -27,14 +27,7 @@
 dependencies can be installed with:
 
 ```sh
-sudo npm install -g \
-  eslint \
-  eslint-config-google \
-  eslint-plugin-html \
-  typescript \
-  fried-twinkie \
-  polylint \
-  web-component-tester
+npm install
 ```
 
 It may complain about a missing `typescript@2.3.4` peer dependency, which is
@@ -53,14 +46,16 @@
 To test the local UI against gerrit-review.googlesource.com:
 
 ```sh
-./run-server.sh
+./polygerrit-ui/run-server.sh
 ```
 
 Then visit http://localhost:8081
 
 ## Local UI, Test Data
 
-One-time setup:
+```sh
+./polygerrit-ui/run-server.sh --plugins=plugins/my_plugin/static/my_plugin.js,plugins/my_plugin/static/my_plugin.html
+```
 
 1. [Build Gerrit](https://gerrit-review.googlesource.com/Documentation/dev-bazel.html#_gerrit_development_war_file)
 2. Set up a local test site. Docs
@@ -100,10 +95,17 @@
 Note: it may be necessary to add the options `--unsafe-perm=true --allow-root`
 to the `npm install` command to avoid file permission errors.
 
-Run all web tests:
+For daily development you typically only want to run and debug individual tests.
+Run the local [Go proxy server](#go-server) and navigate for example to
+<http://localhost:8081/elements/change/gr-account-entry/gr-account-entry_test.html>.
+Check "Disable cache" in the "Network" tab of Chrome's dev tools, so code
+changes are picked up on "reload".
+
+Our CI integration ensures that all tests are run when you upload a change to
+Gerrit, but you can also run all tests locally in headless mode:
 
 ```sh
-./polygerrit-ui/app/run_test.sh
+npm test
 ```
 
 To allow the tests to run in Safari:
@@ -111,24 +113,10 @@
 * In the Advanced preferences tab, check "Show Develop menu in menu bar".
 * In the Develop menu, enable the "Allow Remote Automation" option.
 
-If you need to pass additional arguments to `wct`:
-
-```sh
-WCT_ARGS='-p --some-flag="foo bar"' ./polygerrit-ui/app/run_test.sh
-```
-
-For interactively working on a single test file, do the following:
-
-```sh
-./polygerrit-ui/run-server.sh
-```
-
-Then visit http://localhost:8081/elements/foo/bar_test.html
-
 To run Chrome tests in headless mode:
 
 ```sh
-WCT_HEADLESS_MODE=1 ./polygerrit-ui/app/run_test.sh
+WCT_HEADLESS_MODE=1 WCT_ARGS='--verbose -l chrome' ./polygerrit-ui/app/run_test.sh
 ```
 
 Toolchain requirements for headless mode:
@@ -159,11 +147,22 @@
 Some useful commands:
 
 * To run ESLint on the whole app, less some dependency code:
-`eslint --ignore-pattern 'bower_components/' --ignore-pattern 'gr-linked-text' --ignore-pattern 'scripts/vendor' --ext .html,.js polygerrit-ui/app`
+
+```sh
+npm run eslint
+```
+
 * To run ESLint on just the subdirectory you modified:
-`eslint --ext .html,.js polygerrit-ui/app/$YOUR_DIR_HERE`
+
+```sh
+node_modules/eslint/bin/eslint.js --ext .html,.js polygerrit-ui/app/$YOUR_DIR_HERE
+```
+
 * To run the linter on all of your local changes:
-`git diff --name-only master | xargs eslint --ext .html,.js`
+
+```sh
+git diff --name-only master | xargs node_modules/eslint/bin/eslint.js --ext .html,.js
+```
 
 We also use the `polylint` tool to lint use of Polymer. To install polylint,
 execute the following command.
@@ -173,6 +172,13 @@
 ```sh
 bazel test //polygerrit-ui/app:polylint_test
 ```
+
+or
+
+```sh
+npm run polylint
+```
+
 ## Template Type Safety
 Polymer elements are not type checked against the element definition, making it trivial to break the display when refactoring or moving code. We now run additional tests to help ensure that template types are checked.
 
@@ -188,6 +194,12 @@
 ./polygerrit-ui/app/run_template_test.sh
 ```
 
+or
+
+```sh
+npm run test-template
+```
+
 To run on a specific top level directory (ex: change-list)
 ```sh
 TEMPLATE_NO_DEFAULT=true ./polygerrit-ui/app/run_template_test.sh //polygerrit-ui/app:template_test_change-list
diff --git a/polygerrit-ui/app/.eslintrc.json b/polygerrit-ui/app/.eslintrc.json
index 0bd8bf7..c481fd0 100644
--- a/polygerrit-ui/app/.eslintrc.json
+++ b/polygerrit-ui/app/.eslintrc.json
@@ -33,8 +33,7 @@
         "functions": "never"
     }],
     "eol-last": "off",
-    "indent": "off",
-    "indent-legacy": ["error", 2, {
+    "indent": ["error", 2, {
       "MemberExpression": 2,
       "FunctionDeclaration": {"body": 1, "parameters": 2},
       "FunctionExpression": {"body": 1, "parameters": 2},
@@ -44,13 +43,14 @@
       "SwitchCase": 1
     }],
     "keyword-spacing": ["error", { "after": true, "before": true }],
+    "lines-between-class-members": ["error", "always"],
     "max-len": [
       "error",
       80,
       2,
       {"ignoreComments": true}
     ],
-    "new-cap": ["error", { "capIsNewExceptions": ["Polymer"] }],
+    "new-cap": ["error", { "capIsNewExceptions": ["Polymer", "LegacyElementMixin", "GestureEventListeners", "LegacyDataMixin"] }],
     "no-console": "off",
     "no-restricted-syntax": [
       "error",
@@ -70,18 +70,59 @@
     "no-redeclare": "off",
     "operator-linebreak": "off",
     "object-shorthand": ["error", "always"],
+    "padding-line-between-statements": [
+      "error",
+      {
+        "blankLine": "always",
+        "prev": "class",
+        "next": "*"
+      },
+      {
+        "blankLine": "always",
+        "prev": "*",
+        "next": "class"
+      }
+    ],
     "prefer-arrow-callback": "error",
     "prefer-const": "error",
     "prefer-promise-reject-errors": "off",
     "prefer-spread": "error",
     "quote-props": ["error", "consistent-as-needed"],
-    "require-jsdoc": "off",
     "semi": [2, "always"],
     "template-curly-spacing": "error",
-    "valid-jsdoc": "off"
+
+    "require-jsdoc": 0,
+    "valid-jsdoc": 0,
+    "jsdoc/check-alignment": 2,
+    "jsdoc/check-examples": 0,
+    "jsdoc/check-indentation": 0,
+    "jsdoc/check-param-names": 0,
+    "jsdoc/check-syntax": 0,
+    "jsdoc/check-tag-names": 0,
+    "jsdoc/check-types": 0,
+    "jsdoc/implements-on-classes": 2,
+    "jsdoc/match-description": 0,
+    "jsdoc/newline-after-description": 2,
+    "jsdoc/no-types": 0,
+    "jsdoc/no-undefined-types": 0,
+    "jsdoc/require-description": 0,
+    "jsdoc/require-description-complete-sentence": 0,
+    "jsdoc/require-example": 0,
+    "jsdoc/require-hyphen-before-param-description": 0,
+    "jsdoc/require-jsdoc": 0,
+    "jsdoc/require-param": 0,
+    "jsdoc/require-param-description": 0,
+    "jsdoc/require-param-name": 2,
+    "jsdoc/require-param-type": 2,
+    "jsdoc/require-returns": 0,
+    "jsdoc/require-returns-check": 0,
+    "jsdoc/require-returns-description": 0,
+    "jsdoc/require-returns-type": 2,
+    "jsdoc/valid-types": 2
   },
   "plugins": [
-    "html"
+    "html",
+    "jsdoc"
   ],
   "settings": {
     "html/report-bad-indent": "error"
diff --git a/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.html b/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.html
index 64b725f..f07a955 100644
--- a/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.html
+++ b/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.html
@@ -31,6 +31,7 @@
 
     /**
      * Get the docs base URL from either the server config or by probing.
+     *
      * @param {Object} config The server config.
      * @param {!Object} restApi A REST API instance
      * @return {!Promise<string>} A promise that resolves with the docs base
@@ -56,7 +57,7 @@
       cachedPromise = undefined;
     },
   },
-    Gerrit.BaseUrlBehavior,
+  Gerrit.BaseUrlBehavior,
   ];
 })(window);
 </script>
diff --git a/polygerrit-ui/app/behaviors/dom-util-behavior/dom-util-behavior.html b/polygerrit-ui/app/behaviors/dom-util-behavior/dom-util-behavior.html
index 2d25b29..e0a15cf 100644
--- a/polygerrit-ui/app/behaviors/dom-util-behavior/dom-util-behavior.html
+++ b/polygerrit-ui/app/behaviors/dom-util-behavior/dom-util-behavior.html
@@ -25,6 +25,7 @@
     /**
      * Are any ancestors of the element (or the element itself) members of the
      * given class.
+     *
      * @param {!Element} element
      * @param {string} className
      * @param {Element=} opt_stopElement If provided, stop traversing the
diff --git a/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior.html b/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior.html
index c462c6f..f81fef0 100644
--- a/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior.html
+++ b/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior.html
@@ -41,6 +41,7 @@
 
     /**
      * Returns the complement to the given column array
+     *
      * @param {Array} columns
      * @return {!Array}
      */
@@ -63,6 +64,7 @@
      * The Project column was renamed to Repo, but some users may have
      * preferences that use its old name. If that column is found, rename it
      * before use.
+     *
      * @param {!Array<string>} columns
      * @return {!Array<string>} If the column was renamed, returns a new array
      *     with the corrected name. Otherwise, it returns the original param.
diff --git a/polygerrit-ui/app/behaviors/gr-list-view-behavior/gr-list-view-behavior.html b/polygerrit-ui/app/behaviors/gr-list-view-behavior/gr-list-view-behavior.html
index f251db8..b6edb57 100644
--- a/polygerrit-ui/app/behaviors/gr-list-view-behavior/gr-list-view-behavior.html
+++ b/polygerrit-ui/app/behaviors/gr-list-view-behavior/gr-list-view-behavior.html
@@ -56,8 +56,8 @@
       return 0;
     },
   },
-    Gerrit.BaseUrlBehavior,
-    Gerrit.URLEncodingBehavior,
+  Gerrit.BaseUrlBehavior,
+  Gerrit.URLEncodingBehavior,
   ];
 })(window);
 </script>
diff --git a/polygerrit-ui/app/behaviors/gr-patch-set-behavior/gr-patch-set-behavior.html b/polygerrit-ui/app/behaviors/gr-patch-set-behavior/gr-patch-set-behavior.html
index 48b575b..31a51a9 100644
--- a/polygerrit-ui/app/behaviors/gr-patch-set-behavior/gr-patch-set-behavior.html
+++ b/polygerrit-ui/app/behaviors/gr-patch-set-behavior/gr-patch-set-behavior.html
@@ -52,6 +52,7 @@
     /**
      * Whether the given patch is a numbered parent of a merge (i.e. a negative
      * number).
+     *
      * @param  {string|number} n
      * @return {Boolean}
      */
@@ -124,8 +125,8 @@
       // 2 -> 3, 3 -> 5, etc.
       // Map an edit to the patchNum of parent*2... I.e. edit on 2 -> 4.
       const num = r => r._number === Gerrit.PatchSetBehavior.EDIT_NAME ?
-          2 * editParent :
-          2 * (r._number - 1) + 1;
+        2 * editParent :
+        2 * (r._number - 1) + 1;
       return revisions.sort((a, b) => num(b) - num(a));
     },
 
@@ -264,6 +265,7 @@
     /**
      * Convert parent indexes from patch range expressions to numbers.
      * For example, in a patch range expression `"-3"` becomes `3`.
+     *
      * @param {number|string} rangeBase
      * @return {number}
      */
diff --git a/polygerrit-ui/app/behaviors/gr-url-encoding-behavior/gr-url-encoding-behavior.html b/polygerrit-ui/app/behaviors/gr-url-encoding-behavior/gr-url-encoding-behavior.html
index 69703f6..64274d2 100644
--- a/polygerrit-ui/app/behaviors/gr-url-encoding-behavior/gr-url-encoding-behavior.html
+++ b/polygerrit-ui/app/behaviors/gr-url-encoding-behavior/gr-url-encoding-behavior.html
@@ -25,6 +25,7 @@
     /**
      * Pretty-encodes a URL. Double-encodes the string, and then replaces
      *   benevolent characters for legibility.
+     *
      * @param {string} url
      * @param {boolean=} replaceSlashes
      * @return {string}
@@ -45,6 +46,7 @@
      * Single decode for URL components. Will decode plus signs ('+') to spaces.
      * Note: because this function decodes once, it is not the inverse of
      * encodeURL.
+     *
      * @param {string} url
      * @return {string}
      */
diff --git a/polygerrit-ui/app/behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior_test.html b/polygerrit-ui/app/behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior_test.html
index dac90f8..15d31b7 100644
--- a/polygerrit-ui/app/behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior_test.html
+++ b/polygerrit-ui/app/behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior_test.html
@@ -238,8 +238,8 @@
 
         test('directory view', () => {
           const {
-              NEXT_FILE, NEXT_LINE, GO_TO_OPENED_CHANGES, SEARCH,
-              SAVE_COMMENT,
+            NEXT_FILE, NEXT_LINE, GO_TO_OPENED_CHANGES, SEARCH,
+            SAVE_COMMENT,
           } = kb.Shortcut;
           const {DIFFS, EVERYWHERE, NAVIGATION} = kb.ShortcutSection;
           const {GO_KEY, ShortcutManager} = kb;
diff --git a/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.html b/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.html
index 2cb00f4..354bedc 100644
--- a/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.html
+++ b/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.html
@@ -169,7 +169,7 @@
       return this.changeStatuses(change).join(', ');
     },
   },
-    Gerrit.BaseUrlBehavior,
+  Gerrit.BaseUrlBehavior,
   ];
 })(window);
 </script>
diff --git a/polygerrit-ui/app/behaviors/safe-types-behavior/safe-types-behavior.html b/polygerrit-ui/app/behaviors/safe-types-behavior/safe-types-behavior.html
index 43022d9..8f08f0c 100644
--- a/polygerrit-ui/app/behaviors/safe-types-behavior/safe-types-behavior.html
+++ b/polygerrit-ui/app/behaviors/safe-types-behavior/safe-types-behavior.html
@@ -28,6 +28,7 @@
   /**
    * Wraps a string to be used as a URL. An error is thrown if the string cannot
    * be considered safe.
+   *
    * @constructor
    * @param {string} url the unwrapped, potentially unsafe URL.
    */
@@ -40,6 +41,7 @@
 
   /**
    * Get the string representation of the safe URL.
+   *
    * @returns {string}
    */
   Gerrit.SafeTypes.SafeUrl.prototype.asString = function() {
diff --git a/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section.js b/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section.js
index 6fb7b0e..409fab4 100644
--- a/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section.js
+++ b/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section.js
@@ -25,6 +25,7 @@
 
   /**
    * Fired when a section that was previously added was removed.
+   *
    * @event added-section-removed
    */
 
diff --git a/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section_test.html b/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section_test.html
index 21a426f..56f321b 100644
--- a/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section_test.html
+++ b/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section_test.html
@@ -206,7 +206,7 @@
         };
         assert.equal(element._computePermissionName(name, permission,
             element.permissionValues, element.capabilities),
-            element.capabilities[permission.id].name);
+        element.capabilities[permission.id].name);
 
         name = 'refs/for/*';
         permission = {
@@ -216,7 +216,7 @@
 
         assert.equal(element._computePermissionName(
             name, permission, element.permissionValues, element.capabilities),
-            element.permissionValues[permission.id].name);
+        element.permissionValues[permission.id].name);
 
         name = 'refs/for/*';
         permission = {
@@ -228,7 +228,7 @@
 
         assert.equal(element._computePermissionName(name, permission,
             element.permissionValues, element.capabilities),
-            'Label Code-Review');
+        'Label Code-Review');
 
         permission = {
           id: 'labelAs-Code-Review',
@@ -239,7 +239,7 @@
 
         assert.equal(element._computePermissionName(name, permission,
             element.permissionValues, element.capabilities),
-            'Label Code-Review(On Behalf Of)');
+        'Label Code-Review(On Behalf Of)');
       });
 
       test('_computeSectionName', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list.js b/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list.js
index 1f5457a..f1c27af 100644
--- a/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list.js
+++ b/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list.js
@@ -87,6 +87,7 @@
 
     /**
      * Opens the create overlay if the route has a hash 'create'
+     *
      * @param {!Object} params
      */
     _maybeOpenCreateOverlay(params) {
@@ -119,11 +120,11 @@
               return;
             }
             this._groups = Object.keys(groups)
-             .map(key => {
-               const group = groups[key];
-               group.name = key;
-               return group;
-             });
+                .map(key => {
+                  const group = groups[key];
+                  group.name = key;
+                  return group;
+                });
             this._loading = false;
           });
     },
diff --git a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.js b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.js
index 3d430c2..fc04c34 100644
--- a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.js
+++ b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.js
@@ -105,23 +105,23 @@
             .then(res => {
               this._filteredLinks = res.links;
               this._breadcrumbParentName = res.expandedSection ?
-                  res.expandedSection.name : '';
+                res.expandedSection.name : '';
 
               if (!res.expandedSection) {
                 this._subsectionLinks = [];
                 return;
               }
               this._subsectionLinks = [res.expandedSection]
-              .concat(res.expandedSection.children).map(section => {
-                return {
-                  text: !section.detailType ? 'Home' : section.name,
-                  value: section.view + (section.detailType || ''),
-                  view: section.view,
-                  url: section.url,
-                  detailType: section.detailType,
-                  parent: this._groupId || this._repoName || '',
-                };
-              });
+                  .concat(res.expandedSection.children).map(section => {
+                    return {
+                      text: !section.detailType ? 'Home' : section.name,
+                      value: section.view + (section.detailType || ''),
+                      view: section.view,
+                      url: section.url,
+                      detailType: section.detailType,
+                      parent: this._groupId || this._repoName || '',
+                    };
+                  });
             });
       });
     },
diff --git a/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog.js b/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog.js
index 8e15755..c6687dd 100644
--- a/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog.js
+++ b/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog.js
@@ -102,21 +102,21 @@
       }
       return this.$.restAPI.getRepoBranches(
           input, this.repoName, SUGGESTIONS_LIMIT).then(response => {
-            const branches = [];
-            let branch;
-            for (const key in response) {
-              if (!response.hasOwnProperty(key)) { continue; }
-              if (response[key].ref.startsWith('refs/heads/')) {
-                branch = response[key].ref.substring('refs/heads/'.length);
-              } else {
-                branch = response[key].ref;
-              }
-              branches.push({
-                name: branch,
-              });
-            }
-            return branches;
+        const branches = [];
+        let branch;
+        for (const key in response) {
+          if (!response.hasOwnProperty(key)) { continue; }
+          if (response[key].ref.startsWith('refs/heads/')) {
+            branch = response[key].ref.substring('refs/heads/'.length);
+          } else {
+            branch = response[key].ref;
+          }
+          branches.push({
+            name: branch,
           });
+        }
+        return branches;
+      });
     },
 
     _formatBooleanString(config) {
diff --git a/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members.js b/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members.js
index 2e36a38..b7917be 100644
--- a/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members.js
+++ b/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members.js
@@ -140,15 +140,15 @@
     _handleSavingGroupMember() {
       return this.$.restAPI.saveGroupMembers(this._groupName,
           this._groupMemberSearchId).then(config => {
-            if (!config) {
-              return;
-            }
-            this.$.restAPI.getGroupMembers(this._groupName).then(members => {
-              this._groupMembers = members;
-            });
-            this._groupMemberSearchName = '';
-            this._groupMemberSearchId = '';
-          });
+        if (!config) {
+          return;
+        }
+        this.$.restAPI.getGroupMembers(this._groupName).then(members => {
+          this._groupMembers = members;
+        });
+        this._groupMemberSearchName = '';
+        this._groupMemberSearchId = '';
+      });
     },
 
     _handleDeleteConfirm() {
@@ -237,24 +237,24 @@
       if (input.length === 0) { return Promise.resolve([]); }
       return this.$.restAPI.getSuggestedAccounts(
           input, SUGGESTIONS_LIMIT).then(accounts => {
-            const accountSuggestions = [];
-            let nameAndEmail;
-            if (!accounts) { return []; }
-            for (const key in accounts) {
-              if (!accounts.hasOwnProperty(key)) { continue; }
-              if (accounts[key].email !== undefined) {
-                nameAndEmail = accounts[key].name +
+        const accountSuggestions = [];
+        let nameAndEmail;
+        if (!accounts) { return []; }
+        for (const key in accounts) {
+          if (!accounts.hasOwnProperty(key)) { continue; }
+          if (accounts[key].email !== undefined) {
+            nameAndEmail = accounts[key].name +
                   ' <' + accounts[key].email + '>';
-              } else {
-                nameAndEmail = accounts[key].name;
-              }
-              accountSuggestions.push({
-                name: nameAndEmail,
-                value: accounts[key]._account_id,
-              });
-            }
-            return accountSuggestions;
+          } else {
+            nameAndEmail = accounts[key].name;
+          }
+          accountSuggestions.push({
+            name: nameAndEmail,
+            value: accounts[key]._account_id,
           });
+        }
+        return accountSuggestions;
+      });
     },
 
     _getGroupSuggestions(input) {
diff --git a/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members_test.html b/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members_test.html
index 81123e7..ef22daf 100644
--- a/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members_test.html
+++ b/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members_test.html
@@ -167,10 +167,10 @@
           .querySelectorAll('.nameColumn a')[0].href, includedGroups[0].url);
       assert.equal(Polymer.dom(element.root)
           .querySelectorAll('.nameColumn a')[1].href,
-          'https://test/site/group/url');
+      'https://test/site/group/url');
       assert.equal(Polymer.dom(element.root)
           .querySelectorAll('.nameColumn a')[2].href,
-          'https://test/site/group/url');
+      'https://test/site/group/url');
     });
 
     test('save members correctly', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-group/gr-group.js b/polygerrit-ui/app/elements/admin/gr-group/gr-group.js
index e2ecfba..de16a7c 100644
--- a/polygerrit-ui/app/elements/admin/gr-group/gr-group.js
+++ b/polygerrit-ui/app/elements/admin/gr-group/gr-group.js
@@ -168,15 +168,15 @@
       }
       return this.$.restAPI.saveGroupOwner(this.groupId,
           owner).then(config => {
-            this._owner = false;
-          });
+        this._owner = false;
+      });
     },
 
     _handleSaveDescription() {
       return this.$.restAPI.saveGroupDescription(this.groupId,
           this._groupConfig.description).then(config => {
-            this._description = false;
-          });
+        this._description = false;
+      });
     },
 
     _handleSaveOptions() {
@@ -186,8 +186,8 @@
 
       return this.$.restAPI.saveGroupOptions(this.groupId,
           options).then(config => {
-            this._options = false;
-          });
+        this._options = false;
+      });
     },
 
     _handleConfigName() {
diff --git a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.js b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.js
index 460a9d9..633a1db 100644
--- a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.js
+++ b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.js
@@ -32,6 +32,7 @@
 
   /**
    * Fired when a permission that was previously added was removed.
+   *
    * @event added-permission-removed
    */
 
@@ -220,7 +221,7 @@
 
     _computeGroupName(groups, groupId) {
       return groups && groups[groupId] && groups[groupId].name ?
-          groups[groupId].name : groupId;
+        groups[groupId].name : groupId;
     },
 
     _getGroupSuggestions() {
diff --git a/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list.js b/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list.js
index 6cbc94a..7fd3e05 100644
--- a/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list.js
+++ b/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list.js
@@ -91,11 +91,11 @@
               return;
             }
             this._plugins = Object.keys(plugins)
-             .map(key => {
-               const plugin = plugins[key];
-               plugin.name = key;
-               return plugin;
-             });
+                .map(key => {
+                  const plugin = plugins[key];
+                  plugin.name = key;
+                  return plugin;
+                });
             this._loading = false;
           });
     },
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js
index 5bc700b..f7ddb23 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js
@@ -166,7 +166,7 @@
             // current value appears. If there is no parent repo, it is
             // initialized as an empty string.
             this._inheritFromFilter = res.inherits_from ?
-                this._inheritsFrom.name : '';
+              this._inheritsFrom.name : '';
             this._local = res.local;
             this._groups = res.groups;
             this._weblinks = res.config_web_links || [];
@@ -345,6 +345,7 @@
             /**
              * As add / delete both can happen in the new section,
              * so here to make sure it will remove the deleted ones.
+             *
              * @see Issue 11339
              */
             this._recursivelyRemoveDeleted(addRemoveObj.add[k]);
@@ -369,11 +370,11 @@
       };
 
       const originalInheritsFromId = this._originalInheritsFrom ?
-          this.singleDecodeURL(this._originalInheritsFrom.id) :
-          null;
+        this.singleDecodeURL(this._originalInheritsFrom.id) :
+        null;
       const inheritsFromId = this._inheritsFrom ?
-          this.singleDecodeURL(this._inheritsFrom.id) :
-          null;
+        this.singleDecodeURL(this._inheritsFrom.id) :
+        null;
 
       const inheritFromChanged =
           // Inherit from changed
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_test.html b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_test.html
index 6fa36a5..a33b4be 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_test.html
+++ b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_test.html
@@ -674,7 +674,7 @@
             Polymer.dom(element.$$('gr-access-section').root).querySelectorAll(
                 'gr-permission')[2];
         newPermission._handleAddRuleItem(
-           {detail: {value: {id: 'Maintainers'}}});
+            {detail: {value: {id: 'Maintainers'}}});
         assert.deepEqual(element._computeAddAndRemove(), expectedInput);
 
         // Modify a section reference.
@@ -907,7 +907,7 @@
             Polymer.dom(element.$$('gr-access-section').root).querySelectorAll(
                 'gr-permission')[1];
         readPermission._handleAddRuleItem(
-           {detail: {value: {id: 'Maintainers'}}});
+            {detail: {value: {id: 'Maintainers'}}});
 
         expectedInput = {
           add: {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands.js b/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands.js
index a25055e..17d89a8 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands.js
@@ -96,16 +96,16 @@
     _handleEditRepoConfig() {
       return this.$.restAPI.createChange(this.repo, CONFIG_BRANCH,
           EDIT_CONFIG_SUBJECT, undefined, false, true).then(change => {
-            const message = change ?
-                CREATE_CHANGE_SUCCEEDED_MESSAGE :
-                CREATE_CHANGE_FAILED_MESSAGE;
-            this.dispatchEvent(new CustomEvent('show-alert',
-                {detail: {message}, bubbles: true}));
-            if (!change) { return; }
+        const message = change ?
+          CREATE_CHANGE_SUCCEEDED_MESSAGE :
+          CREATE_CHANGE_FAILED_MESSAGE;
+        this.dispatchEvent(new CustomEvent('show-alert',
+            {detail: {message}, bubbles: true}));
+        if (!change) { return; }
 
-            Gerrit.Nav.navigateToRelativeUrl(Gerrit.Nav.getEditUrlForDiff(
-                change, CONFIG_PATH, INITIAL_PATCHSET));
-          });
+        Gerrit.Nav.navigateToRelativeUrl(Gerrit.Nav.getEditUrlForDiff(
+            change, CONFIG_PATH, INITIAL_PATCHSET));
+      });
     },
   });
 })();
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards.js b/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards.js
index 7dea7f4..a620ba1 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards.js
@@ -45,7 +45,7 @@
 
         // Group by ref and sort by id.
         const dashboards = res.concat.apply([], res).sort((a, b) =>
-            a.id < b.id ? -1 : 1);
+          a.id < b.id ? -1 : 1);
         const dashboardsByRef = {};
         dashboards.forEach(d => {
           if (!dashboardsByRef[d.ref]) {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.js b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.js
index 8c7973d..c576d7e 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.js
@@ -90,7 +90,7 @@
     _determineIfOwner(repo) {
       return this.$.restAPI.getRepoAccess(repo)
           .then(access =>
-                this._isOwner = access && !!access[repo].is_owner);
+            this._isOwner = access && !!access[repo].is_owner);
     },
 
     _paramsChanged(params) {
@@ -124,17 +124,17 @@
       if (detailType === DETAIL_TYPES.BRANCHES) {
         return this.$.restAPI.getRepoBranches(
             filter, repo, itemsPerPage, offset, errFn).then(items => {
-              if (!items) { return; }
-              this._items = items;
-              this._loading = false;
-            });
+          if (!items) { return; }
+          this._items = items;
+          this._loading = false;
+        });
       } else if (detailType === DETAIL_TYPES.TAGS) {
         return this.$.restAPI.getRepoTags(
             filter, repo, itemsPerPage, offset, errFn).then(items => {
-              if (!items) { return; }
-              this._items = items;
-              this._loading = false;
-            });
+          if (!items) { return; }
+          this._items = items;
+          this._loading = false;
+        });
       }
     },
 
@@ -173,7 +173,7 @@
 
     _computeCanEditClass(ref, detailType, isOwner) {
       return isOwner && this._stripRefs(ref, detailType) === 'HEAD' ?
-          'canEdit' : '';
+        'canEdit' : '';
     },
 
     _handleEditRevision(e) {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.html b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.html
index 5d2a9ad..427a78a 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.html
+++ b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.html
@@ -153,9 +153,9 @@
         const cancelBtn = Polymer.dom(element.root).querySelector('.cancelBtn');
         const editBtn = Polymer.dom(element.root).querySelector('.editBtn');
         const revisionNoEditing = Polymer.dom(element.root)
-              .querySelector('.revisionNoEditing');
+            .querySelector('.revisionNoEditing');
         const revisionWithEditing = Polymer.dom(element.root)
-              .querySelector('.revisionWithEditing');
+            .querySelector('.revisionWithEditing');
 
         sandbox.stub(element, '_getLoggedIn').returns(Promise.resolve(true));
         sandbox.stub(element.$.restAPI, 'getRepoAccess').returns(
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js
index e0b054b..0eaa496 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js
@@ -90,6 +90,7 @@
 
     /**
      * Opens the create overlay if the route has a hash 'create'
+     *
      * @param {!Object} params
      */
     _maybeOpenCreateOverlay(params) {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js
index d79bf0d..91a0ffb 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js
@@ -268,8 +268,8 @@
     _handleSaveRepoConfig() {
       return this.$.restAPI.saveRepoConfig(this.repo,
           this._formatRepoConfigForSave(this._repoConfig)).then(() => {
-            this._configChanged = false;
-          });
+        this._configChanged = false;
+      });
     },
 
     _handleConfigChanged() {
@@ -309,7 +309,7 @@
           command: commandObj[title]
               .replace(/\$\{project\}/gi, encodeURI(repo))
               .replace(/\$\{project-base-name\}/gi,
-              encodeURI(repo.substring(repo.lastIndexOf('/') + 1))),
+                  encodeURI(repo.substring(repo.lastIndexOf('/') + 1))),
         });
       }
       return commands;
diff --git a/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor.js b/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor.js
index 06f703f..a5dc04e 100644
--- a/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor.js
+++ b/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor.js
@@ -25,6 +25,7 @@
 
   /**
    * Fired when a rule that was previously added was removed.
+   *
    * @event added-rule-removed
    */
 
diff --git a/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor_test.html b/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor_test.html
index f85c2b2..7f5bf6a 100644
--- a/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor_test.html
+++ b/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor_test.html
@@ -123,7 +123,7 @@
         let permission = 'priority';
         let label;
         assert.deepEqual(element._getDefaultRuleValues(permission, label),
-          {action: 'BATCH'});
+            {action: 'BATCH'});
         permission = 'label-Code-Review';
         label = {values: [
           {value: -2, text: 'This shall not be merged'},
@@ -137,7 +137,7 @@
         permission = 'push';
         label = undefined;
         assert.deepEqual(element._getDefaultRuleValues(permission, label),
-          {action: 'ALLOW', force: false});
+            {action: 'ALLOW', force: false});
         permission = 'submit';
         assert.deepEqual(element._getDefaultRuleValues(permission, label),
             {action: 'ALLOW'});
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.html b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.html
index 3637653..35f81bc 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.html
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.html
@@ -57,31 +57,31 @@
           {labels: {}}, 'Verified'), 'cell label u-gray-background');
       assert.equal(element._computeLabelClass(
           {labels: {Verified: {approved: true, value: 1}}}, 'Verified'),
-          'cell label u-green u-monospace');
+      'cell label u-green u-monospace');
       assert.equal(element._computeLabelClass(
           {labels: {Verified: {rejected: true, value: -1}}}, 'Verified'),
-          'cell label u-monospace u-red');
+      'cell label u-monospace u-red');
       assert.equal(element._computeLabelClass(
           {labels: {'Code-Review': {value: 1}}}, 'Code-Review'),
-          'cell label u-green u-monospace');
+      'cell label u-green u-monospace');
       assert.equal(element._computeLabelClass(
           {labels: {'Code-Review': {value: -1}}}, 'Code-Review'),
-          'cell label u-monospace u-red');
+      'cell label u-monospace u-red');
       assert.equal(element._computeLabelClass(
           {labels: {'Code-Review': {value: -1}}}, 'Verified'),
-          'cell label u-gray-background');
+      'cell label u-gray-background');
 
       assert.equal(element._computeLabelTitle({labels: {}}, 'Verified'),
           'Label not applicable');
       assert.equal(element._computeLabelTitle(
           {labels: {Verified: {approved: {name: 'Diffy'}}}}, 'Verified'),
-          'Verified\nby Diffy');
+      'Verified\nby Diffy');
       assert.equal(element._computeLabelTitle(
           {labels: {Verified: {approved: {name: 'Diffy'}}}}, 'Code-Review'),
-          'Label not applicable');
+      'Label not applicable');
       assert.equal(element._computeLabelTitle(
           {labels: {Verified: {rejected: {name: 'Diffy'}}}}, 'Verified'),
-          'Verified\nby Diffy');
+      'Verified\nby Diffy');
       assert.equal(element._computeLabelTitle(
           {labels: {'Code-Review': {disliked: {name: 'Diffy'}, value: -1}}},
           'Code-Review'), 'Code-Review\nby Diffy');
@@ -91,19 +91,19 @@
       assert.equal(element._computeLabelTitle(
           {labels: {'Code-Review': {recommended: {name: 'Diffy'},
             rejected: {name: 'Admin'}}}}, 'Code-Review'),
-          'Code-Review\nby Admin');
+      'Code-Review\nby Admin');
       assert.equal(element._computeLabelTitle(
           {labels: {'Code-Review': {approved: {name: 'Diffy'},
             rejected: {name: 'Admin'}}}}, 'Code-Review'),
-          'Code-Review\nby Admin');
+      'Code-Review\nby Admin');
       assert.equal(element._computeLabelTitle(
           {labels: {'Code-Review': {recommended: {name: 'Diffy'},
             disliked: {name: 'Admin'}, value: -1}}}, 'Code-Review'),
-          'Code-Review\nby Admin');
+      'Code-Review\nby Admin');
       assert.equal(element._computeLabelTitle(
           {labels: {'Code-Review': {approved: {name: 'Diffy'},
             disliked: {name: 'Admin'}, value: -1}}}, 'Code-Review'),
-          'Code-Review\nby Diffy');
+      'Code-Review\nby Diffy');
 
       assert.equal(element._computeLabelValue({labels: {}}), '');
       assert.equal(element._computeLabelValue({labels: {}}, 'Verified'), '');
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js
index d5ae7c1..64cedf3 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js
@@ -70,6 +70,7 @@
        *
        * Need sub-property declaration since it is used in template before
        * assignment.
+       *
        * @type {{ selectedChangeIndex: (number|undefined) }}
        *
        */
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.js b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.js
index 61c64ff..e57a389 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.js
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.js
@@ -153,7 +153,7 @@
         this.showNumber = !!(preferences &&
             preferences.legacycid_in_change_table);
         this.visibleChangeTableColumns = preferences.change_table.length > 0 ?
-            this.getVisibleColumns(preferences.change_table) : this.columnNames;
+          this.getVisibleColumns(preferences.change_table) : this.columnNames;
       } else {
         // Not logged in.
         this.showNumber = false;
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_test.html b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_test.html
index d5b9aa9..99741a8 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_test.html
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_test.html
@@ -111,7 +111,7 @@
 
     test('computed fields', () => {
       assert.equal(element._computeLabelNames(
-            [{results: [{_number: 0, labels: {}}]}]).length, 0);
+          [{results: [{_number: 0, labels: {}}]}]).length, 0);
       assert.equal(element._computeLabelNames([
         {results: [
           {_number: 0, labels: {Verified: {approved: {}}}},
diff --git a/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view.js b/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view.js
index 4ac6f5e..43fe0c2 100644
--- a/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view.js
+++ b/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view.js
@@ -108,21 +108,21 @@
       };
       return this.$.restAPI.getDashboard(
           project, dashboard, errFn).then(response => {
-            if (!response) {
-              return;
-            }
+        if (!response) {
+          return;
+        }
+        return {
+          title: response.title,
+          sections: response.sections.map(section => {
+            const suffix = response.foreach ? ' ' + response.foreach : '';
             return {
-              title: response.title,
-              sections: response.sections.map(section => {
-                const suffix = response.foreach ? ' ' + response.foreach : '';
-                return {
-                  name: section.name,
-                  query: (section.query + suffix).replace(
-                      PROJECT_PLACEHOLDER_PATTERN, project),
-                };
-              }),
+              name: section.name,
+              query: (section.query + suffix).replace(
+                  PROJECT_PLACEHOLDER_PATTERN, project),
             };
-          });
+          }),
+        };
+      });
     },
 
     _computeTitle(user) {
@@ -161,11 +161,11 @@
       this._loading = true;
       const {project, dashboard, title, user, sections} = this.params;
       const dashboardPromise = project ?
-          this._getProjectDashboard(project, dashboard) :
-          Promise.resolve(Gerrit.Nav.getUserDashboard(
-              user,
-              sections,
-              title || this._computeTitle(user)));
+        this._getProjectDashboard(project, dashboard) :
+        Promise.resolve(Gerrit.Nav.getUserDashboard(
+            user,
+            sections,
+            title || this._computeTitle(user)));
 
       const checkForNewUser = !project && user === 'self';
       return dashboardPromise
@@ -191,8 +191,8 @@
 
       const queries = res.sections
           .map(section => section.suffixForDashboard ?
-              section.query + ' ' + section.suffixForDashboard :
-              section.query);
+            section.query + ' ' + section.suffixForDashboard :
+            section.query);
 
       if (checkForNewUser) {
         queries.push('owner:self');
@@ -211,7 +211,7 @@
               results,
               isOutgoing: res.sections[i].isOutgoing,
             })).filter((section, i) => i < res.sections.length && (
-                !res.sections[i].hideIfEmpty ||
+              !res.sections[i].hideIfEmpty ||
                 section.results.length));
           });
     },
diff --git a/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js b/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js
index cf5fefd..d3d54f56 100644
--- a/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js
+++ b/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js
@@ -85,7 +85,7 @@
 
     _computeDashboardLinkClass(showDashboardLink, loggedIn) {
       return showDashboardLink && loggedIn ?
-          'dashboardLink' : 'dashboardLink hide';
+        'dashboardLink' : 'dashboardLink hide';
     },
   });
 })();
diff --git a/polygerrit-ui/app/elements/change/gr-account-entry/gr-account-entry.js b/polygerrit-ui/app/elements/change/gr-account-entry/gr-account-entry.js
index 715ddc0..88b2858 100644
--- a/polygerrit-ui/app/elements/change/gr-account-entry/gr-account-entry.js
+++ b/polygerrit-ui/app/elements/change/gr-account-entry/gr-account-entry.js
@@ -159,8 +159,8 @@
 
       const api = this.$.restAPI;
       const xhr = this.allowAnyUser ?
-          api.getSuggestedAccounts(`cansee:${this.change._number} ${input}`) :
-          api.getChangeSuggestedReviewers(this.change._number, input);
+        api.getSuggestedAccounts(`cansee:${this.change._number} ${input}`) :
+        api.getChangeSuggestedReviewers(this.change._number, input);
 
       return xhr.then(reviewers => {
         if (!reviewers) { return []; }
diff --git a/polygerrit-ui/app/elements/change/gr-account-entry/gr-account-entry_test.html b/polygerrit-ui/app/elements/change/gr-account-entry/gr-account-entry_test.html
index 20d127d..724f7da 100644
--- a/polygerrit-ui/app/elements/change/gr-account-entry/gr-account-entry_test.html
+++ b/polygerrit-ui/app/elements/change/gr-account-entry/gr-account-entry_test.html
@@ -217,10 +217,10 @@
     test('allowAnyUser', done => {
       const suggestReviewerStub =
           sandbox.stub(element.$.restAPI, 'getChangeSuggestedReviewers')
-          .returns(Promise.resolve([]));
+              .returns(Promise.resolve([]));
       const suggestAccountStub =
           sandbox.stub(element.$.restAPI, 'getSuggestedAccounts')
-          .returns(Promise.resolve([]));
+              .returns(Promise.resolve([]));
 
       element._getReviewerSuggestions('').then(() => {
         assert.isTrue(suggestReviewerStub.calledOnce);
@@ -252,7 +252,7 @@
 
     test('account-text-changed not fired when input text changed without ' +
         'allowAnyUser', () => {
-          // Spy on query, as that is called when _updateSuggestions proceeds.
+      // Spy on query, as that is called when _updateSuggestions proceeds.
       const changeStub = sandbox.stub();
       sandbox.stub(element.$.restAPI, 'getChangeSuggestedReviewers')
           .returns(Promise.resolve([]));
diff --git a/polygerrit-ui/app/elements/change/gr-account-list/gr-account-list.js b/polygerrit-ui/app/elements/change/gr-account-list/gr-account-list.js
index 950c1e8..458719a 100644
--- a/polygerrit-ui/app/elements/change/gr-account-list/gr-account-list.js
+++ b/polygerrit-ui/app/elements/change/gr-account-list/gr-account-list.js
@@ -39,6 +39,7 @@
       placeholder: String,
       /**
        * Needed for template checking since value is initially set to null.
+       *
        * @type {?Object} */
       pendingConfirmation: {
         type: Object,
@@ -121,7 +122,7 @@
           // a toast tell them why they can't enter it.
           this.$.entry.setText(reviewer);
           this.dispatchEvent(new CustomEvent('show-alert',
-            {detail: {message: VALID_EMAIL_ALERT}, bubbles: true}));
+              {detail: {message: VALID_EMAIL_ALERT}, bubbles: true}));
           return false;
         } else {
           const account = {email: reviewer, _pendingAdd: true};
diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js
index 3e5c4f7..60177d1 100644
--- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js
+++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js
@@ -203,7 +203,7 @@
     /**
      * Fired when an action is tapped.
      *
-     * @event <action key>-tap
+     * @event custom-tap - naming pattern: <action key>-tap
      */
 
     /**
@@ -568,9 +568,9 @@
       }
     },
 
-      /**
-       * @param {string=} actionName
-       */
+    /**
+     * @param {string=} actionName
+     */
     _deleteAndNotify(actionName) {
       if (this.actions[actionName]) {
         delete this.actions[actionName];
@@ -800,6 +800,7 @@
 
     /**
      * Capitalize the first letter and lowecase all others.
+     *
      * @param {string} s
      * @return {string}
      */
@@ -1295,6 +1296,7 @@
     /**
      * Merge sources of change actions into a single ordered array of action
      * values.
+     *
      * @param {!Array} changeActionsRecord
      * @param {!Array} revisionActionsRecord
      * @param {!Array} primariesRecord
@@ -1370,9 +1372,9 @@
 
     _filterPrimaryActions(_topLevelActions) {
       this._topLevelPrimaryActions = _topLevelActions.filter(action =>
-          action.__primary);
+        action.__primary);
       this._topLevelSecondaryActions = _topLevelActions.filter(action =>
-          !action.__primary);
+        !action.__primary);
     },
 
     _computeMenuActions(actionRecord, hiddenActionsRecord) {
diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.html b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.html
index 81fe54e..670de5d 100644
--- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.html
+++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.html
@@ -373,7 +373,7 @@
         assert.isTrue(fetchChangesStub.called);
         element._handleRebaseConfirm({detail: {base: '1234'}});
         assert.deepEqual(fireActionStub.lastCall.args,
-          ['/rebase', rebaseAction, true, {base: '1234'}]);
+            ['/rebase', rebaseAction, true, {base: '1234'}]);
         done();
       });
     });
diff --git a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata-it_test.html b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata-it_test.html
index 5b36221..d62aaee 100644
--- a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata-it_test.html
+++ b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata-it_test.html
@@ -114,7 +114,7 @@
             js_resource_paths: [],
             html_resource_paths: [
               new URL('test/plugin.html?' + Math.random(),
-                      window.location.href).toString(),
+                  window.location.href).toString(),
             ],
           },
         };
@@ -140,7 +140,7 @@
       setup(() => {
         Gerrit.install(p => plugin = p, '0.1',
             new URL('test/plugin.html?' + Math.random(),
-                    window.location.href).toString());
+                window.location.href).toString());
         sandbox.stub(Gerrit, '_arePluginsLoaded').returns(true);
         Gerrit._setPluginsPending([]);
         element = createElement();
diff --git a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.js b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.js
index f2d49d6..a540665 100644
--- a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.js
+++ b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.js
@@ -243,12 +243,12 @@
       this._newHashtag = '';
       this.$.restAPI.setChangeHashtag(
           this.change._number, {add: [newHashtag]}).then(newHashtag => {
-            this.set(['change', 'hashtags'], newHashtag);
-            if (newHashtag !== lastHashtag) {
-              this.dispatchEvent(
-                  new CustomEvent('hashtag-changed', {bubbles: true}));
-            }
-          });
+        this.set(['change', 'hashtags'], newHashtag);
+        if (newHashtag !== lastHashtag) {
+          this.dispatchEvent(
+              new CustomEvent('hashtag-changed', {bubbles: true}));
+        }
+      });
     },
 
     _computeTopicReadOnly(mutable, change) {
@@ -359,7 +359,7 @@
     _computeBranchURL(project, branch) {
       return Gerrit.Nav.getUrlForBranch(branch, project,
           this.change.status == this.ChangeStatus.NEW ? 'open' :
-              this.change.status.toLowerCase());
+            this.change.status.toLowerCase());
     },
 
     _computeTopicURL(topic) {
@@ -410,6 +410,7 @@
     /**
      * Get the user with the specified role on the change. Returns null if the
      * user with that role is the same as the owner.
+     *
      * @param {!Object} change
      * @param {string} role One of the values from _CHANGE_ROLE
      * @return {Object|null} either an accound or null.
diff --git a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_test.html b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_test.html
index b23ac8d..fcbd3d5 100644
--- a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_test.html
+++ b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_test.html
@@ -436,7 +436,7 @@
           {current_revision: '789', revisions: {456: {commit: {parents}}}}));
       assert.equal(element._computeParents(
           {current_revision: '456', revisions: {456: {commit: {parents}}}}),
-          parents);
+      parents);
     });
 
     test('_computeParentsLabel', () => {
diff --git a/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements.js b/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements.js
index 8ec00dd..dfdcd59 100644
--- a/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements.js
+++ b/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements.js
@@ -135,8 +135,8 @@
 
     _computeShowHideIcon(showOptionalLabels) {
       return showOptionalLabels ?
-          'gr-icons:expand-less' :
-          'gr-icons:expand-more';
+        'gr-icons:expand-less' :
+        'gr-icons:expand-more';
     },
 
     _computeSectionClass(show) {
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
index bf3ac4a..ea54239 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
@@ -173,7 +173,7 @@
         computed:
           '_computeChangeIdCommitMessageError(_latestCommitMessage, _change)',
       },
-        /** @type {?} */
+      /** @type {?} */
       _patchRange: {
         type: Object,
       },
@@ -382,16 +382,16 @@
       this.$.commitMessageEditor.disabled = true;
       this.$.restAPI.putChangeCommitMessage(
           this._changeNum, message).then(resp => {
-            this.$.commitMessageEditor.disabled = false;
-            if (!resp.ok) { return; }
+        this.$.commitMessageEditor.disabled = false;
+        if (!resp.ok) { return; }
 
-            this._latestCommitMessage = this._prepareCommitMsgForLinkify(
-                message);
-            this._editingCommitMessage = false;
-            this._reloadWindow();
-          }).catch(err => {
-            this.$.commitMessageEditor.disabled = false;
-          });
+        this._latestCommitMessage = this._prepareCommitMsgForLinkify(
+            message);
+        this._editingCommitMessage = false;
+        this._reloadWindow();
+      }).catch(err => {
+        this.$.commitMessageEditor.disabled = false;
+      });
     },
 
     _reloadWindow() {
@@ -720,7 +720,7 @@
 
     _viewStateChanged(viewState) {
       this._numFilesShown = viewState.numFilesShown ?
-          viewState.numFilesShown : DEFAULT_NUM_FILES_SHOWN;
+        viewState.numFilesShown : DEFAULT_NUM_FILES_SHOWN;
     },
 
     _numFilesShownChanged(numFilesShown) {
@@ -810,6 +810,7 @@
     /**
      * Gets base patch number, if it is a parent try and decide from
      * preference weather to default to `auto merge`, `Parent 1` or `PARENT`.
+     *
      * @param {Object} change
      * @param {Object} patchRange
      * @return {number|string}
@@ -827,7 +828,7 @@
       // check that there is at least 2 parents otherwise fall back to 1,
       // which means there is only one parent.
       const parentCount = parentCounts.hasOwnProperty(1) ?
-          parentCounts[1] : 1;
+        parentCounts[1] : 1;
 
       const preferFirst = this._prefs &&
           this._prefs.default_base_for_merges === 'FIRST_PARENT';
@@ -1216,9 +1217,9 @@
     _getLatestCommitMessage() {
       return this.$.restAPI.getChangeCommitInfo(this._changeNum,
           this.computeLatestPatchNum(this._allPatchSets)).then(commitInfo => {
-            this._latestCommitMessage =
+        this._latestCommitMessage =
                     this._prepareCommitMsgForLinkify(commitInfo.message);
-          });
+      });
     },
 
     _getLatestRevisionSHA(change) {
@@ -1264,7 +1265,7 @@
             this._changeComments = comments;
             this._diffDrafts = Object.assign({}, this._changeComments.drafts);
             this._commentThreads = this._changeComments.getAllThreadsForChange()
-              .map(c => Object.assign({}, c));
+                .map(c => Object.assign({}, c));
           });
     },
 
@@ -1282,6 +1283,7 @@
 
     /**
      * Reload the change.
+     *
      * @param {boolean=} opt_reloadRelatedChanges Reloads the related chanegs
      *     when true.
      * @return {Promise} A promise that resolves when the core data has loaded.
@@ -1673,7 +1675,7 @@
      */
     _handleEditTap() {
       const editInfo = Object.values(this._change.revisions).find(info =>
-          info._number === this.EDIT_NAME);
+        info._number === this.EDIT_NAME);
 
       if (editInfo) {
         Gerrit.Nav.navigateToChange(this._change, this.EDIT_NAME);
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html
index d364ee0..71ca338 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html
@@ -162,7 +162,7 @@
           assert.isFalse(element.$.replyOverlay.opened);
           assert(openSpy.lastCall.calledWithExactly(
               element.$.replyDialog.FocusTarget.ANY),
-              '_openReplyDialog should have been passed ANY');
+          '_openReplyDialog should have been passed ANY');
           assert.equal(openSpy.callCount, 1);
           done();
         });
@@ -1074,7 +1074,7 @@
           MockInteractions.tap(element.$.replyBtn);
           assert(openStub.lastCall.calledWithExactly(
               element.$.replyDialog.FocusTarget.ANY),
-              '_openReplyDialog should have been passed ANY');
+          '_openReplyDialog should have been passed ANY');
           assert.equal(openStub.callCount, 1);
         });
 
@@ -1086,7 +1086,7 @@
             {message: {message: 'text'}});
         assert(openStub.lastCall.calledWithExactly(
             element.$.replyDialog.FocusTarget.BODY),
-            '_openReplyDialog should have been passed BODY');
+        '_openReplyDialog should have been passed BODY');
         assert.equal(openStub.callCount, 1);
         done();
       });
@@ -1511,7 +1511,7 @@
 
     test('_computeEditMode', () => {
       const callCompute = (range, params) =>
-          element._computeEditMode({base: range}, {base: params});
+        element._computeEditMode({base: range}, {base: params});
       assert.isFalse(callCompute({}, {}));
       assert.isTrue(callCompute({}, {edit: true}));
       assert.isFalse(callCompute({basePatchNum: 'PARENT', patchNum: 1}, {}));
@@ -1719,7 +1719,7 @@
 
       element._patchRange = {patchNum: 1};
       element.$.actions.dispatchEvent(new CustomEvent('stop-edit-tap',
-            {bubbles: false}));
+          {bubbles: false}));
     });
 
     suite('plugin endpoints', () => {
diff --git a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js b/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js
index cbc7e42..42cb976 100644
--- a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js
+++ b/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js
@@ -45,7 +45,7 @@
 
     _computeDiffLineURL(file, changeNum, patchNum, comment) {
       const basePatchNum = comment.hasOwnProperty('parent') ?
-          -comment.parent : null;
+        -comment.parent : null;
       return Gerrit.Nav.getUrlForDiffById(this.changeNum, this.projectName,
           file, patchNum, basePatchNum, comment.line,
           this._isOnParent(comment));
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.js
index 214b150..a63ef3c 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.js
+++ b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.js
@@ -83,21 +83,21 @@
       }
       return this.$.restAPI.getRepoBranches(
           input, this.project, SUGGESTIONS_LIMIT).then(response => {
-            const branches = [];
-            let branch;
-            for (const key in response) {
-              if (!response.hasOwnProperty(key)) { continue; }
-              if (response[key].ref.startsWith('refs/heads/')) {
-                branch = response[key].ref.substring('refs/heads/'.length);
-              } else {
-                branch = response[key].ref;
-              }
-              branches.push({
-                name: branch,
-              });
-            }
-            return branches;
+        const branches = [];
+        let branch;
+        for (const key in response) {
+          if (!response.hasOwnProperty(key)) { continue; }
+          if (response[key].ref.startsWith('refs/heads/')) {
+            branch = response[key].ref.substring('refs/heads/'.length);
+          } else {
+            branch = response[key].ref;
+          }
+          branches.push({
+            name: branch,
           });
+        }
+        return branches;
+      });
     },
   });
 })();
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog.js
index f8d7151..f198483 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog.js
+++ b/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog.js
@@ -62,21 +62,21 @@
       }
       return this.$.restAPI.getRepoBranches(
           input, this.project, SUGGESTIONS_LIMIT).then(response => {
-            const branches = [];
-            let branch;
-            for (const key in response) {
-              if (!response.hasOwnProperty(key)) { continue; }
-              if (response[key].ref.startsWith('refs/heads/')) {
-                branch = response[key].ref.substring('refs/heads/'.length);
-              } else {
-                branch = response[key].ref;
-              }
-              branches.push({
-                name: branch,
-              });
-            }
-            return branches;
+        const branches = [];
+        let branch;
+        for (const key in response) {
+          if (!response.hasOwnProperty(key)) { continue; }
+          if (response[key].ref.startsWith('refs/heads/')) {
+            branch = response[key].ref.substring('refs/heads/'.length);
+          } else {
+            branch = response[key].ref;
+          }
+          branches.push({
+            name: branch,
           });
+        }
+        return branches;
+      });
     },
   });
 })();
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js
index 29f8b95..461f030 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js
+++ b/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js
@@ -82,7 +82,7 @@
 
     _getChangeSuggestions(input) {
       return this._getRecentChanges().then(changes =>
-          this._filterChanges(input, changes));
+        this._filterChanges(input, changes));
     },
 
     _filterChanges(input, changes) {
diff --git a/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog.js b/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog.js
index 4fe6d8f..0e6315a 100644
--- a/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog.js
+++ b/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog.js
@@ -142,7 +142,7 @@
       for (const rev of Object.values(change.revisions || {})) {
         if (this.patchNumEquals(rev._number, patchNum)) {
           const parentLength = rev.commit && rev.commit.parents ?
-                rev.commit.parents.length : 0;
+            rev.commit.parents.length : 0;
           return parentLength == 0;
         }
       }
diff --git a/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog_test.html b/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog_test.html
index ee284b9..214363b 100644
--- a/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog_test.html
+++ b/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog_test.html
@@ -179,7 +179,7 @@
       test('computed fields', () => {
         assert.equal(element._computeArchiveDownloadLink(
             {project: 'test/project', _number: 123}, 2, 'tgz'),
-            '/changes/test%2Fproject~123/revisions/2/archive?format=tgz');
+        '/changes/test%2Fproject~123/revisions/2/archive?format=tgz');
       });
 
       test('close event', done => {
diff --git a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.js b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.js
index c6e369c..da8384f 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.js
+++ b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.js
@@ -132,7 +132,7 @@
     _computePatchSetDescription(change, patchNum) {
       const rev = this.getRevisionByPatchNum(change.revisions, patchNum);
       this._patchsetDescription = (rev && rev.description) ?
-          rev.description.substring(0, PATCH_DESC_MAX_LENGTH) : '';
+        rev.description.substring(0, PATCH_DESC_MAX_LENGTH) : '';
     },
 
     _handleDescriptionRemoved(e) {
@@ -160,6 +160,7 @@
 
     /**
      * Update the patchset description with the rest API.
+     *
      * @param {string} desc
      * @param {?(Event|Node)} e
      * @return {!Promise}
@@ -240,7 +241,7 @@
     _computeUploadHelpContainerClass(change, account) {
       const changeIsMerged = change && change.status === MERGED_STATUS;
       const ownerId = change && change.owner && change.owner._account_id ?
-          change.owner._account_id : null;
+        change.owner._account_id : null;
       const userId = account && account._account_id;
       const userIsOwner = ownerId && userId && ownerId === userId;
       const hideContainer = !userIsOwner || changeIsMerged;
diff --git a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js
index fc9d097..0f2b37e 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js
+++ b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js
@@ -498,6 +498,7 @@
     /**
      * The closure compiler doesn't realize this.specialFilePathCompare is
      * valid.
+     *
      * @suppress {checkTypes}
      */
     _normalizeChangeFilesResponse(response) {
@@ -809,7 +810,7 @@
 
     _computeShowHideIcon(path, expandedFilesRecord) {
       return this._isFileExpanded(path, expandedFilesRecord) ?
-          'gr-icons:expand-less' : 'gr-icons:expand-more';
+        'gr-icons:expand-less' : 'gr-icons:expand-more';
     },
 
     _computeFiles(filesByPath, changeComments, patchRange, reviewed, loading) {
@@ -833,7 +834,7 @@
 
     _computeFilesShown(numFilesShown, files) {
       const previousNumFilesShown = this._shownFiles ?
-          this._shownFiles.length : 0;
+        this._shownFiles.length : 0;
 
       const filesShown = files.base.slice(0, numFilesShown);
       this.fire('files-shown-changed', {length: filesShown.length});
@@ -900,19 +901,20 @@
     _computePatchSetDescription(revisions, patchNum) {
       const rev = this.getRevisionByPatchNum(revisions, patchNum);
       return (rev && rev.description) ?
-          rev.description.substring(0, PATCH_DESC_MAX_LENGTH) : '';
+        rev.description.substring(0, PATCH_DESC_MAX_LENGTH) : '';
     },
 
     /**
      * Get a descriptive label for use in the status indicator's tooltip and
      * ARIA label.
+     *
      * @param {string} status
      * @return {string}
      */
     _computeFileStatusLabel(status) {
       const statusCode = this._computeFileStatus(status);
       return FileStatus.hasOwnProperty(statusCode) ?
-          FileStatus[statusCode] : 'Status Unknown';
+        FileStatus[statusCode] : 'Status Unknown';
     },
 
     _isFileExpanded(path, expandedFilesRecord) {
@@ -938,13 +940,14 @@
      * entries in the expanded list, then render each diff corresponding in
      * order by waiting for the previous diff to finish before starting the next
      * one.
+     *
      * @param {!Array} record The splice record in the expanded paths list.
      */
     _expandedPathsChanged(record) {
       // Clear content for any diffs that are not open so if they get re-opened
       // the stale content does not flash before it is cleared and reloaded.
       const collapsedDiffs = this.diffs.filter(diff =>
-          this._expandedFilePaths.indexOf(diff.path) === -1);
+        this._expandedFilePaths.indexOf(diff.path) === -1);
       this._clearCollapsedDiffs(collapsedDiffs);
 
       if (!record) { return; } // Happens after "Collapse all" clicked.
@@ -954,9 +957,9 @@
 
       // Find the paths introduced by the new index splices:
       const newPaths = record.indexSplices
-            .map(splice => splice.object.slice(
-                splice.index, splice.index + splice.addedCount))
-            .reduce((acc, paths) => acc.concat(paths), []);
+          .map(splice => splice.object.slice(
+              splice.index, splice.index + splice.addedCount))
+          .reduce((acc, paths) => acc.concat(paths), []);
 
       // Required so that the newly created diff view is included in this.diffs.
       Polymer.dom.flush();
@@ -982,6 +985,7 @@
      * Given an array of paths and a NodeList of diff elements, render the diff
      * for each path in order, awaiting the previous render to complete before
      * continung.
+     *
      * @param  {!Array<string>} paths
      * @param  {!NodeList<!Object>} diffElements (GrDiffHostElement)
      * @param  {number} initialCount The total number of paths in the pass. This
@@ -1027,6 +1031,7 @@
 
     /**
      * In the given NodeList of diff elements, find the diff for the given path.
+     *
      * @param  {string} path
      * @param  {!NodeList<!Object>} diffElements (GrDiffElement)
      * @return {!Object|undefined} (GrDiffElement)
@@ -1041,6 +1046,7 @@
 
     /**
      * Reset the comments of a modified thread
+     *
      * @param  {string} rootId
      * @param  {string} path
      */
@@ -1087,6 +1093,7 @@
      * Update the loading class for the file list rows. The update is inside a
      * debouncer so that the file list doesn't flash gray when the API requests
      * are reasonably fast.
+     *
      * @param {boolean} loading
      */
     _loadingChanged(loading) {
@@ -1112,6 +1119,7 @@
     /**
      * Given a file path, return whether that path should have visible size bars
      * and be included in the size bars calculation.
+     *
      * @param {string} path
      * @return {boolean}
      */
@@ -1121,6 +1129,7 @@
 
     /**
      * Compute size bar layout values from the file list.
+     *
      * @return {Defs.LayoutStats|undefined}
      */
     _computeSizeBarLayout(shownFilesRecord) {
@@ -1155,6 +1164,7 @@
 
     /**
      * Get the width of the addition bar for a file.
+     *
      * @param {Object} file
      * @param {Defs.LayoutStats} stats
      * @return {number}
@@ -1172,6 +1182,7 @@
 
     /**
      * Get the x-offset of the addition bar for a file.
+     *
      * @param {Object} file
      * @param {Defs.LayoutStats} stats
      * @return {number}
@@ -1183,6 +1194,7 @@
 
     /**
      * Get the width of the deletion bar for a file.
+     *
      * @param {Object} file
      * @param {Defs.LayoutStats} stats
      * @return {number}
@@ -1200,6 +1212,7 @@
 
     /**
      * Get the x-offset of the deletion bar for a file.
+     *
      * @param {Defs.LayoutStats} stats
      * @return {number}
      */
@@ -1223,6 +1236,7 @@
 
     /**
      * Returns true if none of the inline diffs have been expanded.
+     *
      * @return {boolean}
      */
     _noDiffsExpanded() {
@@ -1233,6 +1247,7 @@
      * Method to call via binding when each file list row is rendered. This
      * allows approximate detection of when the dom-repeat has completed
      * rendering.
+     *
      * @param {number} index The index of the row being rendered.
      * @return {string} an empty string.
      */
diff --git a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.html b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.html
index fbf2175..3e4e763 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.html
+++ b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.html
@@ -438,10 +438,10 @@
               '/COMMIT_MSG', 'comment'), '3 comments (1 unresolved)');
       assert.equal(
           element._computeCommentsStringMobile(element.changeComments, parentTo1
-          , '/COMMIT_MSG'), '2c');
+              , '/COMMIT_MSG'), '2c');
       assert.equal(
           element._computeCommentsStringMobile(element.changeComments, _1To2
-          , '/COMMIT_MSG'), '3c');
+              , '/COMMIT_MSG'), '3c');
       assert.equal(
           element._computeDraftsString(element.changeComments, parentTo1,
               'unresolved.file'), '1 draft');
@@ -637,7 +637,7 @@
 
         assert(navStub.lastCall.calledWith(element.change,
             'file_added_in_rev2.txt', '2'),
-            'Should navigate to /c/42/2/file_added_in_rev2.txt');
+        'Should navigate to /c/42/2/file_added_in_rev2.txt');
 
         MockInteractions.pressAndReleaseKeyOn(element, 75, null, 'k');
         MockInteractions.pressAndReleaseKeyOn(element, 75, null, 'k');
@@ -1652,7 +1652,7 @@
 
       element.set('_filesByPath', _filesByPath);
       flushAsynchronousOperations();
-       // Navigates when a file is selected.
+      // Navigates when a file is selected.
       element._openSelectedFile();
       assert.isTrue(navStub.called);
     });
@@ -1713,7 +1713,7 @@
       // Commit message should not have edit controls.
       const editControls =
           Polymer.dom(element.root).querySelectorAll('.row:not(.header)')
-            .map(row => row.querySelector('gr-edit-file-controls'));
+              .map(row => row.querySelector('gr-edit-file-controls'));
       assert.isTrue(editControls[0].classList.contains('invisible'));
     });
 
diff --git a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.js b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.js
index f472331..aa5b61a 100644
--- a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.js
+++ b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.js
@@ -112,7 +112,7 @@
       if (!labels[label.name]) { return null; }
       const labelValue = this._getLabelValue(labels, permittedLabels, label);
       const len = permittedLabels[label.name] != null ?
-          permittedLabels[label.name].length : 0;
+        permittedLabels[label.name].length : 0;
       for (let i = 0; i < len; i++) {
         const val = permittedLabels[label.name][i];
         if (val === labelValue) {
@@ -132,7 +132,7 @@
       const name = e.target.selectedItem.name;
       const value = e.target.selectedItem.getAttribute('value');
       this.dispatchEvent(new CustomEvent(
-        'labels-changed', {detail: {name, value}, bubbles: true}));
+          'labels-changed', {detail: {name, value}, bubbles: true}));
     },
 
     _computeAnyPermittedLabelValues(permittedLabels, label) {
@@ -142,7 +142,7 @@
 
     _computeHiddenClass(permittedLabels, label) {
       return !this._computeAnyPermittedLabelValues(permittedLabels, label) ?
-          'hidden' : '';
+        'hidden' : '';
     },
 
     _computePermittedLabelValues(permittedLabels, label) {
diff --git a/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores_test.html b/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores_test.html
index 24529ec..187c0a6 100644
--- a/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores_test.html
+++ b/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores_test.html
@@ -121,7 +121,7 @@
       const labelName = 'Code-Review';
       assert.strictEqual(element._getVoteForAccount(
           element.change.labels, labelName, element.account),
-          '+1');
+      '+1');
     });
 
     test('_computeColumns', () => {
@@ -166,10 +166,10 @@
           {name: 'Verified', value: null}
       ]);
       element.set(['change', 'labels', 'Verified', 'all'],
-         [{_account_id: 123, value: 1}]);
+          [{_account_id: 123, value: 1}]);
       assert.deepEqual(element._labels, [
-          {name: 'Code-Review', value: null},
-          {name: 'Verified', value: '+1'},
+        {name: 'Code-Review', value: null},
+        {name: 'Verified', value: '+1'},
       ]);
     });
   });
diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js
index d4071c6..6d8bb45 100644
--- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js
+++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js
@@ -102,8 +102,8 @@
       el.set('message.expanded', true);
       let top = el.offsetTop;
       for (let offsetParent = el.offsetParent;
-           offsetParent;
-           offsetParent = offsetParent.offsetParent) {
+        offsetParent;
+        offsetParent = offsetParent.offsetParent) {
         top += offsetParent.offsetTop;
       }
       window.scrollTo(0, top);
@@ -206,6 +206,7 @@
      * Computes message author's file comments for change's message.
      * Method uses this.messages to find next message and relies on messages
      * to be sorted by date field descending.
+     *
      * @param {!Object} changeComments changeComment object, which includes
      *     a method to get all published comments (including robot comments),
      *     which returns a Hash of arrays of comments, filename as key.
diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.js b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.js
index 6c47589..7f4d782 100644
--- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.js
+++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.js
@@ -157,6 +157,7 @@
      * Determines whether or not the given change has a parent change. If there
      * is a relation chain, and the change id is not the last item of the
      * relation chain, there is a parent.
+     *
      * @param  {number} currentChangeId
      * @param  {!Array} relatedChanges
      * @return {boolean}
@@ -215,6 +216,7 @@
     /**
      * Do the given objects describe the same change? Compares the changes by
      * their numbers.
+     *
      * @see /Documentation/rest-api-changes.html#change-info
      * @see /Documentation/rest-api-changes.html#related-change-and-commit-info
      * @param {!Object} a Either ChangeInfo or RelatedChangeAndCommitInfo
@@ -232,6 +234,7 @@
      * SubmittedTogetherInfo responses) or get the change number from a
      * RelatedChangeAndCommitInfo (such as those included in a
      * RelatedChangesInfo response).
+     *
      * @see /Documentation/rest-api-changes.html#change-info
      * @see /Documentation/rest-api-changes.html#related-change-and-commit-info
      *
@@ -344,7 +347,7 @@
 
     _computeSubmittedTogetherClass(submittedTogether) {
       if (!submittedTogether || (
-          submittedTogether.changes.length === 0 &&
+        submittedTogether.changes.length === 0 &&
           !submittedTogether.non_visible_changes)) {
         return 'hidden';
       }
diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_test.html b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_test.html
index 48cc565..c82bc31 100644
--- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_test.html
+++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_test.html
@@ -319,7 +319,7 @@
         sandbox.stub(element, '_getCherryPicks')
             .returns(Promise.resolve());
         conflictsStub = sandbox.stub(element, '_getConflicts')
-          .returns(Promise.resolve());
+            .returns(Promise.resolve());
       });
 
       test('request conflicts if open and mergeable', () => {
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js
index 9f9f026..40a0922 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js
@@ -91,11 +91,11 @@
      * @event comment-refresh
      */
 
-     /**
-      * Fires when the state of the send button (enabled/disabled) changes.
-      *
-      * @event send-disabled-changed
-      */
+    /**
+     * Fires when the state of the send button (enabled/disabled) changes.
+     *
+     * @event send-disabled-changed
+     */
 
     properties: {
       /**
@@ -264,7 +264,7 @@
       this.fetchChangeUpdates(this.change, this.$.restAPI)
           .then(result => {
             this.knownLatestState = result.isLatest ?
-                LatestPatchState.LATEST : LatestPatchState.NOT_LATEST;
+              LatestPatchState.LATEST : LatestPatchState.NOT_LATEST;
           });
 
       this._focusOn(opt_focusTarget);
@@ -406,16 +406,16 @@
 
       return this.$.restAPI.removeChangeReviewer(this.change._number,
           account._account_id).then(response => {
-            if (!response.ok) { return response; }
+        if (!response.ok) { return response; }
 
-            const reviewers = this.change.reviewers[type] || [];
-            for (let i = 0; i < reviewers.length; i++) {
-              if (reviewers[i]._account_id == account._account_id) {
-                this.splice(['change', 'reviewers', type], i, 1);
-                break;
-              }
-            }
-          });
+        const reviewers = this.change.reviewers[type] || [];
+        for (let i = 0; i < reviewers.length; i++) {
+          if (reviewers[i]._account_id == account._account_id) {
+            this.splice(['change', 'reviewers', type], i, 1);
+            break;
+          }
+        }
+      });
     },
 
     _mapReviewer(reviewer) {
@@ -677,6 +677,7 @@
      * Generates a function to filter out reviewer/CC entries. When isCCs is
      * truthy, the function filters out entries that already exist in this._ccs.
      * When falsy, the function filters entries that exist in this._reviewers.
+     *
      * @param {boolean} isCCs
      * @return {!Function}
      */
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.html b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.html
index f9108c7..733a490 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.html
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.html
@@ -372,8 +372,8 @@
       }).then(() => {
         assert.isFalse(isVisible(element.$.reviewerConfirmationOverlay));
         const additions = cc ?
-            element.$$('#ccs').additions() :
-            element.$.reviewers.additions();
+          element.$$('#ccs').additions() :
+          element.$.reviewers.additions();
         assert.deepEqual(
             additions,
             [
@@ -761,7 +761,7 @@
       // Send and purge and verify moves, delete cc3.
       element.send()
           .then(keepReviewers =>
-              element._purgeReviewersPendingRemove(false, keepReviewers))
+            element._purgeReviewersPendingRemove(false, keepReviewers))
           .then(() => {
             assert.deepEqual(
                 mutations, [
diff --git a/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list.js b/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list.js
index ab1f55e..ab67704 100644
--- a/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list.js
+++ b/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list.js
@@ -101,6 +101,7 @@
 
     /**
      * Returns hash of labels to max permitted score.
+     *
      * @param {!Object} change
      * @returns {!Object} labels to max permitted scores hash
      */
@@ -115,6 +116,7 @@
 
     /**
      * Returns max permitted score for reviewer.
+     *
      * @param {!Object} reviewer
      * @param {!Object} change
      * @param {string} label
diff --git a/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list_test.html b/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list_test.html
index 1a406c9..81827fd 100644
--- a/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list_test.html
+++ b/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list_test.html
@@ -194,7 +194,7 @@
       element.maxReviewersDisplayed = 5;
       for (let i = 0; i < 6; i++) {
         reviewers.push(
-          {email: i+'reviewer@google.com', name: 'reviewer-' + i});
+            {email: i+'reviewer@google.com', name: 'reviewer-' + i});
       }
       element.ccsOnly = true;
 
@@ -217,7 +217,7 @@
       element.maxReviewersDisplayed = 5;
       for (let i = 0; i < 7; i++) {
         reviewers.push(
-          {email: i+'reviewer@google.com', name: 'reviewer-' + i});
+            {email: i+'reviewer@google.com', name: 'reviewer-' + i});
       }
       element.ccsOnly = true;
 
@@ -240,7 +240,7 @@
       const reviewers = [];
       for (let i = 0; i < 7; i++) {
         reviewers.push(
-          {email: i+'reviewer@google.com', name: 'reviewer-' + i});
+            {email: i+'reviewer@google.com', name: 'reviewer-' + i});
       }
       element.ccsOnly = true;
 
@@ -263,7 +263,7 @@
       element.maxReviewersDisplayed = 5;
       for (let i = 0; i < 100; i++) {
         reviewers.push(
-          {email: i+'reviewer@google.com', name: 'reviewer-' + i});
+            {email: i+'reviewer@google.com', name: 'reviewer-' + i});
       }
       element.ccsOnly = true;
 
@@ -296,7 +296,7 @@
           },
           Bar: {
             all: [{_account_id: 1, permitted_voting_range: {max: 1}},
-                  {_account_id: 7, permitted_voting_range: {max: 1}}],
+              {_account_id: 7, permitted_voting_range: {max: 1}}],
           },
           FooBar: {
             all: [{_account_id: 7, value: 0}],
diff --git a/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list.js b/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list.js
index 69d77f6..dd6db8c 100644
--- a/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list.js
+++ b/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list.js
@@ -62,6 +62,7 @@
      *  - Unresolved threads without drafts (reverse chronological)
      *  - Resolved threads with drafts (reverse chronological)
      *  - Resolved threads without drafts (reverse chronological)
+     *
      * @param {!Object} changeRecord
      */
     _computeSortedThreads(changeRecord) {
@@ -109,8 +110,8 @@
 
       const lastNonDraftComment =
           (lastComment.__draft && thread.comments.length > 1) ?
-          thread.comments[thread.comments.length - 2] :
-          lastComment;
+            thread.comments[thread.comments.length - 2] :
+            lastComment;
 
       return {
         thread,
diff --git a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.html b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.html
index 5df5444..7732870 100644
--- a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.html
+++ b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.html
@@ -76,7 +76,7 @@
           'none');
       assert.notEqual(getComputedStyle(element.$$('gr-account-dropdown'))
           .display,
-          'none');
+      'none');
       assert.notEqual(getComputedStyle(element.$$('.settingsButton')).display,
           'none');
     });
diff --git a/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.html b/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.html
index c0ef3ac..3d0f6f2 100644
--- a/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.html
+++ b/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.html
@@ -217,6 +217,7 @@
 
       /**
        * Setup router implementation.
+       *
        * @param {function(!string)} navigate the router-abstracted equivalent of
        *     `window.location.href = ...`. Takes a string.
        * @param {function(!Object): string} generateUrl generates a URL given
@@ -253,6 +254,7 @@
 
       /**
        * Generate a URL for the given route parameters.
+       *
        * @param {Object} params
        * @return {string}
        */
@@ -329,6 +331,7 @@
 
       /**
        * Navigate to a search for changes with the given status.
+       *
        * @param {string} status
        */
       navigateToStatusSearch(status) {
@@ -340,6 +343,7 @@
 
       /**
        * Navigate to a search query
+       *
        * @param {string} query
        * @param {number=} opt_offset
        */
@@ -538,6 +542,7 @@
 
       /**
        * Navigate to an arbitrary relative URL.
+       *
        * @param {string} relativeUrl
        */
       navigateToRelativeUrl(relativeUrl) {
@@ -560,6 +565,7 @@
 
       /**
        * Navigate to a repo settings page.
+       *
        * @param {string} repoName
        */
       navigateToRepo(repoName) {
@@ -722,11 +728,11 @@
       getUserDashboard(user = 'self', sections = DEFAULT_SECTIONS,
           title = '') {
         sections = sections
-          .filter(section => (user === 'self' || !section.selfOnly))
-          .map(section => Object.assign({}, section, {
-            name: section.name,
-            query: section.query.replace(USER_PLACEHOLDER_PATTERN, user),
-          }));
+            .filter(section => (user === 'self' || !section.selfOnly))
+            .map(section => Object.assign({}, section, {
+              name: section.name,
+              query: section.query.replace(USER_PLACEHOLDER_PATTERN, user),
+            }));
         return {title, sections};
       },
     };
diff --git a/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting.js b/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting.js
index 36126e4..9b4c611 100644
--- a/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting.js
+++ b/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting.js
@@ -175,6 +175,7 @@
 
     /**
      * The default reporter reports events immediately.
+     *
      * @param {string} type
      * @param {string} category
      * @param {string} eventName
@@ -195,13 +196,14 @@
         console.error(eventValue.error || eventName);
       } else {
         console.log(eventName + (eventValue !== undefined ?
-            (': ' + eventValue) : ''));
+          (': ' + eventValue) : ''));
       }
     },
 
     /**
      * The caching reporter will queue reports until plugins have loaded, and
      * log events immediately if they're reported after plugins have loaded.
+     *
      * @param {string} type
      * @param {string} category
      * @param {string} eventName
@@ -345,6 +347,7 @@
     /**
      * Reports just line timeEnd, but additionally reports an average given a
      * denominator and a separate reporiting name for the average.
+     *
      * @param {string} name Timing name.
      * @param {string} averageName Average timing name.
      * @param {number} denominator Number by which to divide the total to
@@ -363,6 +366,7 @@
 
     /**
      * Send a timing report with an arbitrary time value.
+     *
      * @param {string} name Timing name.
      * @param {number} time The time to report as an integer of milliseconds.
      */
@@ -375,6 +379,7 @@
      * Get a timer object to for reporing a user timing. The start time will be
      * the time that the object has been created, and the end time will be the
      * time that the "end" method is called on the object.
+     *
      * @param {string} name Timing name.
      * @returns {!Object} The timer object.
      */
@@ -421,6 +426,7 @@
 
     /**
      * Log timing information for an RPC.
+     *
      * @param {string} anonymizedUrl The URL of the RPC with tokens obfuscated.
      * @param {number} elapsed The time elapsed of the RPC.
      */
diff --git a/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting_test.html b/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting_test.html
index 8b85074..cd5e2e5 100644
--- a/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting_test.html
+++ b/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting_test.html
@@ -66,11 +66,11 @@
           element.reporter.calledWithExactly(
               'timing-report', 'UI Latency', 'App Started',
               NOW_TIME - fakePerformance.navigationStart
-      ));
+          ));
       assert.isTrue(
           element.reporter.calledWithExactly(
               'lifecycle', 'Page Visibility', 'hidden'
-      ));
+          ));
     });
 
     test('WebComponentsReady', () => {
diff --git a/polygerrit-ui/app/elements/core/gr-router/gr-router.js b/polygerrit-ui/app/elements/core/gr-router/gr-router.js
index 1e6efa1..2c9a732 100644
--- a/polygerrit-ui/app/elements/core/gr-router/gr-router.js
+++ b/polygerrit-ui/app/elements/core/gr-router/gr-router.js
@@ -103,6 +103,7 @@
 
     /**
      * Support vestigial params from GWT UI.
+     *
      * @see Issue 7673.
      * @type {!RegExp}
      */
@@ -159,6 +160,7 @@
    * the hash of diff URLs. In this format, a number on its own indicates that
    * line number in the revision of the diff. A number prefixed by either an 'a'
    * or a 'b' indicates that line number of the base of the diff.
+   *
    * @type {RegExp}
    */
   const LINE_ADDRESS_PATTERN = /^([ab]?)(\d+)$/;
@@ -442,8 +444,8 @@
         // If there is a repo name provided, make sure to substitute it into the
         // ${repo} (or legacy ${project}) query tokens.
         const query = opt_repoName ?
-            section.query.replace(REPO_TOKEN_PATTERN, opt_repoName) :
-            section.query;
+          section.query.replace(REPO_TOKEN_PATTERN, opt_repoName) :
+          section.query;
         return encodeURIComponent(section.name) + '=' +
             encodeURIComponent(query);
       });
@@ -521,6 +523,7 @@
      * Given an object of parameters, potentially including a `patchNum` or a
      * `basePatchNum` or both, return a string representation of that range. If
      * no range is indicated in the params, the empty string is returned.
+     *
      * @param {!Object} params
      * @return {string}
      */
@@ -597,6 +600,7 @@
     /**
      * Redirect the user to login using the given return-URL for redirection
      * after authentication success.
+     *
      * @param {string} returnUrl
      */
     _redirectToLogin(returnUrl) {
@@ -609,6 +613,7 @@
      * Hashes parsed by page.js exclude "inner" hashes, so a URL like "/a#b#c"
      * is parsed to have a hash of "b" rather than "b#c". Instead, this method
      * parses hashes correctly. Will return an empty string if there is no hash.
+     *
      * @param {!string} canonicalPath
      * @return {!string} Everything after the first '#' ("a#b#c" -> "b#c").
      */
@@ -629,6 +634,7 @@
      * Check to see if the user is logged in and return a promise that only
      * resolves if the user is logged in. If the user us not logged in, the
      * promise is rejected and the page is redirected to the login flow.
+     *
      * @param {!Object} data The parsed route data.
      * @return {!Promise<!Object>} A promise yielding the original route data
      *     (if it resolves).
diff --git a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.js b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.js
index b04bbfd..9a2be96 100644
--- a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.js
+++ b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.js
@@ -204,6 +204,7 @@
     /**
      * Determine what array of possible suggestions should be provided
      *     to _getSearchSuggestions.
+     *
      * @param {string} input - The full search term, in lowercase.
      * @return {!Promise} This returns a promise that resolves to an array of
      *     suggestion objects.
@@ -245,6 +246,7 @@
 
     /**
      * Get the sorted, pruned list of suggestions for the current search query.
+     *
      * @param {string} input - The complete search query.
      * @return {!Promise} This returns a promise that resolves to an array of
      *     suggestions.
diff --git a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar_test.html b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar_test.html
index 1bc3c9d..b162828 100644
--- a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar_test.html
+++ b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar_test.html
@@ -59,8 +59,8 @@
 
     getActiveElement = () => {
       return document.activeElement.shadowRoot ?
-          document.activeElement.shadowRoot.activeElement :
-          document.activeElement;
+        document.activeElement.shadowRoot.activeElement :
+        document.activeElement;
     };
 
     test('enter in search input fires event', done => {
diff --git a/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search.js b/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search.js
index a921308..f2f9a4c 100644
--- a/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search.js
+++ b/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search.js
@@ -70,6 +70,7 @@
 
     /**
      * Fetch from the API the predicted projects.
+     *
      * @param {string} predicate - The first part of the search term, e.g.
      *     'project'
      * @param {string} expression - The second part of the search term, e.g.
@@ -90,6 +91,7 @@
 
     /**
      * Fetch from the API the predicted groups.
+     *
      * @param {string} predicate - The first part of the search term, e.g.
      *     'ownerin'
      * @param {string} expression - The second part of the search term, e.g.
@@ -111,6 +113,7 @@
 
     /**
      * Fetch from the API the predicted accounts.
+     *
      * @param {string} predicate - The first part of the search term, e.g.
      *     'owner'
      * @param {string} expression - The second part of the search term, e.g.
@@ -144,8 +147,8 @@
       return accounts.map(account => ({
         label: account.name || '',
         text: account.email ?
-            `${predicate}:${account.email}` :
-            `${predicate}:"${this._accountOrAnon(account)}"`,
+          `${predicate}:${account.email}` :
+          `${predicate}:"${this._accountOrAnon(account)}"`,
       }));
     },
   });
diff --git a/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js b/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js
index 4b64f7b..6c0d19a 100644
--- a/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js
+++ b/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js
@@ -268,9 +268,9 @@
     const all = comments.concat(drafts).concat(robotComments);
 
     const baseComments = all.filter(c =>
-        this._isInBaseOfPatchRange(c, patchRange));
+      this._isInBaseOfPatchRange(c, patchRange));
     const revisionComments = all.filter(c =>
-        this._isInRevisionOfPatchRange(c, patchRange));
+      this._isInRevisionOfPatchRange(c, patchRange));
 
     return {
       meta: {
@@ -368,7 +368,7 @@
     const threads = this.getCommentThreads(this._sortComments(comments));
 
     const unresolvedThreads = threads
-      .filter(thread =>
+        .filter(thread =>
           thread.comments.length &&
           thread.comments[thread.comments.length - 1].unresolved);
 
@@ -426,12 +426,13 @@
   };
 
   /**
-  * Whether the given comment should be included in the base side of the
-  * given patch range.
-  * @param {!Object} comment
-  * @param {!Defs.patchRange} range
-  * @return {boolean}
-  */
+   * Whether the given comment should be included in the base side of the
+   * given patch range.
+   *
+   * @param {!Object} comment
+   * @param {!Defs.patchRange} range
+   * @return {boolean}
+   */
   ChangeComments.prototype._isInBaseOfPatchRange = function(comment, range) {
     // If the base of the patch range is a parent of a merge, and the comment
     // appears on a specific parent then only show the comment if the parent
@@ -459,6 +460,7 @@
   /**
    * Whether the given comment should be included in the revision side of the
    * given patch range.
+   *
    * @param {!Object} comment
    * @param {!Defs.patchRange} range
    * @return {boolean}
@@ -471,6 +473,7 @@
 
   /**
    * Whether the given comment should be included in the given patch range.
+   *
    * @param {!Object} comment
    * @param {!Defs.patchRange} range
    * @return {boolean|undefined}
@@ -511,7 +514,7 @@
 
       return Promise.all(promises).then(([comments, robotComments, drafts]) => {
         this._changeComments = new ChangeComments(comments,
-          robotComments, drafts, changeNum);
+            robotComments, drafts, changeNum);
         return this._changeComments;
       });
     },
diff --git a/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api_test.html b/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api_test.html
index 1e53a14..1ca2a69 100644
--- a/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api_test.html
+++ b/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api_test.html
@@ -107,7 +107,7 @@
       let draftStub;
       setup(() => {
         commentStub = sandbox.stub(element.$.restAPI, 'getDiffComments')
-          .returns(Promise.resolve({}));
+            .returns(Promise.resolve({}));
         robotCommentStub = sandbox.stub(element.$.restAPI,
             'getDiffRobotComments').returns(Promise.resolve({}));
         draftStub = sandbox.stub(element.$.restAPI, 'getDiffDrafts')
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder-unified.js b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder-unified.js
index 9a04b1f..247ccf7 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder-unified.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder-unified.js
@@ -102,7 +102,7 @@
     let tr = content.parentElement.parentElement;
     while (tr = tr.nextSibling) {
       if (tr.classList.contains('both') || (
-          (side === 'left' && tr.classList.contains('remove')) ||
+        (side === 'left' && tr.classList.contains('remove')) ||
           (side === 'right' && tr.classList.contains('add')))) {
         return tr.querySelector('.contentText');
       }
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.html b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.html
index cc66e3b..2a2b753 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.html
+++ b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.html
@@ -226,8 +226,8 @@
         getLineNumberByChild(node) {
           const lineEl = this.getLineElByChild(node);
           return lineEl ?
-              parseInt(lineEl.getAttribute('data-value'), 10) :
-              null;
+            parseInt(lineEl.getAttribute('data-value'), 10) :
+            null;
         },
 
         getContentByLine(lineNumber, opt_side, opt_root) {
@@ -256,7 +256,7 @@
 
         getSideByLineEl(lineEl) {
           return lineEl.classList.contains(GrDiffBuilder.Side.RIGHT) ?
-          GrDiffBuilder.Side.RIGHT : GrDiffBuilder.Side.LEFT;
+            GrDiffBuilder.Side.RIGHT : GrDiffBuilder.Side.LEFT;
         },
 
         emitGroup(group, sectionEl) {
@@ -309,7 +309,7 @@
           const createFn = this.createCommentFn;
           if (this.isImageDiff) {
             builder = new GrDiffBuilderImage(diff, comments, createFn, prefs,
-              this.diffElement, this.baseImage, this.revisionImage);
+                this.diffElement, this.baseImage, this.revisionImage);
           } else if (diff.binary) {
             // If the diff is binary, but not an image.
             return new GrDiffBuilderBinary(diff, comments, prefs,
@@ -385,8 +385,8 @@
 
                 // If endIndex isn't present, continue to the end of the line.
                 const endIndex = highlight.endIndex === undefined ?
-                    line.text.length :
-                    highlight.endIndex;
+                  line.text.length :
+                  highlight.endIndex;
 
                 GrAnnotation.annotateElement(
                     el,
@@ -452,6 +452,7 @@
          * which, in turn, triggers a reflow on the page. Create a hidden
          * thread, attach it to the page, and remove it so the stylesheet will
          * already exist and the user's comment will be quick to load.
+         *
          * @see https://gerrit-review.googlesource.com/c/82213/
          */
         _preRenderThread() {
@@ -489,6 +490,7 @@
         /**
          * Get the approximate length of the diff as the sum of the maximum
          * length of the chunks.
+         *
          * @return {number}
          */
         getDiffLength() {
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.js b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.js
index 4b85c22..f37b5d8 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.js
@@ -95,6 +95,7 @@
 
   /**
    * Abstract method
+   *
    * @param {string} outputEl
    * @param {number} fontSize
    */
@@ -104,6 +105,7 @@
 
   /**
    * Abstract method
+   *
    * @param {Object} group
    */
   GrDiffBuilder.prototype.buildSectionElement = function() {
@@ -186,7 +188,7 @@
           continue;
         }
         const lineNumber = opt_side === 'left' ?
-            line.beforeNumber : line.afterNumber;
+          line.beforeNumber : line.afterNumber;
         if (lineNumber < start || lineNumber > end) { continue; }
 
         if (out_lines) { out_lines.push(line); }
@@ -369,7 +371,7 @@
       // thread and append to it.
       if (comment.in_reply_to) {
         const thread = threads.find(thread =>
-            thread.comments.some(c => c.id === comment.in_reply_to));
+          thread.comments.some(c => c.id === comment.in_reply_to));
         if (thread) {
           thread.comments.push(comment);
           continue;
@@ -623,6 +625,7 @@
   /**
    * Finds the next DIV.contentText element following the given element, and on
    * the same side. Will only search within a group.
+   *
    * @param {HTMLElement} content
    * @param {string} side Either 'left' or 'right'
    * @return {HTMLElement}
@@ -634,6 +637,7 @@
   /**
    * Determines whether the given group is either totally an addition or totally
    * a removal.
+   *
    * @param {!Object} group (GrDiffGroup)
    * @return {boolean}
    */
@@ -646,6 +650,7 @@
   /**
    * Set the blame information for the diff. For any already-rendered line,
    * re-render its blame cell content.
+   *
    * @param {Object} blame
    */
   GrDiffBuilder.prototype.setBlame = function(blame) {
@@ -673,6 +678,7 @@
 
   /**
    * Find the blame cell for a given line number.
+   *
    * @param {number} lineNum
    * @return {HTMLTableDataCellElement}
    */
@@ -685,6 +691,7 @@
    * Given a base line number, return the commit containing that line in the
    * current set of blame information. If no blame information has been
    * provided, null is returned.
+   *
    * @param {number} lineNum
    * @return {Object} The commit information.
    */
@@ -704,6 +711,7 @@
   /**
    * Given the number of a base line, get the content for the blame cell of that
    * line. If there is no blame information for that line, returns null.
+   *
    * @param {number} lineNum
    * @param {Object=} opt_commit Optionally provide the commit object, so that
    *     it does not need to be searched.
@@ -728,6 +736,7 @@
   /**
    * Create a blame cell for the given base line. Blame information will be
    * included in the cell if available.
+   *
    * @param {GrDiffLine} line
    * @return {HTMLTableDataCellElement}
    */
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder_test.html b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder_test.html
index 3238cbc..9a88ac9 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder_test.html
+++ b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder_test.html
@@ -441,13 +441,13 @@
       };
       assert.deepEqual(builder._getCommentsForLine(comments, line),
           [{id: 'l3', line: 3, __commentSide: 'left'},
-          {id: 'r5', line: 5, __commentSide: 'right'}]);
+            {id: 'r5', line: 5, __commentSide: 'right'}]);
       assert.deepEqual(builder._getCommentsForLine(comments, line,
           GrDiffBuilder.Side.LEFT), [{id: 'l3', line: 3,
-            __commentSide: 'left'}]);
+        __commentSide: 'left'}]);
       assert.deepEqual(builder._getCommentsForLine(comments, line,
           GrDiffBuilder.Side.RIGHT), [{id: 'r5', line: 5,
-            __commentSide: 'right'}]);
+        __commentSide: 'right'}]);
     });
 
     test('comment thread group creation', () => {
@@ -901,7 +901,7 @@
 
       test('no plugin layers', () => {
         const getDiffLayersStub = sinon.stub(element.$.jsAPI, 'getDiffLayers')
-                                       .returns([]);
+            .returns([]);
         element.attached();
         assert.isTrue(getDiffLayersStub.called);
         assert.equal(element._layers.length, initialLayersCount);
@@ -909,7 +909,7 @@
 
       test('with plugin layers', () => {
         const getDiffLayersStub = sinon.stub(element.$.jsAPI, 'getDiffLayers')
-                                       .returns([{}, {}]);
+            .returns([{}, {}]);
         element.attached();
         assert.isTrue(getDiffLayersStub.called);
         assert.equal(element._layers.length, initialLayersCount+2);
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-comment-thread/gr-diff-comment-thread.js b/polygerrit-ui/app/elements/diff/gr-diff-comment-thread/gr-diff-comment-thread.js
index d5e6855..4ef173a 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-comment-thread/gr-diff-comment-thread.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-comment-thread/gr-diff-comment-thread.js
@@ -128,7 +128,7 @@
         commentEl.collapsed = false;
       } else {
         const range = opt_range ? opt_range :
-            lastComment ? lastComment.range : undefined;
+          lastComment ? lastComment.range : undefined;
         const unresolved = lastComment ? lastComment.unresolved : undefined;
         this.addDraft(opt_lineNum, range, unresolved);
       }
@@ -453,6 +453,7 @@
 
     /**
      * Load the project config when a project name has been provided.
+     *
      * @param {string} name The project name.
      */
     _projectNameChanged(name) {
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-comment-thread/gr-diff-comment-thread_test.html b/polygerrit-ui/app/elements/diff/gr-diff-comment-thread/gr-diff-comment-thread_test.html
index b525a60..868be90 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-comment-thread/gr-diff-comment-thread_test.html
+++ b/polygerrit-ui/app/elements/diff/gr-diff-comment-thread/gr-diff-comment-thread_test.html
@@ -464,7 +464,7 @@
             done();
           });
           draftEl.fire('comment-discard', {comment: draftEl.comment},
-          {bubbles: false});
+              {bubbles: false});
         });
 
     test('first editing comment does not add __otherEditing attribute', () => {
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-comment/gr-diff-comment.js b/polygerrit-ui/app/elements/diff/gr-diff-comment/gr-diff-comment.js
index 90d465f..6de0746 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-comment/gr-diff-comment.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-comment/gr-diff-comment.js
@@ -425,7 +425,7 @@
       // Ignore saves started while already saving.
       if (this.disabled) { return; }
       const timingLabel = this.comment.id ?
-          REPORT_UPDATE_DRAFT : REPORT_CREATE_DRAFT;
+        REPORT_UPDATE_DRAFT : REPORT_CREATE_DRAFT;
       const timer = this.$.reporting.getTimer(timingLabel);
       this.set('comment.__editing', false);
       return this.save().then(() => { timer.end(); });
@@ -568,13 +568,13 @@
       this._showStartRequest();
       return this.$.restAPI.deleteDiffDraft(this.changeNum, this.patchNum,
           draft).then(result => {
-            if (result.ok) {
-              this._showEndRequest();
-            } else {
-              this._handleFailedDraftRequest();
-            }
-            return result;
-          });
+        if (result.ok) {
+          this._showEndRequest();
+        } else {
+          this._handleFailedDraftRequest();
+        }
+        return result;
+      });
     },
 
     _getPatchNum() {
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.js b/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.js
index aee7a62..556a53a 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.js
@@ -66,7 +66,7 @@
        * the first chunk) the next time the diff renders. It is set back to null
        * when used.
        *
-       * @type (?number)
+       * @type {?number}
        */
       initialLineNumber: {
         type: Number,
@@ -173,6 +173,7 @@
 
     /**
      * Get the line number element targeted by the cursor row and side.
+     *
      * @return {?Element|undefined}
      */
     getTargetLineElement() {
@@ -240,6 +241,7 @@
      * {leftSide: false, number: 123} for line 123 of the revision, or
      * {leftSide: true, number: 321} for line 321 of the base patch.
      * Returns null if an address is not available.
+     *
      * @return {?Object}
      */
     getAddress() {
@@ -304,7 +306,7 @@
       if (this._getViewMode() === DiffViewMode.SIDE_BY_SIDE &&
           this._isTargetBlank()) {
         this.side = this.side === DiffSides.LEFT ?
-            DiffSides.RIGHT : DiffSides.LEFT;
+          DiffSides.RIGHT : DiffSides.LEFT;
       }
     },
 
@@ -364,6 +366,7 @@
     /**
      * Setup and tear down on-render listeners for any diffs that are added or
      * removed from the cursor.
+     *
      * @private
      */
     _diffsChanged(changeRecord) {
@@ -380,15 +383,15 @@
         splice = changeRecord.indexSplices[spliceIdx];
 
         for (i = splice.index;
-            i < splice.index + splice.addedCount;
-            i++) {
+          i < splice.index + splice.addedCount;
+          i++) {
           this.listen(this.diffs[i], 'render-start', '_handleDiffRenderStart');
           this.listen(this.diffs[i], 'render-content', 'handleDiffUpdate');
         }
 
         for (i = 0;
-            i < splice.removed && splice.removed.length;
-            i++) {
+          i < splice.removed && splice.removed.length;
+          i++) {
           this.unlisten(splice.removed[i],
               'render-start', '_handleDiffRenderStart');
           this.unlisten(splice.removed[i],
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-annotation.js b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-annotation.js
index c1d53aa..ab2e65d 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-annotation.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-annotation.js
@@ -31,6 +31,7 @@
     /**
      * The DOM API textContent.length calculation is broken when the text
      * contains Unicode. See https://mathiasbynens.be/notes/javascript-unicode .
+     *
      * @param  {!Text} node text node.
      * @return {number} The length of the text.
      */
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-annotation_test.html b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-annotation_test.html
index 652aa4c..c07d370 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-annotation_test.html
+++ b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-annotation_test.html
@@ -166,7 +166,7 @@
       assert.equal(layer4[0].textContent +
           layer4[1].textContent +
           layer4[2].textContent,
-          layers[3]);
+      layers[3]);
     });
 
     test('splitTextNode', () => {
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight.js b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight.js
index af8725e..cd5b53a 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight.js
@@ -107,6 +107,7 @@
      * Merges multiple ranges, accounts for triple click, accounts for
      * syntax highligh, convert native DOM Range objects to Gerrit concepts
      * (line, side, etc).
+     *
      * @return {({
      *   start: {
      *     node: Node,
@@ -142,6 +143,7 @@
 
     /**
      * Normalize a specific DOM Range.
+     *
      * @return {!Object} fixed normalized range
      */
     _normalizeRange(domRange) {
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight_test.html b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight_test.html
index b10e3cc..1c37380 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight_test.html
+++ b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight_test.html
@@ -259,12 +259,12 @@
       };
 
       const getActionRange = () =>
-          Polymer.dom(element.root).querySelector(
-              'gr-selection-action-box').range;
+        Polymer.dom(element.root).querySelector(
+            'gr-selection-action-box').range;
 
       const getActionSide = () =>
-          Polymer.dom(element.root).querySelector(
-              'gr-selection-action-box').side;
+        Polymer.dom(element.root).querySelector(
+            'gr-selection-action-box').side;
 
       const getLineElByChild = node => {
         const stubs = contentStubs.find(stub => stub.contentTd.contains(node));
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-range-normalizer.js b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-range-normalizer.js
index eb4123d..927c759 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-range-normalizer.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-range-normalizer.js
@@ -97,6 +97,7 @@
     /**
      * The DOM API textContent.length calculation is broken when the text
      * contains Unicode. See https://mathiasbynens.be/notes/javascript-unicode .
+     *
      * @param {text} node A text node.
      * @return {number} The length of the text.
      */
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.js b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.js
index fa1d9ca..9b10847 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.js
@@ -57,6 +57,7 @@
 
     /**
      * Fired when the user selects a line.
+     *
      * @event line-selected
      */
 
@@ -123,6 +124,7 @@
 
       /**
        * Special line number which should not be collapsed into a shared region.
+       *
        * @type {{
        *  number: number,
        *  leftSide: {boolean}
@@ -284,6 +286,7 @@
 
     /**
      * Load and display blame information for the base of the diff.
+     *
      * @return {Promise} A promise that resolves when blame finishes rendering.
      */
     loadBlame() {
@@ -394,7 +397,7 @@
       // digits. Diffs with no delta are considered 0%.
       const totalDelta = rebaseDelta + nonRebaseDelta;
       const percentRebaseDelta = !totalDelta ? 0 :
-          Math.round(100 * rebaseDelta / totalDelta);
+        Math.round(100 * rebaseDelta / totalDelta);
 
       // Report the due_to_rebase percentage in the "diff" category when
       // applicable.
@@ -458,6 +461,7 @@
      * Take a diff that was loaded with a ignore-whitespace other than
      * IGNORE_NONE, and convert delta chunks labeled as common into shared
      * chunks.
+     *
      * @param {!Object} diff
      * @returns {!Object}
      */
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_test.html b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_test.html
index f83253e..b553ae6 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_test.html
+++ b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_test.html
@@ -177,7 +177,7 @@
               'getB64FileContents',
               (changeId, patchNum, path, opt_parentIndex) => {
                 return Promise.resolve(opt_parentIndex === 1 ? mockFile1 :
-                    mockFile2);
+                  mockFile2);
               });
 
           element.patchRange = {basePatchNum: 'PARENT', patchNum: 1};
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.js b/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.js
index 0ed2db2..b934d02 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.js
@@ -104,6 +104,7 @@
     /**
      * Asynchronously process the diff object into groups. As it processes, it
      * will splice groups into the `groups` property of the component.
+     *
      * @return {Promise} A promise that resolves when the diff is completely
      *     processed.
      */
@@ -230,6 +231,7 @@
     /**
      * Take rows of a shared diff section and produce an array of corresponding
      * (potentially collapsed) groups.
+     *
      * @param {!Array<string>} rows
      * @param {number} context
      * @param {number} startLineNumLeft
@@ -293,6 +295,7 @@
     /**
      * Take the rows of a delta diff section and produce the corresponding
      * group.
+     *
      * @param {!Array<string>} rowsAdded
      * @param {!Array<string>} rowsRemoved
      * @param {number} startLineNumLeft
@@ -353,6 +356,7 @@
      * In order to show comments out of the bounds of the selected context,
      * treat them as separate chunks within the model so that the content (and
      * context surrounding it) renders correctly.
+     *
      * @param {?} content The diff content object. (has to be iterable)
      * @return {!Object} A new diff content object with regions split up.
      */
@@ -497,6 +501,7 @@
      * If a group is an addition or a removal, break it down into smaller groups
      * of that type using the MAX_GROUP_SIZE. If the group is a shared section
      * or a delta it is returned as the single element of the result array.
+     *
      * @param {!Object} group A raw chunk from a diff response.
      * @return {!Array<!Array<!Object>>}
      */
@@ -526,6 +531,7 @@
     /**
      * Given an array and a size, return an array of arrays where no inner array
      * is larger than that size, preserving the original order.
+     *
      * @param {!Array<T>} array
      * @param {number} size
      * @return {!Array<!Array<T>>}
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection.js b/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection.js
index 27e467d..7f25b3e 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection.js
@@ -87,8 +87,8 @@
         const side = this.diffBuilder.getSideByLineEl(lineEl);
 
         targetClasses.push(side === 'left' ?
-            SelectionClass.LEFT :
-            SelectionClass.RIGHT);
+          SelectionClass.LEFT :
+          SelectionClass.RIGHT);
 
         if (commentSelected) {
           targetClasses.push(SelectionClass.COMMENT);
@@ -101,6 +101,7 @@
     /**
      * Set the provided list of classes on the element, to the exclusion of all
      * other SelectionClass values.
+     *
      * @param {!Array<!string>} targetClasses
      */
     _setClasses(targetClasses) {
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
index 6b17b9a..4cec917 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
@@ -257,8 +257,8 @@
       const patchRange = patchRangeRecord.base;
       return this.$.restAPI.getChangeFilePathsAsSpeciallySortedArray(
           changeNum, patchRange).then(files => {
-            this._fileList = files;
-          });
+        this._fileList = files;
+      });
     },
 
     _getDiffPreferences() {
@@ -550,8 +550,8 @@
       let idx = fileList.indexOf(path);
       if (idx === -1) {
         const file = direction > 0 ?
-            fileList[0] :
-            fileList[fileList.length - 1];
+          fileList[0] :
+          fileList[fileList.length - 1];
         return {path: file};
       }
 
@@ -681,8 +681,8 @@
         // is specified.
         this._getReviewedStatus(this.editMode, this._changeNum,
             this._patchRange.patchNum, this._path).then(status => {
-              this.$.reviewed.checked = status;
-            });
+          this.$.reviewed.checked = status;
+        });
         return;
       }
 
@@ -1080,7 +1080,7 @@
       // so we resolve the right "next" file.
       const unreviewedFiles = this._fileList
           .filter(file =>
-          (file === this._path || !this._reviewedFiles.has(file)));
+            (file === this._path || !this._reviewedFiles.has(file)));
       this._navToFile(this._path, unreviewedFiles, 1);
     },
 
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.html b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.html
index c47bfee..b5aa579 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.html
+++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.html
@@ -262,28 +262,28 @@
       assert.isTrue(element._loading);
       assert(diffNavStub.lastCall.calledWithExactly(element._change,
           'wheatley.md', '10', '5'),
-          'Should navigate to /c/42/5..10/wheatley.md');
+      'Should navigate to /c/42/5..10/wheatley.md');
       element._path = 'wheatley.md';
 
       MockInteractions.pressAndReleaseKeyOn(element, 219, null, '[');
       assert.isTrue(element._loading);
       assert(diffNavStub.lastCall.calledWithExactly(element._change,
           'glados.txt', '10', '5'),
-          'Should navigate to /c/42/5..10/glados.txt');
+      'Should navigate to /c/42/5..10/glados.txt');
       element._path = 'glados.txt';
 
       MockInteractions.pressAndReleaseKeyOn(element, 219, null, '[');
       assert.isTrue(element._loading);
       assert(diffNavStub.lastCall.calledWithExactly(element._change, 'chell.go',
           '10', '5'),
-          'Should navigate to /c/42/5..10/chell.go');
+      'Should navigate to /c/42/5..10/chell.go');
       element._path = 'chell.go';
 
       MockInteractions.pressAndReleaseKeyOn(element, 219, null, '[');
       assert.isTrue(element._loading);
       assert(changeNavStub.lastCall.calledWithExactly(element._change, '10',
           '5'),
-          'Should navigate to /c/42/5..10');
+      'Should navigate to /c/42/5..10');
     });
 
     test('keyboard shortcuts with old patch number', () => {
@@ -325,13 +325,13 @@
       MockInteractions.pressAndReleaseKeyOn(element, 221, null, ']');
       assert(diffNavStub.lastCall.calledWithExactly(element._change,
           'wheatley.md', '1', PARENT),
-          'Should navigate to /c/42/1/wheatley.md');
+      'Should navigate to /c/42/1/wheatley.md');
       element._path = 'wheatley.md';
 
       MockInteractions.pressAndReleaseKeyOn(element, 219, null, '[');
       assert(diffNavStub.lastCall.calledWithExactly(element._change,
           'glados.txt', '1', PARENT),
-          'Should navigate to /c/42/1/glados.txt');
+      'Should navigate to /c/42/1/glados.txt');
       element._path = 'glados.txt';
 
       MockInteractions.pressAndReleaseKeyOn(element, 219, null, '[');
diff --git a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js
index f66fea4..7a670d3 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js
@@ -54,6 +54,7 @@
 
     /**
      * Fired when the user selects a line.
+     *
      * @event line-selected
      */
 
@@ -69,11 +70,11 @@
      * @event diff-comments-modified
      */
 
-     /**
-      * Fired when a draft is added or edited.
-      *
-      * @event draft-interaction
-      */
+    /**
+     * Fired when a draft is added or edited.
+     *
+     * @event draft-interaction
+     */
 
     properties: {
       changeNum: String,
@@ -126,6 +127,7 @@
 
       /**
        * Special line number which should not be collapsed into a shared region.
+       *
        * @type {{
        *  number: number,
        *  leftSide: {boolean}
@@ -167,7 +169,7 @@
        * bypassed. If the value is a number, then that number represents the
        * context preference to use when rendering the bypassed diff.
        *
-       * @type (number|null)
+       * @type {number|null}
        */
       _safetyBypass: {
         type: Number,
@@ -353,8 +355,8 @@
         return false;
       }
       const patchNum = el.classList.contains(DiffSide.LEFT) ?
-          this.patchRange.basePatchNum :
-          this.patchRange.patchNum;
+        this.patchRange.basePatchNum :
+        this.patchRange.patchNum;
 
       const isEdit = this.patchNumEquals(patchNum, this.EDIT_NAME);
       const isEditBase = this.patchNumEquals(patchNum, this.PARENT_NAME) &&
@@ -746,6 +748,7 @@
 
     /**
      * Find the last chunk for the given side.
+     *
      * @param {!Object} diff
      * @param {boolean} leftSide true if checking the base of the diff,
      *     false if testing the revision.
@@ -763,8 +766,8 @@
         chunkIndex--;
         chunk = diff.content[chunkIndex];
       } while (
-          // We haven't reached the beginning.
-          chunkIndex >= 0 &&
+      // We haven't reached the beginning.
+        chunkIndex >= 0 &&
 
           // The chunk doesn't have both sides.
           !chunk.ab &&
@@ -781,6 +784,7 @@
 
     /**
      * Check whether the specified side of the diff has a trailing newline.
+     *
      * @param {!Object} diff
      * @param {boolean} leftSide true if checking the base of the diff,
      *     false if testing the revision.
diff --git a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff_test.html b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff_test.html
index faf529b..ec71563 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff_test.html
+++ b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff_test.html
@@ -339,7 +339,7 @@
         const threadGroup = contentEl.querySelector(
             'gr-diff-comment-thread-group');
         const threadLength = Polymer.dom(threadGroup.root).
-              querySelectorAll('gr-diff-comment-thread').length;
+            querySelectorAll('gr-diff-comment-thread').length;
         assert.equal(threadLength, 2);
       });
 
diff --git a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js
index beacdb4a..ad2e599 100644
--- a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js
+++ b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js
@@ -69,7 +69,7 @@
         changeComments, revisionInfo) {
       const parentCounts = revisionInfo.getParentCountMap();
       const currentParentCount = parentCounts.hasOwnProperty(patchNum) ?
-          parentCounts[patchNum] : 1;
+        parentCounts[patchNum] : 1;
       const maxParents = revisionInfo.getMaxParents();
       const isMerge = currentParentCount > 1;
 
@@ -157,6 +157,7 @@
      * The basePatchNum should always be <= patchNum -- because sortedRevisions
      * is sorted in reverse order (higher patchset nums first), invalid base
      * patch nums have an index greater than the index of patchNum.
+     *
      * @param {number|string} basePatchNum The possible base patch num.
      * @param {number|string} patchNum The current selected patch num.
      * @param {!Array} sortedRevisions
@@ -225,7 +226,7 @@
     _computePatchSetDescription(revisions, patchNum, opt_addFrontSpace) {
       const rev = this.getRevisionByPatchNum(revisions, patchNum);
       return (rev && rev.description) ?
-          (opt_addFrontSpace ? ' ' : '') +
+        (opt_addFrontSpace ? ' ' : '') +
           rev.description.substring(0, PATCH_DESC_MAX_LENGTH) : '';
     },
 
diff --git a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_test.html b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_test.html
index f6394e7..f2b35a5 100644
--- a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_test.html
+++ b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_test.html
@@ -183,7 +183,7 @@
       assert.deepEqual(element._computeBaseDropdownContent(availablePatches,
           patchNum, sortedRevisions, element.changeComments,
           element.revisionInfo),
-          expectedResult);
+      expectedResult);
     });
 
     test('_computeBaseDropdownContent called when patchNum updates', () => {
@@ -342,7 +342,7 @@
 
       assert.deepEqual(element._computePatchDropdownContent(availablePatches,
           basePatchNum, sortedRevisions, element.changeComments),
-          expectedResult);
+      expectedResult);
     });
 
     test('filesWeblinks', () => {
diff --git a/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js b/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js
index db14fc8..fb48b39 100644
--- a/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js
+++ b/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js
@@ -46,6 +46,7 @@
 
     /**
      * Layer method to add annotations to a line.
+     *
      * @param {!HTMLElement} el The DIV.contentText element to apply the
      *     annotation to.
      * @param {!Object} line The line object. (GrDiffLine)
@@ -53,12 +54,12 @@
     annotate(el, line) {
       let ranges = [];
       if (line.type === GrDiffLine.Type.REMOVE || (
-          line.type === GrDiffLine.Type.BOTH &&
+        line.type === GrDiffLine.Type.BOTH &&
           el.getAttribute('data-side') !== 'right')) {
         ranges = ranges.concat(this._getRangesForLine(line, 'left'));
       }
       if (line.type === GrDiffLine.Type.ADD || (
-          line.type === GrDiffLine.Type.BOTH &&
+        line.type === GrDiffLine.Type.BOTH &&
           el.getAttribute('data-side') !== 'left')) {
         ranges = ranges.concat(this._getRangesForLine(line, 'right'));
       }
@@ -72,6 +73,7 @@
 
     /**
      * Register a listener for layer updates.
+     *
      * @param {function(number, number, string)} fn The update handler function.
      *     Should accept as arguments the line numbers for the start and end of
      *     the update and the side as a string.
@@ -82,6 +84,7 @@
 
     /**
      * Notify Layer listeners of changes to annotations.
+     *
      * @param {number} start The line where the update starts.
      * @param {number} end The line where the update ends.
      * @param {string} side The side of the update. ('left' or 'right')
@@ -95,6 +98,7 @@
     /**
      * Handle change in the comments by updating the comment maps and by
      * emitting appropriate update notifications.
+     *
      * @param {Object} record The change record.
      */
     _handleCommentChange(record) {
@@ -136,6 +140,7 @@
      * Take a list of comments and return a sparse list mapping line numbers to
      * partial ranges. Uses an end-character-index of -1 to indicate the end of
      * the line.
+     *
      * @param {?} commentList The list of comments.
      *    Getting this param to match closure requirements caused problems.
      * @return {!Object} The sparse list.
@@ -165,8 +170,8 @@
 
       for (const splice of record.indexSplices) {
         const ranges = splice.removed.length ?
-            splice.removed.map(c => { return c.range; }) :
-            [splice.object[splice.index].range];
+          splice.removed.map(c => { return c.range; }) :
+          [splice.object[splice.index].range];
         for (const range of ranges) {
           if (!range) { continue; }
           this._notifyUpdateRange(range.start_line, range.end_line, side);
diff --git a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js
index 3a2a6d5..446805e 100644
--- a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js
+++ b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js
@@ -168,6 +168,7 @@
     /**
      * Annotation layer method to add syntax annotations to the given element
      * for the given line.
+     *
      * @param {!HTMLElement} el
      * @param {!Object} line (GrDiffLine)
      */
@@ -177,11 +178,11 @@
       // Determine the side.
       let side;
       if (line.type === GrDiffLine.Type.REMOVE || (
-          line.type === GrDiffLine.Type.BOTH &&
+        line.type === GrDiffLine.Type.BOTH &&
           el.getAttribute('data-side') !== 'right')) {
         side = 'left';
       } else if (line.type === GrDiffLine.Type.ADD || (
-          el.getAttribute('data-side') !== 'left')) {
+        el.getAttribute('data-side') !== 'left')) {
         side = 'right';
       }
 
@@ -204,6 +205,7 @@
     /**
      * Start processing symtax for the loaded diff and notify layer listeners
      * as syntax info comes online.
+     *
      * @return {Promise}
      */
     process() {
@@ -291,6 +293,7 @@
      * Take a string of HTML with the (potentially nested) syntax markers
      * Highlight.js emits and emit a list of text ranges and classes for the
      * markers.
+     *
      * @param {string} str The string of HTML.
      * @return {!Array<!Object>} The list of ranges.
      */
@@ -326,6 +329,7 @@
     /**
      * For a given state, process the syntax for the next line (or pair of
      * lines).
+     *
      * @param {!Object} state The processing state for the layer.
      */
     _processNextLine(state) {
@@ -438,6 +442,7 @@
 
     /**
      * Tells whether the state has exhausted its current section.
+     *
      * @param {!Object} state
      * @return {boolean}
      */
@@ -454,6 +459,7 @@
     /**
      * For a given state, notify layer listeners of any processed line ranges
      * that have not yet been notified.
+     *
      * @param {!Object} state
      */
     _notify(state) {
diff --git a/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls.js b/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls.js
index 8740b0d..610e9ed 100644
--- a/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls.js
+++ b/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls.js
@@ -111,6 +111,7 @@
 
     /**
      * Given a path string, checks that it is a valid file path.
+     *
      * @param {string} path
      * @return {boolean}
      */
@@ -125,6 +126,7 @@
 
     /**
      * Given a dom event, gets the dialog that lies along this event path.
+     *
      * @param {!Event} e
      * @return {!Element|undefined}
      */
@@ -207,17 +209,17 @@
     _handleRenameConfirm(e) {
       return this.$.restAPI.renameFileInChangeEdit(this.change._number,
           this._path, this._newPath).then(res => {
-            if (!res.ok) { return; }
-            this._closeDialog(this._getDialogFromEvent(e), true);
-            Gerrit.Nav.navigateToChange(this.change);
-          });
+        if (!res.ok) { return; }
+        this._closeDialog(this._getDialogFromEvent(e), true);
+        Gerrit.Nav.navigateToChange(this.change);
+      });
     },
 
     _queryFiles(input) {
       return this.$.restAPI.queryChangeFiles(this.change._number,
           this.patchNum, input).then(res => res.map(file => {
-            return {name: file};
-          }));
+        return {name: file};
+      }));
     },
 
     _computeIsInvisible(id, hiddenActions) {
diff --git a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.js b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.js
index bf7fc99..51dc0f6 100644
--- a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.js
+++ b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.js
@@ -136,11 +136,11 @@
       if (path === this._path) { return Promise.resolve(); }
       return this.$.restAPI.renameFileInChangeEdit(this._changeNum,
           this._path, path).then(res => {
-            if (!res.ok) { return; }
+        if (!res.ok) { return; }
 
-            this._successfulSave = true;
-            this._viewEditInChangeView();
-          });
+        this._successfulSave = true;
+        this._viewEditInChangeView();
+      });
     },
 
     _viewEditInChangeView() {
@@ -183,13 +183,13 @@
       this.$.storage.eraseEditableContentItem(this.storageKey);
       return this.$.restAPI.saveChangeEdit(this._changeNum, this._path,
           this._newContent).then(res => {
-            this._saving = false;
-            this._showAlert(res.ok ? SAVED_MESSAGE : SAVE_FAILED_MSG);
-            if (!res.ok) { return; }
+        this._saving = false;
+        this._showAlert(res.ok ? SAVED_MESSAGE : SAVE_FAILED_MSG);
+        if (!res.ok) { return; }
 
-            this._content = this._newContent;
-            this._successfulSave = true;
-          });
+        this._content = this._newContent;
+        this._successfulSave = true;
+      });
     },
 
     _showAlert(message) {
diff --git a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view_test.html b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view_test.html
index 2f5332d..010ff4a 100644
--- a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view_test.html
+++ b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view_test.html
@@ -104,7 +104,7 @@
     // Calling with the same path should not navigate.
     return element._handlePathChanged({detail: mockParams.path}).then(() => {
       assert.isFalse(savePathStub.called);
-        // !ok response
+      // !ok response
       element._handlePathChanged({detail: 'newPath'}).then(() => {
         assert.isTrue(savePathStub.called);
         assert.isFalse(navigateStub.called);
diff --git a/polygerrit-ui/app/elements/gr-app.js b/polygerrit-ui/app/elements/gr-app.js
index 2dc345e..f48951b 100644
--- a/polygerrit-ui/app/elements/gr-app.js
+++ b/polygerrit-ui/app/elements/gr-app.js
@@ -51,6 +51,7 @@
       /**
        * The last time the g key was pressed in milliseconds (or a keydown event
        * was handled if the key is held down).
+       *
        * @type {number|null}
        */
       _lastGKeyPressTimestamp: {
diff --git a/polygerrit-ui/app/elements/plugins/gr-attribute-helper/gr-attribute-helper.js b/polygerrit-ui/app/elements/plugins/gr-attribute-helper/gr-attribute-helper.js
index df71da6..358fba7 100644
--- a/polygerrit-ui/app/elements/plugins/gr-attribute-helper/gr-attribute-helper.js
+++ b/polygerrit-ui/app/elements/plugins/gr-attribute-helper/gr-attribute-helper.js
@@ -28,6 +28,7 @@
 
   /**
    * Returns true if the property is defined on wrapped element.
+   *
    * @param {string} name
    * @return {boolean}
    */
diff --git a/polygerrit-ui/app/elements/plugins/gr-change-metadata-api/gr-change-metadata-api.js b/polygerrit-ui/app/elements/plugins/gr-change-metadata-api/gr-change-metadata-api.js
index b550f73..0454767 100644
--- a/polygerrit-ui/app/elements/plugins/gr-change-metadata-api/gr-change-metadata-api.js
+++ b/polygerrit-ui/app/elements/plugins/gr-change-metadata-api/gr-change-metadata-api.js
@@ -31,7 +31,7 @@
       this._createHook();
     }
     this._hook.onAttached(element =>
-        this.plugin.attributeHelper(element).bind('labels', callback));
+      this.plugin.attributeHelper(element).bind('labels', callback));
     return this;
   };
 
diff --git a/polygerrit-ui/app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js b/polygerrit-ui/app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js
index 230be0e..2d07382 100644
--- a/polygerrit-ui/app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js
+++ b/polygerrit-ui/app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js
@@ -76,6 +76,7 @@
   /**
    * Get instance of last DOM hook element attached into the endpoint.
    * Returns a Promise, that's resolved when attachment is done.
+   *
    * @return {!Promise<!Element>}
    */
   GrDomHook.prototype.getLastAttached = function() {
@@ -108,6 +109,7 @@
   /**
    * Install a new callback to invoke when a new instance of DOM hook element
    * is attached.
+   *
    * @param {function(Element)} callback
    */
   GrDomHook.prototype.onAttached = function(callback) {
diff --git a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js
index 82f8f37..c0dd5d6 100644
--- a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js
+++ b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js
@@ -33,6 +33,7 @@
        * This map prevents importing the same endpoint twice.
        * Without caching, if a plugin is loaded after the loaded plugins
        * callback fires, it will be imported twice and appear twice on the page.
+       *
        * @type {!Map}
        */
       _initializedPlugins: {
@@ -91,15 +92,15 @@
         return helper.get('value').then(
             value => helper.bind('value',
                 value => plugin.attributeHelper(el).set(paramName, value))
-            );
+        );
       });
       let timeoutId;
       const timeout = new Promise(
-        resolve => timeoutId = setTimeout(() => {
-          console.warn(
-              'Timeout waiting for endpoint properties initialization: ' +
+          resolve => timeoutId = setTimeout(() => {
+            console.warn(
+                'Timeout waiting for endpoint properties initialization: ' +
               `plugin ${plugin.getPluginName()}, endpoint ${this.name}`);
-        }, INIT_PROPERTIES_TIMEOUT_MS));
+          }, INIT_PROPERTIES_TIMEOUT_MS));
       return Promise.race([timeout, Promise.all(expectProperties)])
           .then(() => {
             clearTimeout(timeoutId);
diff --git a/polygerrit-ui/app/elements/plugins/gr-event-helper/gr-event-helper.js b/polygerrit-ui/app/elements/plugins/gr-event-helper/gr-event-helper.js
index 414abad..81b59b6 100644
--- a/polygerrit-ui/app/elements/plugins/gr-event-helper/gr-event-helper.js
+++ b/polygerrit-ui/app/elements/plugins/gr-event-helper/gr-event-helper.js
@@ -25,6 +25,7 @@
   /**
    * Add a callback to arbitrary event.
    * The callback may return false to prevent event bubbling.
+   *
    * @param {string} event Event name
    * @param {function(Event):boolean} callback
    * @return {function()} Unsubscribe function.
@@ -36,6 +37,7 @@
   /**
    * Add a callback to element click or touch.
    * The callback may return false to prevent event bubbling.
+   *
    * @param {function(Event):boolean} callback
    * @return {function()} Unsubscribe function.
    */
@@ -48,6 +50,7 @@
    * Callback is installed on parent during capture phase.
    * https://www.w3.org/TR/DOM-Level-3-Events/#event-flow
    * The callback may return false to cancel regular event listeners.
+   *
    * @param {function(Event):boolean} callback
    * @return {function()} Unsubscribe function.
    */
diff --git a/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.js b/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.js
index 111cdc6..dcd9049 100644
--- a/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.js
+++ b/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.js
@@ -38,8 +38,8 @@
           .filter(p => !Gerrit._isPluginPreloaded(p));
       const jsPlugins =
           this._handleMigrations(plugins.js_resource_paths || [], htmlPlugins)
-          .map(p => this._urlFor(p))
-          .filter(p => !Gerrit._isPluginPreloaded(p));
+              .map(p => this._urlFor(p))
+              .filter(p => !Gerrit._isPluginPreloaded(p));
       const shouldLoadTheme = config.default_theme &&
             !Gerrit._isPluginPreloaded('preloaded:gerrit-theme');
       const defaultTheme =
diff --git a/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-popup-interface.js b/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-popup-interface.js
index 556cfd8..5418267 100644
--- a/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-popup-interface.js
+++ b/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-popup-interface.js
@@ -22,6 +22,7 @@
    * Provides method for opening and closing popups from plugin.
    * opt_moduleName is a name of custom element that will be automatically
    * inserted on popup opening.
+   *
    * @param {!Object} plugin
    * @param {opt_moduleName=} string
    */
@@ -40,23 +41,24 @@
    * Opens the popup, inserts it into DOM over current UI.
    * Creates the popup if not previously created. Creates popup content element,
    * if it was provided with constructor.
+   *
    * @returns {!Promise<!Object>}
    */
   GrPopupInterface.prototype.open = function() {
     if (!this._openingPromise) {
       this._openingPromise =
           this.plugin.hook('plugin-overlay').getLastAttached()
-      .then(hookEl => {
-        const popup = document.createElement('gr-plugin-popup');
-        if (this._moduleName) {
-          const el = Polymer.dom(popup).appendChild(
-              document.createElement(this._moduleName));
-          el.plugin = this.plugin;
-        }
-        this._popup = Polymer.dom(hookEl).appendChild(popup);
-        Polymer.dom.flush();
-        return this._popup.open().then(() => this);
-      });
+              .then(hookEl => {
+                const popup = document.createElement('gr-plugin-popup');
+                if (this._moduleName) {
+                  const el = Polymer.dom(popup).appendChild(
+                      document.createElement(this._moduleName));
+                  el.plugin = this.plugin;
+                }
+                this._popup = Polymer.dom(hookEl).appendChild(popup);
+                Polymer.dom.flush();
+                return this._popup.open().then(() => this);
+              });
     }
     return this._openingPromise;
   };
diff --git a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js
index fcc99aa..cc32690 100644
--- a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js
+++ b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js
@@ -123,20 +123,20 @@
 
     _maybeSetName() {
       return this._hasNameChange && this.nameMutable ?
-          this.$.restAPI.setAccountName(this._account.name) :
-          Promise.resolve();
+        this.$.restAPI.setAccountName(this._account.name) :
+        Promise.resolve();
     },
 
     _maybeSetUsername() {
       return this._hasUsernameChange && this.usernameMutable ?
-          this.$.restAPI.setAccountUsername(this._username) :
-          Promise.resolve();
+        this.$.restAPI.setAccountUsername(this._username) :
+        Promise.resolve();
     },
 
     _maybeSetStatus() {
       return this._hasStatusChange ?
-          this.$.restAPI.setAccountStatus(this._account.status) :
-          Promise.resolve();
+        this.$.restAPI.setAccountStatus(this._account.status) :
+        Promise.resolve();
     },
 
     _computeHasUnsavedChanges(nameChanged, usernameChanged, statusChanged) {
diff --git a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info_test.html b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info_test.html
index f91277a..75b9910 100644
--- a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info_test.html
+++ b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info_test.html
@@ -150,7 +150,7 @@
         usernameChangedSpy = sandbox.spy(element, '_usernameChanged');
         statusChangedSpy = sandbox.spy(element, '_statusChanged');
         element.set('_serverConfig',
-          {auth: {editable_account_fields: ['FULL_NAME', 'USER_NAME']}});
+            {auth: {editable_account_fields: ['FULL_NAME', 'USER_NAME']}});
 
         nameStub = sandbox.stub(element.$.restAPI, 'setAccountName',
             name => Promise.resolve());
@@ -278,7 +278,7 @@
       setup(() => {
         statusChangedSpy = sandbox.spy(element, '_statusChanged');
         element.set('_serverConfig',
-          {auth: {editable_account_fields: []}});
+            {auth: {editable_account_fields: []}});
 
         statusStub = sandbox.stub(element.$.restAPI, 'setAccountStatus',
             status => Promise.resolve());
diff --git a/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor.js b/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor.js
index 7d109633..1ed91b8 100644
--- a/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor.js
+++ b/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor.js
@@ -38,6 +38,7 @@
     /**
      * Get the list of enabled column names from whichever checkboxes are
      * checked (excluding the number checkbox).
+     *
      * @return {!Array<string>}
      */
     _getDisplayedColumns() {
diff --git a/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.js b/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.js
index 493b179..ae53489 100644
--- a/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.js
+++ b/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.js
@@ -121,7 +121,7 @@
 
     _hideAgreements(item, groups, signedAgreements) {
       return this._disableAgreements(item, groups, signedAgreements) ?
-          '' : 'hide';
+        '' : 'hide';
     },
 
     _disableAgreementsText(text) {
diff --git a/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor.js b/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor.js
index 78025d1..890061e 100644
--- a/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor.js
+++ b/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor.js
@@ -46,11 +46,11 @@
           return;
         }
         this._keys = Object.keys(keys)
-         .map(key => {
-           const gpgKey = keys[key];
-           gpgKey.id = key;
-           return gpgKey;
-         });
+            .map(key => {
+              const gpgKey = keys[key];
+              gpgKey.id = key;
+              return gpgKey;
+            });
       });
     },
 
diff --git a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_test.html b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_test.html
index 288a670..cd8e194 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_test.html
+++ b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_test.html
@@ -67,17 +67,17 @@
             name: 'Andrew Bonventre',
             email: 'andybons+gerrit@gmail.com',
           }),
-          'Andrew Bonventre <andybons+gerrit@gmail.com>');
+      'Andrew Bonventre <andybons+gerrit@gmail.com>');
 
       assert.equal(element._computeAccountTitle(
           {name: 'Andrew Bonventre'}),
-          'Andrew Bonventre');
+      'Andrew Bonventre');
 
       assert.equal(element._computeAccountTitle(
           {
             email: 'andybons+gerrit@gmail.com',
           }),
-          'Anonymous <andybons+gerrit@gmail.com>');
+      'Anonymous <andybons+gerrit@gmail.com>');
 
       assert.equal(element._computeShowEmailClass(
           {
diff --git a/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.js b/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.js
index 4efa7ad..04815efd 100644
--- a/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.js
+++ b/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.js
@@ -215,6 +215,7 @@
 
     /**
      * Set the text of the input without triggering the suggestion dropdown.
+     *
      * @param {string} text The new text for the input.
      */
     setText(text) {
diff --git a/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar_test.html b/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar_test.html
index 5ce17c0..63718c5 100644
--- a/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar_test.html
+++ b/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar_test.html
@@ -51,22 +51,22 @@
           {
             _account_id: 123,
           }),
-          '/accounts/123/avatar?s=16');
+      '/accounts/123/avatar?s=16');
       assert.equal(element._buildAvatarURL(
           {
             email: 'test@example.com',
           }),
-          '/accounts/test%40example.com/avatar?s=16');
+      '/accounts/test%40example.com/avatar?s=16');
       assert.equal(element._buildAvatarURL(
           {
             name: 'John Doe',
           }),
-          '/accounts/John%20Doe/avatar?s=16');
+      '/accounts/John%20Doe/avatar?s=16');
       assert.equal(element._buildAvatarURL(
           {
             username: 'John_Doe',
           }),
-          '/accounts/John_Doe/avatar?s=16');
+      '/accounts/John_Doe/avatar?s=16');
       assert.equal(element._buildAvatarURL(
           {
             _account_id: 123,
@@ -85,7 +85,7 @@
               },
             ],
           }),
-          'https://cdn.example.com/s16-p/photo.jpg');
+      'https://cdn.example.com/s16-p/photo.jpg');
       assert.equal(element._buildAvatarURL(
           {
             _account_id: 123,
@@ -96,7 +96,7 @@
               },
             ],
           }),
-          '/accounts/123/avatar?s=16');
+      '/accounts/123/avatar?s=16');
       assert.equal(element._buildAvatarURL(undefined), '');
     });
 
diff --git a/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.js b/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.js
index f750cd2..5e1f587 100644
--- a/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.js
+++ b/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.js
@@ -34,7 +34,7 @@
         observer: '_updateIndex',
       },
       /**
-       * @type (?Object)
+       * @type {?Object}
        */
       target: {
         type: Object,
@@ -43,7 +43,8 @@
       },
       /**
        * The height of content intended to be included with the target.
-       * @type (?number)
+       *
+       * @type {?number}
        */
       _targetHeight: Number,
 
@@ -69,7 +70,8 @@
        * 'keep-visible'. 'keep-visible' will only scroll if the cursor is beyond
        * the viewport.
        * TODO (beckysiegel) figure out why it can be undefined
-       * @type (string|undefined)
+       *
+       * @type {string|undefined}
        */
       scrollBehavior: {
         type: String,
@@ -99,6 +101,7 @@
 
     /**
      * Set the cursor to an arbitrary element.
+     *
      * @param {!HTMLElement} element
      * @param {boolean=} opt_noScroll prevent any potential scrolling in response
      *   setting the cursor.
@@ -146,6 +149,7 @@
     /**
      * Move the cursor forward or backward by delta. Noop if moving past either
      * end of the stop list.
+     *
      * @param {number} delta either -1 or 1.
      * @param {!Function=} opt_condition Optional stop condition. If a condition
      *    is passed the cursor will continue to move in the specified direction
@@ -200,6 +204,7 @@
 
     /**
      * Get the next stop index indicated by the delta direction.
+     *
      * @param {number} delta either -1 or 1.
      * @param {!Function=} opt_condition Optional stop condition.
      * @return {number} the new index.
@@ -248,14 +253,15 @@
 
     /**
      * Calculate where the element is relative to the window.
+     *
      * @param {!Object} target Target to scroll to.
      * @return {number} Distance to top of the target.
      */
     _getTop(target) {
       let top = target.offsetTop;
       for (let offsetParent = target.offsetParent;
-           offsetParent;
-           offsetParent = offsetParent.offsetParent) {
+        offsetParent;
+        offsetParent = offsetParent.offsetParent) {
         top += offsetParent.offsetTop;
       }
       return top;
@@ -284,7 +290,7 @@
       const dims = this._getWindowDims();
       const top = this._getTop(this.target);
       const bottomIsVisible = this._targetHeight ?
-          this._targetIsVisible(top + this._targetHeight) : true;
+        this._targetIsVisible(top + this._targetHeight) : true;
       const scrollToValue = this._calculateScrollToValue(top, this.target);
 
       if (this._targetIsVisible(top)) {
diff --git a/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter.js b/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter.js
index 3417a0d..43ec20e 100644
--- a/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter.js
+++ b/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter.js
@@ -167,8 +167,8 @@
 
     _timeToSecondsFormat(timeFormat) {
       return timeFormat === TimeFormats.TIME_12 ?
-          TimeFormats.TIME_12_WITH_SEC :
-          TimeFormats.TIME_24_WITH_SEC;
+        TimeFormats.TIME_12_WITH_SEC :
+        TimeFormats.TIME_24_WITH_SEC;
     },
 
     _computeFullDateStr(dateStr, timeFormat) {
diff --git a/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter_test.html b/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter_test.html
index ad4d0da..798aa68b1 100644
--- a/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter_test.html
+++ b/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter_test.html
@@ -87,7 +87,7 @@
     suite('24 hours time format preference', () => {
       setup(() => {
         return stubRestAPI(
-          {time_format: 'HHMM_24', relative_date_in_change_table: false}
+            {time_format: 'HHMM_24', relative_date_in_change_table: false}
         ).then(() => {
           element = fixture('basic');
           sandbox.stub(element, '_getUtcOffsetString').returns('');
@@ -137,7 +137,7 @@
       setup(() => {
         // relative_date_in_change_table is not set when false.
         return stubRestAPI(
-          {time_format: 'HHMM_12'}
+            {time_format: 'HHMM_12'}
         ).then(() => {
           element = fixture('basic');
           sandbox.stub(element, '_getUtcOffsetString').returns('');
@@ -157,7 +157,7 @@
     suite('relative date preference', () => {
       setup(() => {
         return stubRestAPI(
-          {time_format: 'HHMM_12', relative_date_in_change_table: true}
+            {time_format: 'HHMM_12', relative_date_in_change_table: true}
         ).then(() => {
           element = fixture('basic');
           sandbox.stub(element, '_getUtcOffsetString').returns('');
@@ -185,7 +185,7 @@
     suite('logged in', () => {
       setup(() => {
         return stubRestAPI(
-          {time_format: 'HHMM_12', relative_date_in_change_table: true}
+            {time_format: 'HHMM_12', relative_date_in_change_table: true}
         ).then(() => {
           element = fixture('basic');
           return element._loadPreferences();
diff --git a/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences_test.html b/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences_test.html
index 5bd72c4..055d7aa 100644
--- a/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences_test.html
+++ b/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences_test.html
@@ -108,7 +108,7 @@
           .returns(Promise.resolve());
       const showTrailingWhitespaceCheckbox =
           valueOf('Show trailing whitespace', 'diffPreferences')
-          .firstElementChild;
+              .firstElementChild;
       showTrailingWhitespaceCheckbox.checked = false;
       element._handleShowTrailingWhitespaceTap();
 
diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.js b/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.js
index c8f4f63..2962dbe 100644
--- a/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.js
+++ b/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.js
@@ -73,6 +73,7 @@
 
     /**
      * Handle a click on the iron-dropdown element.
+     *
      * @param {!Event} e
      */
     _handleDropdownClick(e) {
@@ -85,6 +86,7 @@
 
     /**
      * Handle a click on the button to open the dropdown.
+     *
      * @param {!Event} e
      */
     _showDropdownTapHandler(e) {
@@ -109,7 +111,7 @@
       });
       if (!selectedObj) { return; }
       this.text = selectedObj.triggerText? selectedObj.triggerText :
-          selectedObj.text;
+        selectedObj.text;
       this.dispatchEvent(new CustomEvent('value-change', {
         detail: {value},
         bubbles: false,
diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.js b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.js
index c06ffc9..7ee2f44 100644
--- a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.js
+++ b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.js
@@ -92,6 +92,7 @@
 
     /**
      * Handle the up key.
+     *
      * @param {!Event} e
      */
     _handleUp(e) {
@@ -106,6 +107,7 @@
 
     /**
      * Handle the down key.
+     *
      * @param {!Event} e
      */
     _handleDown(e) {
@@ -120,6 +122,7 @@
 
     /**
      * Handle the tab key.
+     *
      * @param {!Event} e
      */
     _handleTab(e) {
@@ -132,6 +135,7 @@
 
     /**
      * Handle the enter key.
+     *
      * @param {!Event} e
      */
     _handleEnter(e) {
@@ -150,6 +154,7 @@
 
     /**
      * Handle a click on the iron-dropdown element.
+     *
      * @param {!Event} e
      */
     _handleDropdownClick(e) {
@@ -158,6 +163,7 @@
 
     /**
      * Hanlde a click on the button to open the dropdown.
+     *
      * @param {!Event} e
      */
     _dropdownTriggerTapHandler(e) {
@@ -190,6 +196,7 @@
 
     /**
      * Get the class for a top-content item based on the given boolean.
+     *
      * @param {boolean} bold Whether the item is bold.
      * @return {string} The class for the top-content item.
      */
@@ -200,13 +207,14 @@
     /**
      * Build a URL for the given host and path. The base URL will be only added,
      * if it is not already included in the path.
+     *
      * @param {!string} host
      * @param {!string} path
      * @return {!string} The scheme-relative URL.
      */
     _computeURLHelper(host, path) {
       const base = path.startsWith(this.getBaseUrl()) ?
-          '' : this.getBaseUrl();
+        '' : this.getBaseUrl();
       return '//' + host + base + path;
     },
 
@@ -214,6 +222,7 @@
      * Build a scheme-relative URL for the current host. Will include the base
      * URL if one is present. Note: the URL will be scheme-relative but absolute
      * with regard to the host.
+     *
      * @param {!string} path The path for the URL.
      * @return {!string} The scheme-relative URL.
      */
@@ -224,6 +233,7 @@
 
     /**
      * Compute the URL for a link object.
+     *
      * @param {!Object} link The object describing the link.
      * @return {!string} The URL.
      */
@@ -241,6 +251,7 @@
      * Compute the value for the rel attribute of an anchor for the given link
      * object. If the link has a target value, then the rel must be "noopener"
      * for security reasons.
+     *
      * @param {!Object} link The object describing the link.
      * @return {?string} The rel value for the link.
      */
@@ -253,6 +264,7 @@
 
     /**
      * Handle a click on an item of the dropdown.
+     *
      * @param {!Event} e
      */
     _handleItemTap(e) {
@@ -268,6 +280,7 @@
 
     /**
      * If a dropdown item is shown as a button, get the class for the button.
+     *
      * @param {string} id
      * @param {!Object} disabledIdsRecord The change record for the disabled IDs
      *     list.
diff --git a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.js b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.js
index f567d39..482cacf 100644
--- a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.js
+++ b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.js
@@ -105,8 +105,8 @@
 
       // TODO(wyatta) switch linkify sequence, see issue 5526.
       this._newContent = this.removeZeroWidthSpace ?
-          content.replace(/^R=\u200B/gm, 'R=') :
-          content;
+        content.replace(/^R=\u200B/gm, 'R=') :
+        content;
     },
 
     _computeSaveDisabled(disabled, content, newContent) {
diff --git a/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface.js b/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface.js
index d024bb2..f763457 100644
--- a/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface.js
+++ b/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface.js
@@ -39,6 +39,7 @@
     constructor() {
       /**
        * Shared events map from name to the listeners.
+       *
        * @type {!Object<string, Array<eventCallback>>}
        */
       this._listenersMap = new Map();
diff --git a/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface_test.html b/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface_test.html
index 137ed25..643e918 100644
--- a/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface_test.html
+++ b/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface_test.html
@@ -62,7 +62,7 @@
           p = plugin;
           Gerrit.emit(eventName, {value: 'test', plugin});
         }, '0.1',
-            'http://test.com/plugins/testplugin/static/test.js');
+        'http://test.com/plugins/testplugin/static/test.js');
       });
 
       test('listen on events from core', done => {
@@ -83,19 +83,21 @@
             done();
           });
         }, '0.1',
-            'http://test.com/plugins/testA/static/testA.js');
+        'http://test.com/plugins/testA/static/testA.js');
 
         Gerrit.install(plugin => {
           Gerrit.emit(eventName, {plugin});
         }, '0.1',
-            'http://test.com/plugins/testB/static/testB.js');
+        'http://test.com/plugins/testB/static/testB.js');
       });
     });
 
     suite('test on interfaces', () => {
       let testObj;
+
       class TestClass extends EventEmitter {
       }
+
       setup(() => {
         testObj = new TestClass();
       });
diff --git a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.js b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.js
index 4e68d42..feae173 100644
--- a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.js
+++ b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.js
@@ -245,6 +245,7 @@
 
     /**
      * Map an array of block objects to an array of DOM nodes.
+     *
      * @param  {!Array<!Object>} blocks
      * @return {!Array<!HTMLElement>}
      */
diff --git a/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard.js b/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard.js
index f9c1da1..71621fa 100644
--- a/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard.js
+++ b/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard.js
@@ -136,8 +136,8 @@
         target = Polymer.dom(ownerRoot).querySelector('#' + this.for);
       } else {
         target = parentNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE ?
-            ownerRoot.host :
-            parentNode;
+          ownerRoot.host :
+          parentNode;
       }
       return target;
     },
@@ -244,7 +244,7 @@
           hovercardLeft = targetLeft + (targetRect.width - thisRect.width) / 2;
           hovercardTop = targetTop - thisRect.height - this.offset;
           cssText += `padding-bottom:${this.offset
-              }px; margin-bottom:-${this.offset}px;`;
+          }px; margin-bottom:-${this.offset}px;`;
           break;
         case 'bottom':
           hovercardLeft = targetLeft + (targetRect.width - thisRect.width) / 2;
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-context.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-context.js
index 9331173..af137e5 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-context.js
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-context.js
@@ -19,6 +19,7 @@
 
   /**
    * Used to create a context for GrAnnotationActionsInterface.
+   *
    * @param {HTMLElement} el The DIV.contentText element to apply the
    *     annotation to using annotateRange.
    * @param {GrDiffLine} line The line object.
@@ -37,6 +38,7 @@
 
   /**
    * Method to add annotations to a line.
+   *
    * @param {Number} start The line number where the update starts.
    * @param {Number} end The line number where the update ends.
    * @param {String} cssClass The name of a CSS class created using Gerrit.css.
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-js-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-js-api.js
index 47281c2..0be557f 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-js-api.js
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-js-api.js
@@ -34,6 +34,7 @@
    * Register a function to call to apply annotations. Plugins should use
    * GrAnnotationActionsContext.annotateRange to apply a CSS class to a range
    * within a line.
+   *
    * @param {function(GrAnnotationActionsContext)} addLayerFunc The function
    *     that will be called when the AnnotationLayer is ready to annotate.
    */
@@ -45,6 +46,7 @@
   /**
    * The specified function will be called with a notify function for the plugin
    * to call when it has all required data for annotation. Optional.
+   *
    * @param {function(function(String, Number, Number, String))} notifyFunc See
    *     doc of the notify function below to see what it does.
    */
@@ -97,6 +99,7 @@
    * The notify function will call the listeners of all required annotation
    * layers. Intended to be called by the plugin when all required data for
    * annotation is available.
+   *
    * @param {String} path The file path whose listeners should be notified.
    * @param {Number} start The line where the update starts.
    * @param {Number} end The line where the update ends.
@@ -117,6 +120,7 @@
   /**
    * Should be called to register annotation layers by the framework. Not
    * intended to be called by plugins.
+   *
    * @param {String} path The file path (eg: /COMMIT_MSG').
    * @param {String} changeNum The Gerrit change number.
    * @param {String} patchNum The Gerrit patch number.
@@ -124,13 +128,14 @@
   GrAnnotationActionsInterface.prototype.getLayer = function(
       path, changeNum, patchNum) {
     const annotationLayer = new AnnotationLayer(path, changeNum, patchNum,
-                                                this._addLayerFunc);
+        this._addLayerFunc);
     this._annotationLayers.push(annotationLayer);
     return annotationLayer;
   };
 
   /**
    * Used to create an instance of the Annotation Layer interface.
+   *
    * @param {String} path The file path (eg: /COMMIT_MSG').
    * @param {String} changeNum The Gerrit change number.
    * @param {String} patchNum The Gerrit patch number.
@@ -148,6 +153,7 @@
 
   /**
    * Register a listener for layer updates.
+   *
    * @param {function(Number, Number, String)} fn The update handler function.
    *     Should accept as arguments the line numbers for the start and end of
    *     the update and the side as a string.
@@ -158,6 +164,7 @@
 
   /**
    * Layer method to add annotations to a line.
+   *
    * @param {HTMLElement} el The DIV.contentText element to apply the
    *     annotation to.
    * @param {GrDiffLine} line The line object.
@@ -170,6 +177,7 @@
 
   /**
    * Notify Layer listeners of changes to annotations.
+   *
    * @param {Number} start The line where the update starts.
    * @param {Number} end The line where the update ends.
    * @param {String} side The side of the update. ('left' or 'right')
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-actions-js-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-actions-js-api.js
index 407a6a8..5658245 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-actions-js-api.js
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-actions-js-api.js
@@ -20,6 +20,7 @@
   /**
    * Ensure GrChangeActionsInterface instance has access to gr-change-actions
    * element and retrieve if the interface was created before element.
+   *
    * @param {!GrChangeActionsInterface} api
    */
   function ensureEl(api) {
@@ -32,6 +33,7 @@
 
   /**
    * Set gr-change-actions element to a GrChangeActionsInterface instance.
+   *
    * @param {!GrChangeActionsInterface} api
    * @param {!Element} el gr-change-actions
    */
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-reply-js-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-reply-js-api.js
index e86ba4d..bef7094 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-reply-js-api.js
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-reply-js-api.js
@@ -20,6 +20,7 @@
   /**
    * Ensure GrChangeReplyInterface instance has access to gr-reply-dialog
    * element and retrieve if the interface was created before element.
+   *
    * @param {!GrChangeReplyInterfaceOld} api
    */
   function ensureEl(api) {
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.js
index 820d2c0..b5686bd 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.js
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.js
@@ -202,7 +202,7 @@
     getDiffLayers(path, changeNum, patchNum) {
       const layers = [];
       for (const annotationApi of
-           this._getEventCallbacks(EventType.ANNOTATE_DIFF)) {
+        this._getEventCallbacks(EventType.ANNOTATE_DIFF)) {
         try {
           const layer = annotationApi.getLayer(path, changeNum, patchNum);
           layers.push(layer);
@@ -216,7 +216,7 @@
     getAdminMenuLinks() {
       const links = [];
       for (const adminApi of
-          this._getEventCallbacks(EventType.ADMIN_MENU_LINKS)) {
+        this._getEventCallbacks(EventType.ADMIN_MENU_LINKS)) {
         links.push(...adminApi.getMenuLinks());
       }
       return links;
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints.js
index 9931f72..899a45e 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints.js
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints.js
@@ -32,7 +32,7 @@
   GrPluginEndpoints.prototype._getOrCreateModuleInfo = function(plugin,
       endpoint, type, moduleName, domHook) {
     const existingModule = this._endpoints[endpoint].find(info =>
-        info.plugin === plugin &&
+      info.plugin === plugin &&
         info.moduleName === moduleName &&
         info.domHook === domHook
     );
@@ -66,6 +66,7 @@
   /**
    * Get detailed information about modules registered with an extension
    * endpoint.
+   *
    * @param {string} name Endpoint name.
    * @param {?{
    *   type: (string|undefined),
@@ -92,6 +93,7 @@
 
   /**
    * Get detailed module names for instantiating at the endpoint.
+   *
    * @param {string} name Endpoint name.
    * @param {?{
    *   type: (string|undefined),
@@ -109,6 +111,7 @@
 
   /**
    * Get .html plugin URLs with element and module definitions.
+   *
    * @param {string} name Endpoint name.
    * @param {?{
    *   type: (string|undefined),
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-rest-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-rest-api.js
index 10deb95..7e84a4b 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-rest-api.js
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-rest-api.js
@@ -48,6 +48,7 @@
 
   /**
    * Fetch and return native browser REST API Response.
+   *
    * @param {string} method HTTP Method (GET, POST, etc)
    * @param {string} url URL without base path or plugin prefix
    * @param {Object=} payload Respected for POST and PUT only.
@@ -63,6 +64,7 @@
 
   /**
    * Fetch and parse REST API response, if request succeeds.
+   *
    * @param {string} method HTTP Method (GET, POST, etc)
    * @param {string} url URL without base path or plugin prefix
    * @param {Object=} payload Respected for POST and PUT only.
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.js
index 1311105..580bf77 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.js
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.js
@@ -192,7 +192,7 @@
   Plugin.prototype.registerCustomComponent = function(
       endpointName, opt_moduleName, opt_options) {
     const type = opt_options && opt_options.replace ?
-          EndpointType.REPLACE : EndpointType.DECORATE;
+      EndpointType.REPLACE : EndpointType.DECORATE;
     const hook = this._domHooks.getDomHook(endpointName, opt_moduleName);
     const moduleName = opt_moduleName || hook.getModuleName();
     Gerrit._endpoints.registerModule(
@@ -258,14 +258,14 @@
 
   Plugin.prototype.changeActions = function() {
     return new GrChangeActionsInterface(this,
-      Plugin._sharedAPIElement.getElement(
-          Plugin._sharedAPIElement.Element.CHANGE_ACTIONS));
+        Plugin._sharedAPIElement.getElement(
+            Plugin._sharedAPIElement.Element.CHANGE_ACTIONS));
   };
 
   Plugin.prototype.changeReply = function() {
     return new GrChangeReplyInterface(this,
-      Plugin._sharedAPIElement.getElement(
-          Plugin._sharedAPIElement.Element.REPLY_DIALOG));
+        Plugin._sharedAPIElement.getElement(
+            Plugin._sharedAPIElement.Element.REPLY_DIALOG));
   };
 
   Plugin.prototype.changeView = function() {
@@ -294,6 +294,7 @@
 
   /**
    * To make REST requests for plugin-provided endpoints, use
+   *
    * @example
    * const pluginRestApi = plugin.restApi(plugin.url());
    *
@@ -567,6 +568,7 @@
 
   /**
    * Install "stepping stones" API for GWT-compiled plugins by default.
+   *
    * @deprecated best effort support, will be removed with GWT UI.
    */
   Gerrit.installGwt = function(url) {
diff --git a/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.js b/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.js
index 40edc28..2020008 100644
--- a/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.js
+++ b/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.js
@@ -125,14 +125,14 @@
       const accountID = parseInt(target.getAttribute('data-account-id'), 10);
       this._xhrPromise =
           this.$.restAPI.deleteVote(this.change._number, accountID, this.label)
-          .then(response => {
-            target.disabled = false;
-            if (!response.ok) { return; }
-            Gerrit.Nav.navigateToChange(this.change);
-          }).catch(err => {
-            target.disabled = false;
-            return;
-          });
+              .then(response => {
+                target.disabled = false;
+                if (!response.ok) { return; }
+                Gerrit.Nav.navigateToChange(this.change);
+              }).catch(err => {
+                target.disabled = false;
+                return;
+              });
     },
 
     _computeValueTooltip(labelInfo, score) {
diff --git a/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader.js b/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader.js
index ef8c112..63214af 100644
--- a/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader.js
+++ b/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader.js
@@ -40,6 +40,7 @@
      * Get the HLJS library. Returns a promise that resolves with a reference to
      * the library after it's been loaded. The promise resolves immediately if
      * it's already been loaded.
+     *
      * @return {!Promise<Object>}
      */
     getHLJS() {
@@ -64,6 +65,7 @@
     /**
      * Loads the dark theme document. Returns a promise that resolves with a
      * custom-style DOM element.
+     *
      * @return {!Promise<Element>}
      */
     getDarkTheme() {
@@ -91,6 +93,7 @@
     /**
      * Get the HLJS library, assuming it has been loaded. Configure the library
      * if it hasn't already been configured.
+     *
      * @return {!Object}
      */
     _getHighlightLib() {
@@ -106,6 +109,7 @@
     /**
      * Get the resource path used to load the application. If the application
      * was loaded through a CDN, then this will be the path to CDN resources.
+     *
      * @return {string}
      */
     _getLibRoot() {
@@ -117,6 +121,7 @@
 
     /**
      * Load and execute a JS file from the lib root.
+     *
      * @param {string} src The path to the JS file without the lib root.
      * @return {Promise} a promise that resolves when the script's onload
      *     executes.
diff --git a/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text.js b/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text.js
index 530da02..09f7bbf 100644
--- a/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text.js
+++ b/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text.js
@@ -54,6 +54,7 @@
     /**
      * Because either the source text or the linkification config has changed,
      * the content should be re-parsed.
+     *
      * @param {string|null|undefined} content The raw, un-linkified source
      *     string to parse.
      * @param {Object|null|undefined} config The server config specifying
@@ -83,6 +84,7 @@
      *   element should be created and attached to the resulting DOM.
      * - To attach an arbitrary fragment: when called with only the `fragment`
      *   argument, the fragment should be attached to the resulting DOM as is.
+     *
      * @param {string|null} text
      * @param {string|null} href
      * @param  {DocumentFragment|undefined} fragment
diff --git a/polygerrit-ui/app/elements/shared/gr-linked-text/link-text-parser.js b/polygerrit-ui/app/elements/shared/gr-linked-text/link-text-parser.js
index cff345d..23a71f9 100644
--- a/polygerrit-ui/app/elements/shared/gr-linked-text/link-text-parser.js
+++ b/polygerrit-ui/app/elements/shared/gr-linked-text/link-text-parser.js
@@ -30,6 +30,7 @@
 
   /**
    * Pattern describing URLs with supported protocols.
+   *
    * @type {RegExp}
    */
   const URL_PROTOCOL_PATTERN = /^(https?:\/\/|mailto:)/;
@@ -38,6 +39,7 @@
    * Construct a parser for linkifying text. Will linkify plain URLs that appear
    * in the text as well as custom links if any are specified in the linkConfig
    * parameter.
+   *
    * @param {Object|null|undefined} linkConfig Comment links as specified by the
    *     commentlinks field on a project config.
    * @param {Function} callback The callback to be fired when an intermediate
@@ -56,6 +58,7 @@
 
   /**
    * Emit a callback to create a link element.
+   *
    * @param {string} text The text of the link.
    * @param {string} href The URL to use as the href of the link.
    */
@@ -67,6 +70,7 @@
   /**
    * Given the source text and a list of CommentLinkItem objects that were
    * generated by the commentlinks config, emit parsing callbacks.
+   *
    * @param {string} text The chuml of source text over which the outputArray
    *     items range.
    * @param {!Array<Defs.CommentLinkItem>} outputArray The list of items to add
@@ -104,6 +108,7 @@
   /**
    * Sort the given array of CommentLinkItems such that the positions are in
    * reverse order.
+   *
    * @param {!Array<Defs.CommentLinkItem>} outputArray
    */
   GrLinkTextParser.prototype.sortArrayReverse = function(outputArray) {
@@ -119,6 +124,7 @@
    * - With the `html` paremeter provided, and the `text` and `href` parameters
    *   passed as `null`. In this case, the string of HTML will be parsed and the
    *   first resulting node will be used as the resulting content.
+   *
    * @param {string|null} text The text to use if creating a link.
    * @param {string|null} href The href to use as the URL if creating a link.
    * @param {string|null} html The html to parse and use as the result.
@@ -161,6 +167,7 @@
   /**
    * Create a CommentLinkItem for a link and append it to the given output
    * array.
+   *
    * @param {string|null} text The text for the link.
    * @param {string|null} href The href to use as the URL of the link.
    * @param {number} position The position inside the source text where the link
@@ -183,6 +190,7 @@
   /**
    * Create a CommentLinkItem specified by an HTMl string and append it to the
    * given output array.
+   *
    * @param {string|null} html The html to parse and use as the result.
    * @param {number} position The position inside the source text where the item
    *     starts.
@@ -203,6 +211,7 @@
 
   /**
    * Does the given range overlap with anything already in the item list.
+   *
    * @param {number} position
    * @param {number} length
    * @param {!Array<Defs.CommentLinkItem>} outputArray
@@ -225,6 +234,7 @@
   /**
    * Parse the given source text and emit callbacks for the items that are
    * parsed.
+   *
    * @param {string} text
    */
   GrLinkTextParser.prototype.parse = function(text) {
@@ -240,6 +250,7 @@
    *   ba-linkify has found a plain URL and wants it linkified.
    * - With only a `text` parameter provided: this represents the non-link
    *   content that lies between the links the library has found.
+   *
    * @param {string} text
    * @param {string|null|undefined} href
    */
@@ -266,6 +277,7 @@
   /**
    * Walk over the given source text to find matches for comemntlink patterns
    * and emit parse result callbacks.
+   *
    * @param {string} text The raw source text.
    * @param {Object|null|undefined} patterns A comment links specification
    *   object.
diff --git a/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav.js b/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav.js
index 9ccff600..2e05607 100644
--- a/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav.js
+++ b/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav.js
@@ -36,8 +36,8 @@
       if (this._headerHeight === undefined) {
         let top = this._getOffsetTop(this);
         for (let offsetParent = this.offsetParent;
-           offsetParent;
-           offsetParent = this._getOffsetParent(offsetParent)) {
+          offsetParent;
+          offsetParent = this._getOffsetParent(offsetParent)) {
           top += this._getOffsetTop(offsetParent);
         }
         this._headerHeight = top;
diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-auth.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-auth.js
index 43e3922..2ff5f85 100644
--- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-auth.js
+++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-auth.js
@@ -146,7 +146,7 @@
         params.push(`access_token=${accessToken}`);
         const baseUrl = Gerrit.BaseUrlBehavior.getBaseUrl();
         const pathname = baseUrl ?
-              url.substring(url.indexOf(baseUrl) + baseUrl.length) : url;
+          url.substring(url.indexOf(baseUrl) + baseUrl.length) : url;
         if (!pathname.startsWith('/a/')) {
           url = url.replace(pathname, '/a' + pathname);
         }
diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-auth_test.html b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-auth_test.html
index a571be9..f203594 100644
--- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-auth_test.html
+++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-auth_test.html
@@ -109,8 +109,8 @@
       test('getToken calls are cached', () => {
         return Promise.all([
           auth.fetch('/url-one'), auth.fetch('/url-two')]).then(() => {
-            assert.equal(getToken.callCount, 1);
-          });
+          assert.equal(getToken.callCount, 1);
+        });
       });
 
       test('getToken refreshes token', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-etag-decorator.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-etag-decorator.js
index f72c7cc..c20cdd7 100644
--- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-etag-decorator.js
+++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-etag-decorator.js
@@ -30,6 +30,7 @@
 
   /**
    * Get or upgrade fetch options to include an ETag in a request.
+   *
    * @param {string} url The URL being fetched.
    * @param {!Object=} opt_options Optional options object in which to include
    *     the ETag request header. If omitted, the result will be a fresh option
@@ -77,6 +78,7 @@
 
   /**
    * Get the cached payload for a given URL.
+   *
    * @param {string} url
    * @return {string|undefined} Returns the unparsed JSON payload from the
    *     cache.
diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js
index 79e3fa8..ad1fac0 100644
--- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js
+++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js
@@ -43,6 +43,7 @@
    * - cancelCondition is a function that, if provided and returns true, will
    *     cancel the response after it resolves.
    * - params is a key-value hash to specify get params for the request URL.
+   *
    * @typedef {{
    *    url: string,
    *    errFn: (function(?Response, string=)|null|undefined),
@@ -82,6 +83,7 @@
    * - headers is a key-value hash to describe HTTP headers for the request.
    * - parseResponse states whether the result should be parsed as a JSON
    *     object using getResponseObject.
+   *
    * @typedef {{
    *   method: string,
    *   url: string,
@@ -253,6 +255,7 @@
     /**
      * Wraps calls to the underlying authenticated fetch function (_auth.fetch)
      * with timing and logging.
+     *
      * @param {Defs.FetchRequest} req
      */
     _fetch(req) {
@@ -270,6 +273,7 @@
      * Log information about a REST call. Because the elapsed time is determined
      * by this method, it should be called immediately after the request
      * finishes.
+     *
      * @param {Defs.FetchRequest} req
      * @param {number} startTime the time that the request was started.
      * @param {number} status the HTTP status of the response. The status value
@@ -278,7 +282,7 @@
      */
     _logCall(req, startTime, status) {
       const method = (req.fetchOptions && req.fetchOptions.method) ?
-          req.fetchOptions.method : 'GET';
+        req.fetchOptions.method : 'GET';
       const elapsed = (Date.now() - startTime);
       console.log([
         'HTTP',
@@ -298,6 +302,7 @@
      * Returns a Promise that resolves to a native Response.
      * Doesn't do error checking. Supports cancel condition. Performs auth.
      * Validates auth expiry errors.
+     *
      * @param {Defs.FetchJSONRequest} req
      */
     _fetchRawJSON(req) {
@@ -332,6 +337,7 @@
      * Fetch JSON from url provided.
      * Returns a Promise that resolves to a parsed response.
      * Same as {@link _fetchRawJSON}, plus error handling.
+     *
      * @param {Defs.FetchJSONRequest} req
      */
     _fetchJSON(req) {
@@ -1149,7 +1155,7 @@
         return Promise.resolve({
           changes_per_page: 25,
           default_diff_view: this._isNarrowScreen() ?
-              DiffViewMode.UNIFIED : DiffViewMode.SIDE_BY_SIDE,
+            DiffViewMode.UNIFIED : DiffViewMode.SIDE_BY_SIDE,
           diff_view: 'SIDE_BY_SIDE',
           size_bar_in_change_table: true,
         });
@@ -1293,6 +1299,7 @@
 
     /**
      * Inserts a change into _projectLookup iff it has a valid structure.
+     *
      * @param {?{ _number: (number|string) }} change
      */
     _maybeInsertInLookup(change) {
@@ -1391,8 +1398,8 @@
           }
 
           const payloadPromise = response ?
-              this._readResponsePayload(response) :
-              Promise.resolve(null);
+            this._readResponsePayload(response) :
+            Promise.resolve(null);
 
           return payloadPromise.then(payload => {
             if (!payload) { return null; }
@@ -1480,7 +1487,7 @@
     getChangeOrEditFiles(changeNum, patchRange) {
       if (this.patchNumEquals(patchRange.patchNum, this.EDIT_NAME)) {
         return this.getChangeEditFiles(changeNum, patchRange).then(res =>
-            res.files);
+          res.files);
       }
       return this.getChangeFiles(changeNum, patchRange);
     },
@@ -1488,6 +1495,7 @@
     /**
      * The closure compiler doesn't realize this.specialFilePathCompare is
      * valid.
+     *
      * @suppress {checkTypes}
      */
     getChangeFilePathsAsSpeciallySortedArray(changeNum, patchRange) {
@@ -2013,8 +2021,8 @@
         return res;
       };
       const promise = this.patchNumEquals(patchNum, this.EDIT_NAME) ?
-          this._getFileInChangeEdit(changeNum, path) :
-          this._getFileInRevision(changeNum, path, patchNum, suppress404s);
+        this._getFileInChangeEdit(changeNum, path) :
+        this._getFileInRevision(changeNum, path, patchNum, suppress404s);
 
       return promise.then(res => {
         if (!res.ok) { return res; }
@@ -2030,6 +2038,7 @@
 
     /**
      * Gets a file in a specific change and revision.
+     *
      * @param {number|string} changeNum
      * @param {string} path
      * @param {number|string} patchNum
@@ -2049,6 +2058,7 @@
 
     /**
      * Gets a file in a change edit.
+     *
      * @param {number|string} changeNum
      * @param {string} path
      */
@@ -2175,6 +2185,7 @@
 
     /**
      * Send an XHR.
+     *
      * @param {Defs.SendRequest} req
      * @return {Promise}
      */
@@ -2185,7 +2196,7 @@
         options.headers.set(
             'Content-Type', req.contentType || 'application/json');
         options.body = typeof req.body === 'string' ?
-            req.body : JSON.stringify(req.body);
+          req.body : JSON.stringify(req.body);
       }
       if (req.headers) {
         if (!options.headers) { options.headers = new Headers(); }
@@ -2195,7 +2206,7 @@
         }
       }
       const url = req.url.startsWith('http') ?
-          req.url : this.getBaseUrl() + req.url;
+        req.url : this.getBaseUrl() + req.url;
       const fetchReq = {
         url,
         fetchOptions: options,
@@ -2227,6 +2238,7 @@
 
     /**
      * Public version of the _send method preserved for plugins.
+     *
      * @param {string} method
      * @param {string} url
      * @param {?string|number|Object=} opt_body passed as null sometimes
@@ -2531,7 +2543,7 @@
      */
     getB64FileContents(changeId, patchNum, path, opt_parentIndex) {
       const parent = typeof opt_parentIndex === 'number' ?
-          '?parent=' + opt_parentIndex : '';
+        '?parent=' + opt_parentIndex : '';
       return this._changeBaseURL(changeId, patchNum).then(url => {
         url = `${url}/files/${encodeURIComponent(path)}/content${parent}`;
         return this._fetchB64File(url);
@@ -2590,8 +2602,8 @@
       // TODO(kaspern): For full slicer migration, app should warn with a call
       // stack every time _changeBaseURL is called without a project.
       const projectPromise = opt_project ?
-          Promise.resolve(opt_project) :
-          this.getFromProjectLookup(changeNum);
+        Promise.resolve(opt_project) :
+        this.getFromProjectLookup(changeNum);
       return projectPromise.then(project => {
         let url = `/changes/${encodeURIComponent(project)}~${changeNum}`;
         if (opt_patchNum) {
@@ -2917,15 +2929,16 @@
 
     /**
      * Alias for _changeBaseURL.then(send).
+     *
      * @todo(beckysiegel) clean up comments
      * @param {Defs.ChangeSendRequest} req
      * @return {!Promise<!Object>}
      */
     _getChangeURLAndSend(req) {
       const anonymizedBaseUrl = req.patchNum ?
-          ANONYMIZED_REVISION_BASE_URL : ANONYMIZED_CHANGE_BASE_URL;
+        ANONYMIZED_REVISION_BASE_URL : ANONYMIZED_CHANGE_BASE_URL;
       const anonymizedEndpoint = req.reportEndpointAsIs ?
-          req.endpoint : req.anonymizedEndpoint;
+        req.endpoint : req.anonymizedEndpoint;
 
       return this._changeBaseURL(req.changeNum, req.patchNum).then(url => {
         return this._send({
@@ -2937,21 +2950,22 @@
           headers: req.headers,
           parseResponse: req.parseResponse,
           anonymizedUrl: anonymizedEndpoint ?
-              (anonymizedBaseUrl + anonymizedEndpoint) : undefined,
+            (anonymizedBaseUrl + anonymizedEndpoint) : undefined,
         });
       });
     },
 
     /**
      * Alias for _changeBaseURL.then(_fetchJSON).
+     *
      * @param {Defs.ChangeFetchRequest} req
      * @return {!Promise<!Object>}
      */
     _getChangeURLAndFetch(req) {
       const anonymizedEndpoint = req.reportEndpointAsIs ?
-          req.endpoint : req.anonymizedEndpoint;
+        req.endpoint : req.anonymizedEndpoint;
       const anonymizedBaseUrl = req.patchNum ?
-          ANONYMIZED_REVISION_BASE_URL : ANONYMIZED_CHANGE_BASE_URL;
+        ANONYMIZED_REVISION_BASE_URL : ANONYMIZED_CHANGE_BASE_URL;
       return this._changeBaseURL(req.changeNum, req.patchNum).then(url => {
         return this._fetchJSON({
           url: url + req.endpoint,
@@ -2959,13 +2973,14 @@
           params: req.params,
           fetchOptions: req.fetchOptions,
           anonymizedUrl: anonymizedEndpoint ?
-              (anonymizedBaseUrl + anonymizedEndpoint) : undefined,
+            (anonymizedBaseUrl + anonymizedEndpoint) : undefined,
         });
       });
     },
 
     /**
      * Execute a change action or revision action on a change.
+     *
      * @param {number} changeNum
      * @param {string} method
      * @param {string} endpoint
@@ -2988,6 +3003,7 @@
 
     /**
      * Get blame information for the given diff.
+     *
      * @param {string|number} changeNum
      * @param {string|number} patchNum
      * @param {string} path
@@ -3009,6 +3025,7 @@
     /**
      * Modify the given create draft request promise so that it fails and throws
      * an error if the response bears HTTP status 200 instead of HTTP 201.
+     *
      * @see Issue 7763
      * @param {Promise} promise The original promise.
      * @return {Promise} The modified promise.
@@ -3038,6 +3055,7 @@
     /**
      * Fetch a project dashboard definition.
      * https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#get-dashboard
+     *
      * @param {string} project
      * @param {string} dashboard
      * @param {function(?Response, string=)=} opt_errFn
diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-reviewer-updates-parser.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-reviewer-updates-parser.js
index 2451981..8ddb255 100644
--- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-reviewer-updates-parser.js
+++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-reviewer-updates-parser.js
@@ -61,6 +61,7 @@
 
   /**
    * Is a part of _groupUpdates(). Creates a new batch of updates.
+   *
    * @param {Object} update instance of ReviewerUpdateInfo
    */
   GrReviewerUpdatesParser.prototype._startBatch = function(update) {
@@ -76,6 +77,7 @@
    * Is a part of _groupUpdates(). Validates current batch:
    * - filters out updates that don't change reviewer state.
    * - updates current reviewer state.
+   *
    * @param {Object} update instance of ReviewerUpdateInfo
    */
   GrReviewerUpdatesParser.prototype._completeBatch = function(update) {
@@ -137,6 +139,7 @@
 
   /**
    * Generates update message for reviewer state change.
+   *
    * @param {string} prev previous reviewer state.
    * @param {string} state current reviewer state.
    * @return {string}
@@ -158,6 +161,7 @@
   /**
    * Groups updates for same category (eg CC->CC) into a hash arrays of
    * reviewers.
+   *
    * @param {!Array<!Object>} updates Array of ReviewerUpdateItemInfo.
    * @return {!Object} Hash of arrays of AccountInfo, message as key.
    */
@@ -175,6 +179,7 @@
   /**
    * Generates text messages for grouped reviewer updates.
    * Formats reviewer updates to a (not yet implemented) EventInfo instance.
+   *
    * @see https://gerrit-review.googlesource.com/c/94490/
    */
   GrReviewerUpdatesParser.prototype._formatUpdates = function() {
@@ -204,7 +209,7 @@
     messages.forEach((message, index) => {
       const messageDate = util.parseDate(message.date).getTime();
       const nextMessageDate = index === messages.length - 1 ? null :
-          util.parseDate(messages[index + 1].date).getTime();
+        util.parseDate(messages[index + 1].date).getTime();
       for (const update of updates) {
         const date = util.parseDate(update.date).getTime();
         if (date >= messageDate
@@ -212,7 +217,7 @@
           const timestamp = util.parseDate(update.date).getTime() -
               GrReviewerUpdatesParser.MESSAGE_REVIEWERS_THRESHOLD_MILLIS;
           update.date = new Date(timestamp)
-            .toISOString().replace('T', ' ').replace('Z', '000000');
+              .toISOString().replace('T', ' ').replace('Z', '000000');
         }
         if (nextMessageDate && date > nextMessageDate) {
           break;
diff --git a/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js b/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js
index c425609..6d82dad 100644
--- a/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js
+++ b/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js
@@ -85,9 +85,9 @@
 
     _getDraftKey(location) {
       const range = location.range ?
-          `${location.range.start_line}-${location.range.start_character}` +
+        `${location.range.start_line}-${location.range.start_character}` +
               `-${location.range.end_character}-${location.range.end_line}` :
-          null;
+        null;
       let key = ['draft', location.changeNum, location.patchNum, location.path,
         location.line || ''].join(':');
       if (range) {
diff --git a/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea_test.html b/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea_test.html
index 3a52543..f010fb32 100644
--- a/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea_test.html
+++ b/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea_test.html
@@ -132,16 +132,16 @@
       assert.isTrue(formatSpy.called);
       assert.isTrue(formatSpy.lastCall.calledWithExactly(
           [{dataValue: '😢', value: '😢', match: 'tear', text: '😢 tear'},
-          {dataValue: '😂', value: '😂', match: 'tears', text: '😂 tears'}]));
+            {dataValue: '😂', value: '😂', match: 'tears', text: '😂 tears'}]));
     });
 
     test('_formatSuggestions', () => {
       const matchedSuggestions = [{value: '😢', match: 'tear'},
-          {value: '😂', match: 'tears'}];
+        {value: '😂', match: 'tears'}];
       element._formatSuggestions(matchedSuggestions);
       assert.deepEqual(
           [{value: '😢', dataValue: '😢', match: 'tear', text: '😢 tear'},
-          {value: '😂', dataValue: '😂', match: 'tears', text: '😂 tears'}],
+            {value: '😂', dataValue: '😂', match: 'tears', text: '😂 tears'}],
           element._suggestions);
     });
 
diff --git a/polygerrit-ui/app/elements/shared/revision-info/revision-info.html b/polygerrit-ui/app/elements/shared/revision-info/revision-info.html
index 91f87d0..0846728 100644
--- a/polygerrit-ui/app/elements/shared/revision-info/revision-info.html
+++ b/polygerrit-ui/app/elements/shared/revision-info/revision-info.html
@@ -32,6 +32,7 @@
      * example, with normal changes this will always return 1. For merge changes
      * wherein the revisions are merge commits this will return 2 or potentially
      * more.
+     *
      * @return {Number}
      */
     RevisionInfo.prototype.getMaxParents = function() {
@@ -42,6 +43,7 @@
     /**
      * Get an object that maps revision numbers to the number of parents of the
      * commit of that revision.
+     *
      * @return {!Object}
      */
     RevisionInfo.prototype.getParentCountMap = function() {
@@ -62,13 +64,14 @@
     /**
      * Get the commit ID of the (0-offset) indexed parent in the given revision
      * number.
+     *
      * @param {number|string} patchNum
      * @param {number} parentIndex (0-offset)
      * @return {string}
      */
     RevisionInfo.prototype.getParentId = function(patchNum, parentIndex) {
       const rev = Object.values(this._change.revisions).find(rev =>
-          Gerrit.PatchSetBehavior.patchNumEquals(rev._number, patchNum));
+        Gerrit.PatchSetBehavior.patchNumEquals(rev._number, patchNum));
       return rev.commit.parents[parentIndex].commit;
     };
 
diff --git a/polygerrit-ui/app/lint_test.sh b/polygerrit-ui/app/lint_test.sh
index fce5fdd..f8e233d8 100755
--- a/polygerrit-ui/app/lint_test.sh
+++ b/polygerrit-ui/app/lint_test.sh
@@ -28,6 +28,6 @@
 
 # Linking global eslint packages to the local project. Required to use eslint plugins with a global
 # eslint installation.
-npm link eslint eslint-config-google eslint-plugin-html
+npm link eslint eslint-config-google eslint-plugin-html eslint-plugin-jsdoc
 
-${eslint_bin} -c ${UI_PATH}/.eslintrc.json --ignore-pattern 'node_modules/' --ignore-pattern 'bower_components/' --ignore-pattern 'gr-linked-text' --ignore-pattern 'scripts/vendor' --ext .html,.js ${UI_PATH}
+${eslint_bin} -c ${UI_PATH}/.eslintrc.json --ext .html,.js ${UI_PATH}
diff --git a/polygerrit-ui/app/polylint_test.sh b/polygerrit-ui/app/polylint_test.sh
index ee69ce2..f6880a1 100755
--- a/polygerrit-ui/app/polylint_test.sh
+++ b/polygerrit-ui/app/polylint_test.sh
@@ -8,13 +8,13 @@
     exit 1
 fi
 
-polylint_bin=$(which polylint)
-if [[ -z "$polylint_bin" ]]; then
-    echo "You must install polylint and its dependencies from NPM."
-    echo "> npm install -g polylint"
+npx_bin=$(which npx)
+if [[ -z "$npx_bin" ]]; then
+    echo "NPX must be on the path."
+    echo "> npm i -g npx"
     exit 1
 fi
 
 unzip -o polygerrit-ui/polygerrit_components.bower_components.zip -d polygerrit-ui/app
 
-${polylint_bin} --root polygerrit-ui/app --input elements/gr-app.html --b 'bower_components'
\ No newline at end of file
+npx polylint --root polygerrit-ui/app --input elements/gr-app.html --b 'bower_components' --verbose
diff --git a/polygerrit-ui/app/run_template_test.sh b/polygerrit-ui/app/run_template_test.sh
index 4cd6e7f..d2b6989 100755
--- a/polygerrit-ui/app/run_template_test.sh
+++ b/polygerrit-ui/app/run_template_test.sh
@@ -3,7 +3,7 @@
 if [[ -z "${TEMPLATE_NO_DEFAULT}" ]]; then
 bazel test \
       --test_env="HOME=$HOME" \
-      //polygerrit-ui/app:all
+      //polygerrit-ui/app:all \
       --test_tag_filters=template \
       "$@" \
       --test_output errors \
diff --git a/polygerrit-ui/app/run_test.sh b/polygerrit-ui/app/run_test.sh
index 7b48480..e9be18d 100755
--- a/polygerrit-ui/app/run_test.sh
+++ b/polygerrit-ui/app/run_test.sh
@@ -6,9 +6,29 @@
     exit 1
 fi
 
+# From https://www.linuxquestions.org/questions/programming-9/bash-script-return-full-path-and-filename-680368/page3.html
+function abs_path {
+  if [[ -d "$1" ]]
+  then
+      pushd "$1" >/dev/null
+      pwd
+      popd >/dev/null
+  elif [[ -e $1 ]]
+  then
+      pushd "$(dirname "$1")" >/dev/null
+      echo "$(pwd)/$(basename "$1")"
+      popd >/dev/null
+  else
+      echo "$1" does not exist! >&2
+      return 127
+  fi
+}
 wct_bin=$(which wct)
 if [[ -z "$wct_bin" ]]; then
-    echo "WCT must be on the path. (https://github.com/Polymer/web-component-tester)"
+  wct_bin=$(abs_path ./node_modules/web-component-tester/bin/wct);
+fi
+if [[ -z "$wct_bin" ]]; then
+    echo "wct_bin must be set or WCT locally installed (npm install wct)."
     exit 1
 fi
 
diff --git a/polygerrit-ui/app/samples/coverage-plugin.html b/polygerrit-ui/app/samples/coverage-plugin.html
index 9bec658..b298237 100644
--- a/polygerrit-ui/app/samples/coverage-plugin.html
+++ b/polygerrit-ui/app/samples/coverage-plugin.html
@@ -34,16 +34,16 @@
       const annotationApi = plugin.annotationApi();
       annotationApi.addLayer(context => {
         if (Object.keys(coverageData).length === 0) {
-           // Coverage data is not ready yet.
+          // Coverage data is not ready yet.
           return;
         }
         const path = context.path;
         const line = context.line;
-          // Highlight lines missing coverage with this background color if
-          // coverage should be displayed, else do nothing.
+        // Highlight lines missing coverage with this background color if
+        // coverage should be displayed, else do nothing.
         const cssClass = displayCoverage
-                         ? Gerrit.css('background-color: #EF9B9B')
-                         : Gerrit.css('');
+          ? Gerrit.css('background-color: #EF9B9B')
+          : Gerrit.css('');
         if (coverageData[path] &&
               coverageData[path].changeNum === context.changeNum &&
               coverageData[path].patchNum === context.patchNum) {
diff --git a/polygerrit-ui/app/template_test.sh b/polygerrit-ui/app/template_test.sh
index eb986c5..2782b65 100755
--- a/polygerrit-ui/app/template_test.sh
+++ b/polygerrit-ui/app/template_test.sh
@@ -14,19 +14,6 @@
     exit 1
 fi
 
-fried_twinkie_config=$(npm list -g | grep -c fried-twinkie) && true
-if [ -z "$npm_bin" ] || [ "$fried_twinkie_config" -eq "0" ]; then
-    echo "You must install fried twinkie and its dependencies from NPM."
-    echo "> npm install -g fried-twinkie"
-    exit 1
-fi
-
-twinkie_version=$(npm list -g fried-twinkie@\>0.1 | grep fried-twinkie || :) && true
-if [ -z "$twinkie_version" ]; then
-    echo "Outdated version of fried-twinkie found. Bypassing template check."
-    exit 0
-fi
-
 # Have to find where node_modules are installed and set the NODE_PATH
 
 get_node_path() {
diff --git a/polygerrit-ui/app/wct_test.sh b/polygerrit-ui/app/wct_test.sh
index a8394cd..dd16ba7 100755
--- a/polygerrit-ui/app/wct_test.sh
+++ b/polygerrit-ui/app/wct_test.sh
@@ -60,9 +60,9 @@
     };
 EOF
 
-export PATH="$(dirname $WCT):$(dirname $NPM):$PATH"
+export PATH="$(dirname $NPM):$PATH"
 
 cd $t
 test -n "${WCT}"
 
-$(basename ${WCT}) ${WCT_ARGS}
+${WCT} ${WCT_ARGS}
diff --git a/tools/dev-hooks/pre-commit b/tools/dev-hooks/pre-commit
new file mode 100755
index 0000000..b77f382
--- /dev/null
+++ b/tools/dev-hooks/pre-commit
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Part of Gerrit Code Review (https://www.gerritcodereview.com/)
+#
+# Copyright (C) 2019 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# To enable this hook:
+# - copy this file or content to ".git/hooks/pre-commit"
+# - (optional if you copied this file) make it executable: `chmod +x .git/hooks/pre-commit`
+
+set -ue
+
+# gitroot, default to .
+gitroot=$(git rev-parse --show-cdup)
+gitroot=${gitroot:-.};
+
+# eslint
+eslint=${gitroot}/node_modules/eslint/bin/eslint.js
+
+# Run eslint over changed frontend code
+CHANGED_UI_FILES=$(git diff --cached --name-only -- '*.js' '*.html' | grep 'polygerrit-ui') && true
+if [ "${CHANGED_UI_FILES}" ]; then
+  if $eslint --fix ${CHANGED_UI_FILES}; then
+    # Add again in case lint fix modified some files
+    git add ${CHANGED_UI_FILES}
+    exit 0
+  else
+    echo "Failed to fix all linter issues.";
+    exit 1
+  fi
+else
+  echo "No UI files changed"
+  exit 0
+fi
\ No newline at end of file