mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Enable the arrow-body-style
ESLint rule
This manually ignores some cases where the resulting auto-formatting would not, as far as I'm concerned, constitute a readability improvement or where we'd just end up with more overall indentation. Please see https://eslint.org/docs/latest/rules/arrow-body-style
This commit is contained in:
parent
998184a00e
commit
f9a384d711
20 changed files with 78 additions and 82 deletions
|
@ -129,6 +129,7 @@ class PDFDocumentProperties {
|
|||
this.#parseFileSize(contentLength),
|
||||
this.#parseDate(info.CreationDate),
|
||||
this.#parseDate(info.ModDate),
|
||||
// eslint-disable-next-line arrow-body-style
|
||||
this.pdfDocument.getPage(currentPageNumber).then(pdfPage => {
|
||||
return this.#parsePageSize(getPageSizeInches(pdfPage), pagesRotation);
|
||||
}),
|
||||
|
|
|
@ -842,12 +842,11 @@ class PDFFindController {
|
|||
const extractTextCapability = new PromiseCapability();
|
||||
this._extractTextPromises[i] = extractTextCapability.promise;
|
||||
|
||||
// eslint-disable-next-line arrow-body-style
|
||||
promise = promise.then(() => {
|
||||
return this._pdfDocument
|
||||
.getPage(i + 1)
|
||||
.then(pdfPage => {
|
||||
return pdfPage.getTextContent(textOptions);
|
||||
})
|
||||
.then(pdfPage => pdfPage.getTextContent(textOptions))
|
||||
.then(
|
||||
textContent => {
|
||||
const strBuf = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue