1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08: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

@ -79,11 +79,11 @@ function initializePDFJS(callback) {
"pdfjs-test/unit/ui_utils_spec.js",
"pdfjs-test/unit/unicode_spec.js",
"pdfjs-test/unit/util_spec.js",
].map(function(moduleName) {
].map(function (moduleName) {
// eslint-disable-next-line no-unsanitized/method
return SystemJS.import(moduleName);
})
).then(function(modules) {
).then(function (modules) {
const displayApi = modules[0];
const { GlobalWorkerOptions } = modules[1];
const { PDFNetworkStream } = modules[2];
@ -102,11 +102,11 @@ function initializePDFJS(callback) {
"body" in Response.prototype &&
typeof ReadableStream !== "undefined"
) {
displayApi.setPDFNetworkStreamFactory(function(params) {
displayApi.setPDFNetworkStreamFactory(function (params) {
return new PDFFetchStream(params);
});
} else {
displayApi.setPDFNetworkStreamFactory(function(params) {
displayApi.setPDFNetworkStreamFactory(function (params) {
return new PDFNetworkStream(params);
});
}
@ -118,7 +118,7 @@ function initializePDFJS(callback) {
});
}
(function() {
(function () {
window.jasmine = jasmineRequire.core(jasmineRequire);
jasmineRequire.html(jasmine);
@ -190,7 +190,7 @@ function initializePDFJS(callback) {
},
});
config.specFilter = function(spec) {
config.specFilter = function (spec) {
return specFilter.matches(spec.getFullName());
};
@ -204,12 +204,12 @@ function initializePDFJS(callback) {
// instance and then executing the loaded Jasmine environment.
var currentWindowOnload = window.onload;
window.onload = function() {
window.onload = function () {
if (currentWindowOnload) {
currentWindowOnload();
}
initializePDFJS(function() {
initializePDFJS(function () {
htmlReporter.initialize();
env.execute();
});