mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08: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
|
@ -31,6 +31,8 @@ var JpxImage = (function JpxImageClosure() {
|
|||
HL: 1,
|
||||
HH: 2,
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
function JpxImage() {
|
||||
this.failOnCorruptedImage = false;
|
||||
}
|
||||
|
@ -1585,6 +1587,7 @@ var JpxImage = (function JpxImageClosure() {
|
|||
|
||||
// Section B.10.2 Tag trees
|
||||
var TagTree = (function TagTreeClosure() {
|
||||
// eslint-disable-next-line no-shadow
|
||||
function TagTree(width, height) {
|
||||
var levelsLength = log2(Math.max(width, height)) + 1;
|
||||
this.levels = [];
|
||||
|
@ -1646,6 +1649,7 @@ var JpxImage = (function JpxImageClosure() {
|
|||
})();
|
||||
|
||||
var InclusionTree = (function InclusionTreeClosure() {
|
||||
// eslint-disable-next-line no-shadow
|
||||
function InclusionTree(width, height, defaultValue) {
|
||||
var levelsLength = log2(Math.max(width, height)) + 1;
|
||||
this.levels = [];
|
||||
|
@ -1752,6 +1756,7 @@ var JpxImage = (function JpxImageClosure() {
|
|||
8, 0, 8, 8, 8, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8
|
||||
]);
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
function BitModel(width, height, subband, zeroBitPlanes, mb) {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
|
@ -2107,6 +2112,7 @@ var JpxImage = (function JpxImageClosure() {
|
|||
|
||||
// Section F, Discrete wavelet transformation
|
||||
var Transform = (function TransformClosure() {
|
||||
// eslint-disable-next-line no-shadow
|
||||
function Transform() {}
|
||||
|
||||
Transform.prototype.calculate = function transformCalculate(
|
||||
|
@ -2248,6 +2254,7 @@ var JpxImage = (function JpxImageClosure() {
|
|||
|
||||
// Section 3.8.2 Irreversible 9-7 filter
|
||||
var IrreversibleTransform = (function IrreversibleTransformClosure() {
|
||||
// eslint-disable-next-line no-shadow
|
||||
function IrreversibleTransform() {
|
||||
Transform.call(this);
|
||||
}
|
||||
|
@ -2345,6 +2352,7 @@ var JpxImage = (function JpxImageClosure() {
|
|||
|
||||
// Section 3.8.1 Reversible 5-3 filter
|
||||
var ReversibleTransform = (function ReversibleTransformClosure() {
|
||||
// eslint-disable-next-line no-shadow
|
||||
function ReversibleTransform() {
|
||||
Transform.call(this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue