1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-23 08:38:06 +02:00

Merge pull request #19029 from nicolo-ribaudo/eslint-flat-config

Migrate to ESLint flat config
This commit is contained in:
Jonas Jenwald 2024-11-12 16:22:54 +01:00 committed by GitHub
commit fe5967c84e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 450 additions and 387 deletions

View file

@ -48,11 +48,9 @@ class ImageResizer {
return shadow(
this,
"canUseImageDecoder",
// eslint-disable-next-line no-undef
this.#isChrome || typeof ImageDecoder === "undefined"
? Promise.resolve(false)
: // eslint-disable-next-line no-undef
ImageDecoder.isTypeSupported("image/bmp")
: ImageDecoder.isTypeSupported("image/bmp")
);
}
@ -185,7 +183,6 @@ class ImageResizer {
let decoder, imagePromise;
if (await ImageResizer.canUseImageDecoder) {
// eslint-disable-next-line no-undef
decoder = new ImageDecoder({
data,
type: "image/bmp",

View file

@ -36,11 +36,9 @@ class JpegStream extends DecodeStream {
return shadow(
this,
"canUseImageDecoder",
// eslint-disable-next-line no-undef
typeof ImageDecoder === "undefined"
? Promise.resolve(false)
: // eslint-disable-next-line no-undef
ImageDecoder.isTypeSupported("image/jpeg")
: ImageDecoder.isTypeSupported("image/jpeg")
);
}
@ -163,7 +161,6 @@ class JpegStream extends DecodeStream {
if (!JpegImage.canUseImageDecoder(data, jpegOptions.colorTransform)) {
return null;
}
// eslint-disable-next-line no-undef
decoder = new ImageDecoder({
data,
type: "image/jpeg",