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:
commit
fe5967c84e
16 changed files with 450 additions and 387 deletions
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue