mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Fix the linting errors, from the Prettier auto-formatting, that ESLint --fix
couldn't handle
This patch makes the follow changes: - Remove no longer necessary inline `// eslint-disable-...` comments. - Fix `// eslint-disable-...` comments that Prettier moved down, thus causing new linting errors. - Concatenate strings which now fit on just one line. - Fix comments that are now too long. - Finally, and most importantly, adjust comments that Prettier moved down, since the new positions often is confusing or outright wrong.
This commit is contained in:
parent
de36b2aaba
commit
a63f7ad486
46 changed files with 179 additions and 219 deletions
|
@ -591,8 +591,7 @@ class PDFDocument {
|
|||
ch = stream.getByte();
|
||||
} while (isSpace(ch));
|
||||
let str = "";
|
||||
while (ch >= 0x20 && ch <= 0x39) {
|
||||
// < '9'
|
||||
while (ch >= /* Space = */ 0x20 && ch <= /* '9' = */ 0x39) {
|
||||
str += String.fromCharCode(ch);
|
||||
ch = stream.getByte();
|
||||
}
|
||||
|
@ -622,8 +621,7 @@ class PDFDocument {
|
|||
const MAX_PDF_VERSION_LENGTH = 12;
|
||||
let version = "",
|
||||
ch;
|
||||
while ((ch = stream.getByte()) > 0x20) {
|
||||
// Space
|
||||
while ((ch = stream.getByte()) > /* Space = */ 0x20) {
|
||||
if (version.length >= MAX_PDF_VERSION_LENGTH) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue