mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38: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
|
@ -24,7 +24,7 @@ import {
|
|||
import { isDict, isStream } from "./primitives.js";
|
||||
import { PostScriptLexer, PostScriptParser } from "./ps_parser.js";
|
||||
|
||||
let IsEvalSupportedCached = {
|
||||
const IsEvalSupportedCached = {
|
||||
get value() {
|
||||
return shadow(this, "value", isEvalSupported());
|
||||
},
|
||||
|
@ -150,7 +150,7 @@ var PDFFunction = (function PDFFunctionClosure() {
|
|||
},
|
||||
|
||||
parse({ xref, isEvalSupported, fn }) {
|
||||
let IR = this.getIR({ xref, isEvalSupported, fn });
|
||||
const IR = this.getIR({ xref, isEvalSupported, fn });
|
||||
return this.fromIR({ xref, isEvalSupported, IR });
|
||||
},
|
||||
|
||||
|
@ -480,7 +480,7 @@ var PDFFunction = (function PDFFunctionClosure() {
|
|||
var code = IR[3];
|
||||
|
||||
if (isEvalSupported && IsEvalSupportedCached.value) {
|
||||
let compiled = new PostScriptCompiler().compile(code, domain, range);
|
||||
const compiled = new PostScriptCompiler().compile(code, domain, range);
|
||||
if (compiled) {
|
||||
// Compiled function consists of simple expressions such as addition,
|
||||
// subtraction, Math.max, and also contains 'var' and 'return'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue