Reconfigure lint rule w.r.t. quotes
We prefer single quotes by default, but still want to allow double
quotes in cases where that helps avoid quote-escaping, and also want
to allow template literals in cases where string interpolation is
used. For example:
const a = 'xxx'; // ok
const b = "xxx"; // not ok, should use single quotes
const c = "xxx'xxx"; // ok, double quotes avoid an escape sequence
const d = `xxx`; // not ok, frivolous use of template literal
const e = `xxx ${42}`; // ok
Per https://github.com/eslint/eslint/issues/12976, setting
the `allowTemplateLiterals` option for the `quotes` lint rule to
`false` gives us the desired behavior.
Note that the above lint rules are auto-fixed when running the linter;
there should be no need to manually make any changes to appease the
linter.
Per review feedback, this patch also removes the following escape
sequences for printable non-ASCII symbols:
- U+00D7 → ×
- U+2026 → …
- U+2019 → ’
Chromium CL temporarily updating test expectations:
https://chromium-review.googlesource.com/c/chromium/src/+/2083147
Cq-Depend: chromium:2083147
Bug: chromium:1057042
Change-Id: Id6bec3f96ca694d2fbc07dd8629fce305a58df8a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2082372
Commit-Queue: Mathias Bynens <[email protected]>
Reviewed-by: Tim van der Lippe <[email protected]>
Auto-Submit: Mathias Bynens <[email protected]>
diff --git a/front_end/elements/MetricsSidebarPane.js b/front_end/elements/MetricsSidebarPane.js
index 64a753a..37b1289 100644
--- a/front_end/elements/MetricsSidebarPane.js
+++ b/front_end/elements/MetricsSidebarPane.js
@@ -284,7 +284,7 @@
'dblclick', this.startEditing.bind(this, heightElement, 'height', 'height', style), false);
boxElement.appendChild(widthElement);
- boxElement.createTextChild(' \u00D7 ');
+ boxElement.createTextChild(' × ');
boxElement.appendChild(heightElement);
} else {
const suffix = (name === 'border' ? '-width' : '');