chore(lint): burn down remaining warnings to zero

This commit is contained in:
William Valentin
2026-02-15 23:14:21 -08:00
parent 49b752e8b0
commit 948d4ac6d8
67 changed files with 235 additions and 256 deletions
+2 -2
View File
@@ -87,7 +87,7 @@ describe('MatrixAdapter', () => {
it('send delivers a message via PUT', async () => {
let syncStarted = false;
mockFetch.mockImplementation(async (url: string, init?: any) => {
mockFetch.mockImplementation(async (url: string, init?: RequestInit) => {
if (url.endsWith('/_matrix/client/v3/account/whoami')) {
return jsonResponse({ user_id: '@flynn:example.org' });
}
@@ -99,7 +99,7 @@ describe('MatrixAdapter', () => {
return new Promise<Response>(() => {});
}
if (init?.method === 'PUT' && url.includes('/send/m.room.message/')) {
const body = JSON.parse(init.body);
const body = JSON.parse(String(init?.body ?? '{}'));
expect(body.msgtype).toBe('m.text');
expect(body.body).toBe('Hello there');
return jsonResponse({ event_id: '$sent1' });
+4 -2
View File
@@ -201,8 +201,10 @@ export class MatrixAdapter implements ChannelAdapter {
return;
}
const err = error as any;
if (err && typeof err === 'object' && err.name === 'AbortError') {
const errName = error && typeof error === 'object' && 'name' in error
? String((error as { name?: unknown }).name)
: '';
if (errName === 'AbortError') {
return;
}