mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Enable the unicorn/no-array-push-push
ESLint plugin rule
There's generally speaking no need to use multiple consecutive `Array.prototype.push()` calls, since that method accepts multiple arguments, and this ESLint rule helps enforce that pattern. Please see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-push-push.md for additional information.
This commit is contained in:
parent
3538ef017f
commit
ec3bcadf56
9 changed files with 80 additions and 84 deletions
|
@ -943,18 +943,20 @@ function decodePatternDictionary(
|
|||
y: 0,
|
||||
});
|
||||
if (template === 0) {
|
||||
at.push({
|
||||
x: -3,
|
||||
y: -1,
|
||||
});
|
||||
at.push({
|
||||
x: 2,
|
||||
y: -2,
|
||||
});
|
||||
at.push({
|
||||
x: -2,
|
||||
y: -2,
|
||||
});
|
||||
at.push(
|
||||
{
|
||||
x: -3,
|
||||
y: -1,
|
||||
},
|
||||
{
|
||||
x: 2,
|
||||
y: -2,
|
||||
},
|
||||
{
|
||||
x: -2,
|
||||
y: -2,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
const collectiveWidth = (maxPatternIndex + 1) * patternWidth;
|
||||
|
@ -1034,18 +1036,20 @@ function decodeHalftoneRegion(
|
|||
y: -1,
|
||||
});
|
||||
if (template === 0) {
|
||||
at.push({
|
||||
x: -3,
|
||||
y: -1,
|
||||
});
|
||||
at.push({
|
||||
x: 2,
|
||||
y: -2,
|
||||
});
|
||||
at.push({
|
||||
x: -2,
|
||||
y: -2,
|
||||
});
|
||||
at.push(
|
||||
{
|
||||
x: -3,
|
||||
y: -1,
|
||||
},
|
||||
{
|
||||
x: 2,
|
||||
y: -2,
|
||||
},
|
||||
{
|
||||
x: -2,
|
||||
y: -2,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
// Annex C. Gray-scale Image Decoding Procedure.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue