mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Whitelist closure related cases to address the remaining no-shadow
linting errors
Given the way that "classes" were previously implemented in PDF.js, using regular functions and closures, there's a fair number of false positives when the `no-shadow` ESLint rule was enabled. Note that while *some* of these `eslint-disable` statements can be removed if/when the relevant code is converted to proper `class`es, we'll probably never be able to get rid of all of them given our naming/coding conventions (however I don't really see this being a problem).
This commit is contained in:
parent
1d2f787d6a
commit
dcb16af968
32 changed files with 109 additions and 0 deletions
|
@ -565,6 +565,8 @@ function isPDFFunction(v) {
|
|||
|
||||
var PostScriptStack = (function PostScriptStackClosure() {
|
||||
var MAX_STACK_SIZE = 100;
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
function PostScriptStack(initialStack) {
|
||||
this.stack = !initialStack
|
||||
? []
|
||||
|
@ -625,6 +627,7 @@ var PostScriptStack = (function PostScriptStackClosure() {
|
|||
return PostScriptStack;
|
||||
})();
|
||||
var PostScriptEvaluator = (function PostScriptEvaluatorClosure() {
|
||||
// eslint-disable-next-line no-shadow
|
||||
function PostScriptEvaluator(operators) {
|
||||
this.operators = operators;
|
||||
}
|
||||
|
@ -1084,6 +1087,7 @@ var PostScriptCompiler = (function PostScriptCompilerClosure() {
|
|||
return new AstMin(num1, max);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
function PostScriptCompiler() {}
|
||||
PostScriptCompiler.prototype = {
|
||||
compile: function PostScriptCompiler_compile(code, domain, range) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue