1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

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

@ -34,7 +34,7 @@ var Name = (function NameClosure() {
return nameValue ? nameValue : (nameCache[name] = new Name(name));
};
Name._clearCache = function() {
Name._clearCache = function () {
nameCache = Object.create(null);
};
@ -57,7 +57,7 @@ var Cmd = (function CmdClosure() {
return cmdValue ? cmdValue : (cmdCache[cmd] = new Cmd(cmd));
};
Cmd._clearCache = function() {
Cmd._clearCache = function () {
cmdCache = Object.create(null);
};
@ -164,7 +164,7 @@ var Dict = (function DictClosure() {
Dict.empty = new Dict(null);
Dict.merge = function(xref, dictArray) {
Dict.merge = function (xref, dictArray) {
const mergedDict = new Dict(xref);
for (let i = 0, ii = dictArray.length; i < ii; i++) {
@ -205,14 +205,14 @@ var Ref = (function RefClosure() {
},
};
Ref.get = function(num, gen) {
Ref.get = function (num, gen) {
const key = gen === 0 ? `${num}R` : `${num}R${gen}`;
const refValue = refCache[key];
// eslint-disable-next-line no-restricted-syntax
return refValue ? refValue : (refCache[key] = new Ref(num, gen));
};
Ref._clearCache = function() {
Ref._clearCache = function () {
refCache = Object.create(null);
};