mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Remove some, with Prettier 2.3.0
, unnecessary // prettier-ignore
comments
To get the maximum benefit from something like Prettier, you obviously don't want to disable the automatic formatting unless absolutely necessary. When we added Prettier there were a number of cases, mostly involving larger Arrays, which required disabling of the automatic formatting for overall readability and/or to not break inline comments. With changes in Prettier version `2.3.0`, see [the release notes](https://prettier.io/blog/2021/05/09/2.3.0.html#concise-formatting-of-number-only-arrays-10106httpsgithubcomprettierprettierpull10106-10160httpsgithubcomprettierprettierpull10160-by-thorn0httpsgithubcomthorn0), there's now better formatting support for Arrays containing only numbers. Hence we can now remove a number of `// prettier-ignore` comments, and thus get the benefit of automatic formatting in (slightly) more of the code-base.
This commit is contained in:
parent
faf6b10939
commit
1a8d05fdcf
12 changed files with 212 additions and 270 deletions
|
@ -227,15 +227,15 @@ class CachedCanvases {
|
|||
|
||||
function compileType3Glyph(imgData) {
|
||||
const POINT_TO_PROCESS_LIMIT = 1000;
|
||||
const POINT_TYPES = new Uint8Array([
|
||||
0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0,
|
||||
]);
|
||||
|
||||
const width = imgData.width,
|
||||
height = imgData.height,
|
||||
width1 = width + 1;
|
||||
let i, ii, j, j0;
|
||||
const points = new Uint8Array(width1 * (height + 1));
|
||||
// prettier-ignore
|
||||
const POINT_TYPES =
|
||||
new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);
|
||||
|
||||
// decodes bit-packed mask data
|
||||
const lineSize = (width + 7) & ~7,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue