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

@ -57,8 +57,8 @@ function group(stats, groupBy) {
*/
function flatten(stats) {
var rows = [];
stats.forEach(function(curStat) {
curStat["stats"].forEach(function(s) {
stats.forEach(function (curStat) {
curStat["stats"].forEach(function (s) {
rows.push({
browser: curStat["browser"],
page: curStat["page"],
@ -71,7 +71,7 @@ function flatten(stats) {
});
// Use only overall results if not grouped by 'stat'
if (!options.groupBy.includes("stat")) {
rows = rows.filter(function(s) {
rows = rows.filter(function (s) {
return s.stat === "Overall";
});
}
@ -138,7 +138,7 @@ function stat(baseline, current) {
row,
rows = [];
// collect rows and measure column widths
var width = labels.map(function(s) {
var width = labels.map(function (s) {
return s.length;
});
rows.push(labels);
@ -172,7 +172,7 @@ function stat(baseline, current) {
}
// add horizontal line
var hline = width.map(function(w) {
var hline = width.map(function (w) {
return new Array(w + 1).join("-");
});
rows.splice(1, 0, hline);