chore: migrate to oxlint and oxfmt

Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-14 14:31:43 +00:00
parent 912ebffc63
commit c379191f80
1480 changed files with 28608 additions and 43547 deletions

View File

@@ -18,9 +18,7 @@ function isBun(): boolean {
function prefersSips(): boolean {
return (
process.env.CLAWDBOT_IMAGE_BACKEND === "sips" ||
(process.env.CLAWDBOT_IMAGE_BACKEND !== "sharp" &&
isBun() &&
process.platform === "darwin")
(process.env.CLAWDBOT_IMAGE_BACKEND !== "sharp" && isBun() && process.platform === "darwin")
);
}
@@ -39,9 +37,7 @@ async function withTempDir<T>(fn: (dir: string) => Promise<T>): Promise<T> {
}
}
async function sipsMetadataFromBuffer(
buffer: Buffer,
): Promise<ImageMetadata | null> {
async function sipsMetadataFromBuffer(buffer: Buffer): Promise<ImageMetadata | null> {
return await withTempDir(async (dir) => {
const input = path.join(dir, "in.img");
await fs.writeFile(input, buffer);
@@ -94,9 +90,7 @@ async function sipsResizeToJpeg(params: {
});
}
export async function getImageMetadata(
buffer: Buffer,
): Promise<ImageMetadata | null> {
export async function getImageMetadata(buffer: Buffer): Promise<ImageMetadata | null> {
if (prefersSips()) {
return await sipsMetadataFromBuffer(buffer).catch(() => null);
}