Update ESLint to 6.8.0

Also update the PRESUBMIT linter configuration to make sure
it actually runs the linter when updating ESLint. Otherwise,
it would not properly do the full linter check.

R=jacktfranklin@chromium.org
DISABLE_THIRD_PARTY_CHECK=Update ESLint

Bug: 1068145
Change-Id: Ibf2de156366dc64c90ee1aced5537d2038e7a268
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2137384
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
diff --git a/node_modules/eslint/lib/rules/no-trailing-spaces.js b/node_modules/eslint/lib/rules/no-trailing-spaces.js
index 83c01d5..3a4124f 100644
--- a/node_modules/eslint/lib/rules/no-trailing-spaces.js
+++ b/node_modules/eslint/lib/rules/no-trailing-spaces.js
@@ -90,7 +90,11 @@
             const lines = new Set();
 
             comments.forEach(comment => {
-                for (let i = comment.loc.start.line; i <= comment.loc.end.line; i++) {
+                const endLine = comment.type === "Block"
+                    ? comment.loc.end.line - 1
+                    : comment.loc.end.line;
+
+                for (let i = comment.loc.start.line; i <= endLine; i++) {
                     lines.add(i);
                 }
             });
@@ -122,7 +126,7 @@
                     fixRange = [];
 
                 for (let i = 0, ii = lines.length; i < ii; i++) {
-                    const matches = re.exec(lines[i]);
+                    const lineNumber = i + 1;
 
                     /*
                      * Always add linebreak length to line length to accommodate for line break (\n or \r\n)
@@ -132,14 +136,22 @@
                     const linebreakLength = linebreaks && linebreaks[i] ? linebreaks[i].length : 1;
                     const lineLength = lines[i].length + linebreakLength;
 
+                    const matches = re.exec(lines[i]);
+
                     if (matches) {
                         const location = {
-                            line: i + 1,
-                            column: matches.index
+                            start: {
+                                line: lineNumber,
+                                column: matches.index
+                            },
+                            end: {
+                                line: lineNumber,
+                                column: lineLength - linebreakLength
+                            }
                         };
 
-                        const rangeStart = totalLength + location.column;
-                        const rangeEnd = totalLength + lineLength - linebreakLength;
+                        const rangeStart = totalLength + location.start.column;
+                        const rangeEnd = totalLength + location.end.column;
                         const containingNode = sourceCode.getNodeByRangeIndex(rangeStart);
 
                         if (containingNode && containingNode.type === "TemplateElement" &&
@@ -160,7 +172,7 @@
 
                         fixRange = [rangeStart, rangeEnd];
 
-                        if (!ignoreComments || !commentLineNumbers.has(location.line)) {
+                        if (!ignoreComments || !commentLineNumbers.has(lineNumber)) {
                             report(node, location, fixRange);
                         }
                     }