mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +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
|
@ -123,10 +123,9 @@ describe("CFFParser", function () {
|
|||
"ignores reserved commands in parseDict, and refuses to add privateDict " +
|
||||
"keys with invalid values (bug 1308536)",
|
||||
function () {
|
||||
// prettier-ignore
|
||||
const bytes = new Uint8Array([
|
||||
64, 39, 31, 30, 252, 114, 137, 115, 79, 30, 197, 119, 2, 99, 127, 6
|
||||
]);
|
||||
64, 39, 31, 30, 252, 114, 137, 115, 79, 30, 197, 119, 2, 99, 127, 6,
|
||||
]);
|
||||
parser.bytes = bytes;
|
||||
const topDict = cff.topDict;
|
||||
topDict.setByName("Private", [bytes.length, 0]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue