mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +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:
parent
d6d4653d80
commit
f6db7975c5
9 changed files with 37 additions and 34 deletions
|
@ -1478,6 +1478,7 @@ function processSegment(segment, visitor) {
|
|||
}
|
||||
const callbackName = "on" + header.typeName;
|
||||
if (callbackName in visitor) {
|
||||
// eslint-disable-next-line prefer-spread
|
||||
visitor[callbackName].apply(visitor, args);
|
||||
}
|
||||
}
|
||||
|
@ -1636,7 +1637,7 @@ class SimpleSegmentVisitor {
|
|||
}
|
||||
|
||||
onImmediateLosslessGenericRegion() {
|
||||
this.onImmediateGenericRegion.apply(this, arguments);
|
||||
this.onImmediateGenericRegion(...arguments);
|
||||
}
|
||||
|
||||
onSymbolDictionary(
|
||||
|
@ -1743,7 +1744,7 @@ class SimpleSegmentVisitor {
|
|||
}
|
||||
|
||||
onImmediateLosslessTextRegion() {
|
||||
this.onImmediateTextRegion.apply(this, arguments);
|
||||
this.onImmediateTextRegion(...arguments);
|
||||
}
|
||||
|
||||
onPatternDictionary(dictionary, currentSegment, data, start, end) {
|
||||
|
@ -1788,7 +1789,7 @@ class SimpleSegmentVisitor {
|
|||
}
|
||||
|
||||
onImmediateLosslessHalftoneRegion() {
|
||||
this.onImmediateHalftoneRegion.apply(this, arguments);
|
||||
this.onImmediateHalftoneRegion(...arguments);
|
||||
}
|
||||
|
||||
onTables(currentSegment, data, start, end) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue