mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-24 09:08:07 +02:00
Enable the unicorn/prefer-at
ESLint plugin rule (PR 15008 follow-up)
Please find additional information here: - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md
This commit is contained in:
parent
5d88233fbb
commit
9ac4536693
32 changed files with 56 additions and 46 deletions
|
@ -229,7 +229,7 @@ window.onload = function () {
|
|||
/^ {2}IMAGE[^:]*\((\d+\.?\d*)x(\d+\.?\d*)x(\d+\.?\d*)\): (.*)$/
|
||||
);
|
||||
if (match) {
|
||||
const item = gTestItems[gTestItems.length - 1];
|
||||
const item = gTestItems.at(-1);
|
||||
item.images.push({
|
||||
width: parseFloat(match[1]),
|
||||
height: parseFloat(match[2]),
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* eslint-disable no-var */
|
||||
/* eslint-disable no-var, unicorn/prefer-at */
|
||||
|
||||
"use strict";
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ describe("ui_utils", function () {
|
|||
ids.add(view.id);
|
||||
}
|
||||
}
|
||||
return { first: views[0], last: views[views.length - 1], views, ids };
|
||||
return { first: views[0], last: views.at(-1), views, ids };
|
||||
}
|
||||
|
||||
// This function takes a fixed layout of pages and compares the system under
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue