mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 21:01:43 +03:00
chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.
This commit is contained in:
@@ -350,7 +350,7 @@ export async function hasAlphaChannel(buffer: Buffer): Promise<boolean> {
|
||||
// Check if the image has an alpha channel
|
||||
// PNG color types with alpha: 4 (grayscale+alpha), 6 (RGBA)
|
||||
// Sharp reports this via 'channels' (4 = RGBA) or 'hasAlpha'
|
||||
return meta.hasAlpha === true || meta.channels === 4;
|
||||
return meta.hasAlpha || meta.channels === 4;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -58,14 +58,14 @@ describe("media store redirects", () => {
|
||||
res.statusCode = 302;
|
||||
res.headers = { location: "https://example.com/final" };
|
||||
setImmediate(() => {
|
||||
cb(res as unknown as Parameters<typeof cb>[0]);
|
||||
cb(res as unknown);
|
||||
res.end();
|
||||
});
|
||||
} else {
|
||||
res.statusCode = 200;
|
||||
res.headers = { "content-type": "text/plain" };
|
||||
setImmediate(() => {
|
||||
cb(res as unknown as Parameters<typeof cb>[0]);
|
||||
cb(res as unknown);
|
||||
res.write("redirected");
|
||||
res.end();
|
||||
});
|
||||
@@ -98,7 +98,7 @@ describe("media store redirects", () => {
|
||||
res.statusCode = 200;
|
||||
res.headers = {};
|
||||
setImmediate(() => {
|
||||
cb(res as unknown as Parameters<typeof cb>[0]);
|
||||
cb(res as unknown);
|
||||
const zip = new JSZip();
|
||||
zip.file(
|
||||
"[Content_Types].xml",
|
||||
|
||||
Reference in New Issue
Block a user