[Glitch] Enable ESLlint no-case-declarations

Port f91f077985 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Nick Schonning
2024-10-01 12:26:30 -04:00
committed by Claire
parent af39ac6edc
commit 61a0c58dee
6 changed files with 16 additions and 8 deletions

View File

@@ -17,7 +17,7 @@ const dropOrientationIfNeeded = (orientation) => new Promise(resolve => {
case false:
resolve(orientation);
break;
default:
default: {
// black 2x1 JPEG, with the following meta information set:
// - EXIF Orientation: 6 (Rotated 90° CCW)
const testImageURL =
@@ -39,6 +39,7 @@ const dropOrientationIfNeeded = (orientation) => new Promise(resolve => {
};
img.src = testImageURL;
}
}
});
// Some browsers don't allow reading from a canvas and instead return all-white
@@ -52,7 +53,7 @@ const checkCanvasReliability = () => new Promise((resolve, reject) => {
case false:
resolve();
break;
default:
default: {
// 2×2 GIF with white, red, green and blue pixels
const testImageURL =
'data:image/gif;base64,R0lGODdhAgACAKEDAAAA//8AAAD/AP///ywAAAAAAgACAAACA1wEBQA7';
@@ -78,6 +79,7 @@ const checkCanvasReliability = () => new Promise((resolve, reject) => {
};
img.src = testImageURL;
}
}
});
const getImageUrl = inputFile => new Promise((resolve, reject) => {