diff --git a/src/display/.eslintrc b/src/.eslintrc similarity index 79% rename from src/display/.eslintrc rename to src/.eslintrc index ab1c5afdf..4a0b538f6 100644 --- a/src/display/.eslintrc +++ b/src/.eslintrc @@ -1,6 +1,6 @@ { "extends": [ - "../../.eslintrc" + "../.eslintrc" ], "rules": { diff --git a/src/core/.eslintrc b/src/core/.eslintrc index c1831d388..cec998b9c 100644 --- a/src/core/.eslintrc +++ b/src/core/.eslintrc @@ -4,7 +4,7 @@ }, "extends": [ - "../../.eslintrc" + "../.eslintrc" ], "env": { diff --git a/src/core/annotation.js b/src/core/annotation.js index 18aa3cdc2..b0736ad69 100644 --- a/src/core/annotation.js +++ b/src/core/annotation.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ import { AnnotationBorderStyleType, diff --git a/src/core/arithmetic_decoder.js b/src/core/arithmetic_decoder.js index 58e49e248..bb481acee 100644 --- a/src/core/arithmetic_decoder.js +++ b/src/core/arithmetic_decoder.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ // Table C-2 const QeTable = [ diff --git a/src/core/bidi.js b/src/core/bidi.js index 131977dd4..370fdbe06 100644 --- a/src/core/bidi.js +++ b/src/core/bidi.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { warn } from "../shared/util.js"; diff --git a/src/core/ccitt_stream.js b/src/core/ccitt_stream.js index bef561e0e..6eab57ae3 100644 --- a/src/core/ccitt_stream.js +++ b/src/core/ccitt_stream.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { Dict, isDict } from "./primitives.js"; import { CCITTFaxDecoder } from "./ccitt.js"; diff --git a/src/core/cff_parser.js b/src/core/cff_parser.js index 8f66d42cd..540972e9e 100644 --- a/src/core/cff_parser.js +++ b/src/core/cff_parser.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { bytesToString, diff --git a/src/core/charsets.js b/src/core/charsets.js index 40825f032..62c135f93 100644 --- a/src/core/charsets.js +++ b/src/core/charsets.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ // prettier-ignore const ISOAdobeCharset = [ diff --git a/src/core/chunked_stream.js b/src/core/chunked_stream.js index a4ba183b5..451984874 100644 --- a/src/core/chunked_stream.js +++ b/src/core/chunked_stream.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ import { arrayByteLength, diff --git a/src/core/cmap.js b/src/core/cmap.js index edc67c3d8..71c4d9fd9 100644 --- a/src/core/cmap.js +++ b/src/core/cmap.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { CMapCompressionType, diff --git a/src/core/core_utils.js b/src/core/core_utils.js index 464442ee3..1939b6263 100644 --- a/src/core/core_utils.js +++ b/src/core/core_utils.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ import { assert, BaseException, warn } from "../shared/util.js"; diff --git a/src/core/crypto.js b/src/core/crypto.js index b8f81a0c6..46d7682ca 100644 --- a/src/core/crypto.js +++ b/src/core/crypto.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { bytesToString, diff --git a/src/core/document.js b/src/core/document.js index 82275b291..51bc738c6 100644 --- a/src/core/document.js +++ b/src/core/document.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ import { assert, diff --git a/src/core/evaluator.js b/src/core/evaluator.js index ee03d436b..1441f542d 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { AbortException, diff --git a/src/core/font_renderer.js b/src/core/font_renderer.js index b09c18a81..7b39a0d70 100644 --- a/src/core/font_renderer.js +++ b/src/core/font_renderer.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { bytesToString, diff --git a/src/core/fonts.js b/src/core/fonts.js index f2b5df5e1..3839a701b 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { assert, diff --git a/src/core/function.js b/src/core/function.js index 0b9a7fad6..3e00cadb9 100644 --- a/src/core/function.js +++ b/src/core/function.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { Dict, isDict, isStream, Ref } from "./primitives.js"; import { diff --git a/src/core/glyphlist.js b/src/core/glyphlist.js index 3e3d576de..2bf4423a8 100644 --- a/src/core/glyphlist.js +++ b/src/core/glyphlist.js @@ -13,6 +13,7 @@ * limitations under the License. */ /* no-babel-preset */ +/* eslint-disable no-var */ var getLookupTableFactory = require("./core_utils.js").getLookupTableFactory; diff --git a/src/core/image.js b/src/core/image.js index e33cbcca0..6aac2e560 100644 --- a/src/core/image.js +++ b/src/core/image.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { assert, FormatError, ImageKind, info, warn } from "../shared/util.js"; import { isName, isStream, Name } from "./primitives.js"; diff --git a/src/core/image_utils.js b/src/core/image_utils.js index 3e1f89998..d1faf37dd 100644 --- a/src/core/image_utils.js +++ b/src/core/image_utils.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ import { assert, info, shadow, unreachable } from "../shared/util.js"; import { RefSetCache } from "./primitives.js"; diff --git a/src/core/jbig2.js b/src/core/jbig2.js index 31e05ab19..db3301960 100644 --- a/src/core/jbig2.js +++ b/src/core/jbig2.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { BaseException, shadow } from "../shared/util.js"; import { log2, readInt8, readUint16, readUint32 } from "./core_utils.js"; diff --git a/src/core/jpg.js b/src/core/jpg.js index c6d0e83fd..c621d794c 100644 --- a/src/core/jpg.js +++ b/src/core/jpg.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { assert, BaseException, warn } from "../shared/util.js"; import { readUint16 } from "./core_utils.js"; diff --git a/src/core/jpx.js b/src/core/jpx.js index 837ebba46..4269338c2 100644 --- a/src/core/jpx.js +++ b/src/core/jpx.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { BaseException, info, warn } from "../shared/util.js"; import { log2, readUint16, readUint32 } from "./core_utils.js"; diff --git a/src/core/metrics.js b/src/core/metrics.js index 6fac14c00..e95d6316a 100644 --- a/src/core/metrics.js +++ b/src/core/metrics.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { getLookupTableFactory } from "./core_utils.js"; diff --git a/src/core/murmurhash3.js b/src/core/murmurhash3.js index cefec5fba..a4dfec3c3 100644 --- a/src/core/murmurhash3.js +++ b/src/core/murmurhash3.js @@ -16,7 +16,6 @@ * Based on https://code.google.com/p/smhasher/wiki/MurmurHash3. * Hashes roughly 100 KB per millisecond on i7 3.4 GHz. */ -/* eslint no-var: error */ import { isArrayBuffer, isString } from "../shared/util.js"; diff --git a/src/core/obj.js b/src/core/obj.js index 0e1ffbcb6..ae281f571 100644 --- a/src/core/obj.js +++ b/src/core/obj.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { assert, diff --git a/src/core/operator_list.js b/src/core/operator_list.js index ca1ff2505..cf8e9c575 100644 --- a/src/core/operator_list.js +++ b/src/core/operator_list.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { assert, ImageKind, OPS, warn } from "../shared/util.js"; diff --git a/src/core/parser.js b/src/core/parser.js index 25ec213f0..6692adbda 100644 --- a/src/core/parser.js +++ b/src/core/parser.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ import { Ascii85Stream, diff --git a/src/core/pattern.js b/src/core/pattern.js index c3daefb72..34f0ab138 100644 --- a/src/core/pattern.js +++ b/src/core/pattern.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { assert, diff --git a/src/core/primitives.js b/src/core/primitives.js index a1e83b165..a6083db99 100644 --- a/src/core/primitives.js +++ b/src/core/primitives.js @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* uses XRef */ +/* eslint-disable no-var */ import { assert, unreachable } from "../shared/util.js"; diff --git a/src/core/ps_parser.js b/src/core/ps_parser.js index fc97b057f..23ecf743b 100644 --- a/src/core/ps_parser.js +++ b/src/core/ps_parser.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ import { FormatError, shadow } from "../shared/util.js"; import { EOF } from "./primitives.js"; diff --git a/src/core/standard_fonts.js b/src/core/standard_fonts.js index 5d6469e1d..1bf7b53ef 100644 --- a/src/core/standard_fonts.js +++ b/src/core/standard_fonts.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ import { getLookupTableFactory } from "./core_utils.js"; diff --git a/src/core/stream.js b/src/core/stream.js index 03c827d82..9e84fcc94 100644 --- a/src/core/stream.js +++ b/src/core/stream.js @@ -18,6 +18,7 @@ * of XPDF's implementation, made available under the Apache 2.0 open source * license. */ +/* eslint-disable no-var */ import { FormatError, stringToBytes, unreachable } from "../shared/util.js"; import { isDict } from "./primitives.js"; diff --git a/src/core/type1_parser.js b/src/core/type1_parser.js index 0083b541b..4f1acf017 100644 --- a/src/core/type1_parser.js +++ b/src/core/type1_parser.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { getEncoding } from "./encodings.js"; import { isWhiteSpace } from "./core_utils.js"; diff --git a/src/core/unicode.js b/src/core/unicode.js index 57b8ed676..118a713b1 100644 --- a/src/core/unicode.js +++ b/src/core/unicode.js @@ -13,6 +13,7 @@ * limitations under the License. */ /* no-babel-preset */ +/* eslint-disable no-var */ var getLookupTableFactory = require("./core_utils.js").getLookupTableFactory; diff --git a/src/core/worker.js b/src/core/worker.js index bd6257de0..673b3f45c 100644 --- a/src/core/worker.js +++ b/src/core/worker.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint-disable no-var */ import { AbortException, diff --git a/src/core/worker_stream.js b/src/core/worker_stream.js index 7e1c2f24b..204c08f80 100644 --- a/src/core/worker_stream.js +++ b/src/core/worker_stream.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ import { assert } from "../shared/util.js"; diff --git a/src/core/writer.js b/src/core/writer.js index 3499bd961..16c58fe97 100644 --- a/src/core/writer.js +++ b/src/core/writer.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ import { bytesToString, escapeString, warn } from "../shared/util.js"; import { Dict, isDict, isName, isRef, isStream, Name } from "./primitives.js"; diff --git a/src/shared/.eslintrc b/src/shared/.eslintrc deleted file mode 100644 index ab1c5afdf..000000000 --- a/src/shared/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "../../.eslintrc" - ], - - "rules": { - // ECMAScript 6 - "no-var": "error", - }, -}