1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Enable the ESLint prefer-spread rule

Note that in a couple of spots the argument could be `undefined` and there we simply disable the rule instead.

Please refer to https://eslint.org/docs/latest/rules/prefer-spread
This commit is contained in:
Jonas Jenwald 2022-08-06 10:16:09 +02:00
parent d6d4653d80
commit f6db7975c5
9 changed files with 37 additions and 34 deletions

View file

@ -104,10 +104,10 @@ async function initializePDFJS(callback) {
return document.body;
},
createElement() {
return document.createElement.apply(document, arguments);
return document.createElement(...arguments);
},
createTextNode() {
return document.createTextNode.apply(document, arguments);
return document.createTextNode(...arguments);
},
timer: new jasmine.Timer(),
});

View file

@ -167,10 +167,10 @@ async function initializePDFJS(callback) {
return document.body;
},
createElement() {
return document.createElement.apply(document, arguments);
return document.createElement(...arguments);
},
createTextNode() {
return document.createTextNode.apply(document, arguments);
return document.createTextNode(...arguments);
},
timer: new jasmine.Timer(),
});