mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38: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
|
@ -145,7 +145,7 @@ function toRomanNumerals(number, lowerCase = false) {
|
|||
number %= 10;
|
||||
romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]);
|
||||
// Ones
|
||||
romanBuf.push(ROMAN_NUMBER_MAP[20 + number]);
|
||||
romanBuf.push(ROMAN_NUMBER_MAP[20 + number]); // eslint-disable-line unicorn/no-array-push-push
|
||||
|
||||
const romanStr = romanBuf.join("");
|
||||
return lowerCase ? romanStr.toLowerCase() : romanStr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue