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:
Jonas Jenwald 2019-12-25 20:03:46 +01:00
parent de36b2aaba
commit a63f7ad486
46 changed files with 179 additions and 219 deletions

View file

@ -381,8 +381,8 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
typeof PDFJSDev !== "undefined" && !PDFJSDev.test("TESTING")
? PDFJSDev.eval("BUNDLE_VERSION")
: null,
// Only send the required properties, and *not* the entire object.
source: {
// Only send the required properties, and *not* the entire object.
data: source.data,
url: source.url,
password: source.password,
@ -1087,8 +1087,8 @@ class PDFPageProxy {
const internalRenderTask = new InternalRenderTask({
callback: complete,
// Only include the required properties, and *not* the entire object.
params: {
// Include the required properties, and *not* the entire object.
canvasContext,
viewport,
transform,
@ -1641,8 +1641,8 @@ const PDFWorker = (function PDFWorkerClosure() {
if (
typeof PDFJSDev !== "undefined" &&
PDFJSDev.test("GENERIC") &&
// eslint-disable-next-line no-undef
isNodeJS &&
// eslint-disable-next-line no-undef
typeof __non_webpack_require__ === "function"
) {
// Since bundlers, such as Webpack, cannot be told to leave `require`