mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Enable the ESLint prefer-const
rule globally (PR 11450 follow-up)
Please find additional details about the ESLint rule at https://eslint.org/docs/rules/prefer-const With the recent introduction of Prettier this sort of mass enabling of ESLint rules becomes a lot easier, since the code will be automatically reformatted as necessary to account for e.g. changed line lengths. Note that this patch is generated automatically, by using the ESLint `--fix` argument, and will thus require some additional clean-up (which is done separately).
This commit is contained in:
parent
d2d9441373
commit
9e262ae7fa
54 changed files with 676 additions and 661 deletions
|
@ -50,13 +50,13 @@ const TEST_PDFS_PATH = {
|
|||
};
|
||||
|
||||
function buildGetDocumentParams(filename, options) {
|
||||
let params = Object.create(null);
|
||||
const params = Object.create(null);
|
||||
if (isNodeJS) {
|
||||
params.url = TEST_PDFS_PATH.node + filename;
|
||||
} else {
|
||||
params.url = new URL(TEST_PDFS_PATH.dom + filename, window.location).href;
|
||||
}
|
||||
for (let option in options) {
|
||||
for (const option in options) {
|
||||
params[option] = options[option];
|
||||
}
|
||||
return params;
|
||||
|
@ -137,8 +137,8 @@ class XRefMock {
|
|||
constructor(array) {
|
||||
this._map = Object.create(null);
|
||||
|
||||
for (let key in array) {
|
||||
let obj = array[key];
|
||||
for (const key in array) {
|
||||
const obj = array[key];
|
||||
this._map[obj.ref.toString()] = obj.data;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue