Update Prettier to version 2.0

Please note that these changes were done automatically, using `gulp lint --fix`.

Given that the major version number was increased, there's a fair number of (primarily whitespace) changes; please see https://prettier.io/blog/2020/03/21/2.0.0.html
In order to reduce the size of these changes somewhat, this patch maintains the old "arrowParens" style for now (once mozilla-central updates Prettier we can simply choose the same formatting, assuming it will differ here).
This commit is contained in:
Jonas Jenwald 2020-04-14 12:28:14 +02:00
parent a4dd081d7b
commit 426945b480
145 changed files with 2005 additions and 2009 deletions

View file

@ -56,7 +56,7 @@ class BaseFontLoader {
}
clear() {
this.nativeFontFaces.forEach(function(nativeFontFace) {
this.nativeFontFaces.forEach(function (nativeFontFace) {
document.fonts.delete(nativeFontFace);
});
this.nativeFontFaces.length = 0;
@ -198,7 +198,7 @@ if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
}
get _loadTestFont() {
const getLoadTestFont = function() {
const getLoadTestFont = function () {
// This is a CFF font with 1 glyph for '.' that fills its entire width
// and height.
return atob(
@ -328,7 +328,7 @@ if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
}
document.body.appendChild(div);
isFontReady(loadTestFontId, function() {
isFontReady(loadTestFontId, function () {
document.body.removeChild(div);
request.complete();
});
@ -404,7 +404,7 @@ class FontFaceObject {
}
warn(`getPathGenerator - ignoring character: "${ex}".`);
return (this.compiledGlyphs[character] = function(c, size) {
return (this.compiledGlyphs[character] = function (c, size) {
// No-op function, to allow rendering to continue.
});
}
@ -428,7 +428,7 @@ class FontFaceObject {
}
// ... but fall back on using Function.prototype.apply() if we're
// blocked from using eval() for whatever reason (like CSP policies).
return (this.compiledGlyphs[character] = function(c, size) {
return (this.compiledGlyphs[character] = function (c, size) {
for (let i = 0, ii = cmds.length; i < ii; i++) {
current = cmds[i];