diff --git a/src/app/components/message/content/PollContent.tsx b/src/app/components/message/content/PollContent.tsx index 3d4eceb44..66f3cc538 100644 --- a/src/app/components/message/content/PollContent.tsx +++ b/src/app/components/message/content/PollContent.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import React, { KeyboardEvent, useCallback, useEffect, useMemo, useState } from 'react'; import { Box, Chip, color, config, Icon, Icons, Text, toRem } from 'folds'; import { RelationsEvent } from 'matrix-js-sdk/lib/models/relations'; diff --git a/src/app/features/common-settings/developer-tools/DevelopTools.tsx b/src/app/features/common-settings/developer-tools/DevelopTools.tsx index 9ff46a9ba..0273d87c9 100644 --- a/src/app/features/common-settings/developer-tools/DevelopTools.tsx +++ b/src/app/features/common-settings/developer-tools/DevelopTools.tsx @@ -58,7 +58,6 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) { const submitAccountData: AccountDataSubmitCallback = useCallback( async (type, content) => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any await mx.setRoomAccountData(room.roomId, type as any, content); }, [mx, room.roomId], diff --git a/src/app/features/common-settings/general/RoomQuality.tsx b/src/app/features/common-settings/general/RoomQuality.tsx index 292d4a148..1382f81fb 100644 --- a/src/app/features/common-settings/general/RoomQuality.tsx +++ b/src/app/features/common-settings/general/RoomQuality.tsx @@ -55,7 +55,6 @@ export function RoomQuality({ permissions }: RoomQualityProps) { const [submitState, submit] = useAsyncCallback( useCallback( async (next: RoomQualityContent) => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any await sendStateEvent(mx, room.roomId, StateEvent.LotusRoomQuality, next); }, [mx, room.roomId], diff --git a/src/app/features/common-settings/general/RoomRetention.tsx b/src/app/features/common-settings/general/RoomRetention.tsx index 0f78f77c2..dee183357 100644 --- a/src/app/features/common-settings/general/RoomRetention.tsx +++ b/src/app/features/common-settings/general/RoomRetention.tsx @@ -31,7 +31,6 @@ export function RoomRetention({ permissions }: RoomRetentionProps) { const content: RetentionContent = ms > 0 ? { max_lifetime: ms } : {}; // Lotus custom-state convention: cast the type key (RoomRetention isn't a // typed key in the SDK's StateEvents map). - // eslint-disable-next-line @typescript-eslint/no-explicit-any await sendStateEvent(mx, room.roomId, StateEvent.RoomRetention, content); }, [mx, room.roomId], diff --git a/src/app/features/message-search/useLocalMessageSearch.ts b/src/app/features/message-search/useLocalMessageSearch.ts index e0a9799e1..8bc55e5af 100644 --- a/src/app/features/message-search/useLocalMessageSearch.ts +++ b/src/app/features/message-search/useLocalMessageSearch.ts @@ -46,7 +46,6 @@ const extractText = (event: MatrixEvent): ExtractedText | null => { const content = event.getContent(); if (POLL_START_TYPES.includes(evType)) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const poll = (content['m.poll'] ?? content['org.matrix.msc3381.poll.start']) as any; if (!poll) return null; const qBody = @@ -57,7 +56,6 @@ const extractText = (event: MatrixEvent): ExtractedText | null => { .map( (a) => ((a['m.text'] as Array<{ body: string }> | undefined)?.[0]?.body ?? - // eslint-disable-next-line @typescript-eslint/no-explicit-any (a['org.matrix.msc3381.poll.answer'] as any)?.body ?? '') as string, ) @@ -104,7 +102,6 @@ const rowToResultItem = (row: SearchCacheRow): ResultItem => { }; return { rank: 0, - // eslint-disable-next-line @typescript-eslint/no-explicit-any event: syntheticEvent as any, context: { events_before: [], events_after: [], profile_info: {} }, }; @@ -227,7 +224,6 @@ export const useLocalMessageSearch = () => { }; memoryItems.push({ rank: 0, - // eslint-disable-next-line @typescript-eslint/no-explicit-any event: syntheticEvent as any, context: { events_before: [], events_after: [], profile_info: {} }, }); diff --git a/src/app/features/message-search/useMessageSearch.ts b/src/app/features/message-search/useMessageSearch.ts index 7e7e0644c..282eac5d5 100644 --- a/src/app/features/message-search/useMessageSearch.ts +++ b/src/app/features/message-search/useMessageSearch.ts @@ -146,7 +146,6 @@ export const useMessageSearch = (params: MessageSearchParams) => { ...(fromTs !== undefined && { from_ts: fromTs }), ...(toTs !== undefined && { to_ts: toTs }), ...(containsUrl !== undefined && { contains_url: containsUrl }), - // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any, include_state: false, order_by: order as SearchOrderBy.Recent, diff --git a/src/app/features/room/message/ForwardMessageDialog.tsx b/src/app/features/room/message/ForwardMessageDialog.tsx index 5c0063aee..7f720fc14 100644 --- a/src/app/features/room/message/ForwardMessageDialog.tsx +++ b/src/app/features/room/message/ForwardMessageDialog.tsx @@ -318,7 +318,6 @@ export function ForwardMessageDialog({ mEvent, onClose }: Props) { const results = await Promise.allSettled( ids.map((id) => { // threadId-aware overload (P3-8): explicit null = send to the main timeline. - // eslint-disable-next-line @typescript-eslint/no-explicit-any const sendForward = () => mx.sendEvent(id, null, mEvent.getType() as any, fwdContent); // Send the optional comment first so it reads as a note above the // forwarded content. The room counts as failed if either send rejects. @@ -327,7 +326,6 @@ export function ForwardMessageDialog({ mEvent, onClose }: Props) { const needsComment = commentBody && !commentSentRef.current.has(id); const step = needsComment ? mx - // eslint-disable-next-line @typescript-eslint/no-explicit-any .sendMessage(id, null, { msgtype: MsgType.Text, body: commentBody } as any) .then(() => { commentSentRef.current.add(id); diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx index 7bfe2d761..7d8b6d826 100644 --- a/src/app/features/room/message/Message.tsx +++ b/src/app/features/room/message/Message.tsx @@ -1390,7 +1390,6 @@ export const Message = React.memo( after={} radii="300" onClick={() => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any (mx as any).resendEvent(mEvent, room); closeMenu(); }} @@ -1409,7 +1408,6 @@ export const Message = React.memo( after={} radii="300" onClick={() => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any (mx as any).cancelPendingEvent(mEvent); closeMenu(); }} diff --git a/src/app/features/room/message/MessageEditor.tsx b/src/app/features/room/message/MessageEditor.tsx index 45177867e..53c0eed59 100644 --- a/src/app/features/room/message/MessageEditor.tsx +++ b/src/app/features/room/message/MessageEditor.tsx @@ -187,7 +187,6 @@ export const MessageEditor = as<'div', MessageEditorProps>( rel_type: RelationType.Replace, }, }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any return mx.sendMessage(roomId, content as any); } @@ -236,7 +235,6 @@ export const MessageEditor = as<'div', MessageEditorProps>( }, }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any return mx.sendMessage(roomId, content as any); }, [ mx, diff --git a/src/app/features/room/thread/ThreadTimeline.tsx b/src/app/features/room/thread/ThreadTimeline.tsx index e684f0a44..60c6fbc5d 100644 --- a/src/app/features/room/thread/ThreadTimeline.tsx +++ b/src/app/features/room/thread/ThreadTimeline.tsx @@ -564,7 +564,6 @@ export function ThreadTimeline({ room, thread, editor }: ThreadTimelineProps) { mx.sendEvent( room.roomId, thread.id, - // eslint-disable-next-line @typescript-eslint/no-explicit-any MessageEvent.Reaction as any, getReactionContent(targetEventId, key, rShortcode), ); diff --git a/src/app/features/room/widgets/WidgetsPanel.tsx b/src/app/features/room/widgets/WidgetsPanel.tsx index c93a1b60e..b80fabaf9 100644 --- a/src/app/features/room/widgets/WidgetsPanel.tsx +++ b/src/app/features/room/widgets/WidgetsPanel.tsx @@ -84,7 +84,6 @@ export function WidgetsPanel({ room, requestClose }: WidgetsPanelProps) { data: {}, }; try { - // eslint-disable-next-line @typescript-eslint/no-explicit-any await sendStateEvent(mx, room.roomId, StateEvent.Widget, content, id); setAdding(false); } catch (e) { @@ -96,7 +95,6 @@ export function WidgetsPanel({ room, requestClose }: WidgetsPanelProps) { const handleRemove = (id: string) => { if (viewingId === id) setViewingId(null); - // eslint-disable-next-line @typescript-eslint/no-explicit-any sendStateEvent(mx, room.roomId, StateEvent.Widget, {}, id).catch(() => undefined); }; diff --git a/src/app/hooks/useRoomMeta.ts b/src/app/hooks/useRoomMeta.ts index d3fecd61b..e163fafcd 100644 --- a/src/app/hooks/useRoomMeta.ts +++ b/src/app/hooks/useRoomMeta.ts @@ -48,7 +48,6 @@ export function getLocalRoomNamesContent( raw && typeof raw === 'object' && 'rooms' in raw && - // eslint-disable-next-line @typescript-eslint/no-explicit-any typeof (raw as any).rooms === 'object' ) { return raw as LocalRoomNamesContent; diff --git a/src/app/state/room/markedUnread.ts b/src/app/state/room/markedUnread.ts index da3a89873..9b8c27e94 100644 --- a/src/app/state/room/markedUnread.ts +++ b/src/app/state/room/markedUnread.ts @@ -25,10 +25,8 @@ export const setMarkedUnread = ( unread: boolean, ): Promise => Promise.all([ - // eslint-disable-next-line @typescript-eslint/no-explicit-any mx.setRoomAccountData(roomId, AccountDataEvent.MarkedUnread as any, { unread }), // Best-effort mirror for older servers; never fail the primary write on it. - // eslint-disable-next-line @typescript-eslint/no-explicit-any mx.setRoomAccountData(roomId, UNSTABLE_MARKED_UNREAD as any, { unread }).catch(() => undefined), ]); diff --git a/src/app/utils/accountData.ts b/src/app/utils/accountData.ts index ce0feb310..aa86af4cf 100644 --- a/src/app/utils/accountData.ts +++ b/src/app/utils/accountData.ts @@ -13,7 +13,6 @@ export function getAccountData( mx: MatrixClient, eventType: AccountDataEvent | string, ): T | undefined { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const event = (mx as any).getAccountData(eventType) as MatrixEvent | undefined; return event?.getContent() as T | undefined; } @@ -23,6 +22,5 @@ export function setAccountData( eventType: AccountDataEvent | string, content: T, ): Promise { - // eslint-disable-next-line @typescript-eslint/no-explicit-any return (mx as any).setAccountData(eventType, content); } diff --git a/src/app/utils/denoisePipeline.ts b/src/app/utils/denoisePipeline.ts index ea9129d2f..4a7b41dc9 100644 --- a/src/app/utils/denoisePipeline.ts +++ b/src/app/utils/denoisePipeline.ts @@ -70,7 +70,6 @@ export async function buildModelNode( model: DenoiseModelId, ): Promise { if (model === 'dtln') { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const mod: any = await import(/* @vite-ignore */ `${BASE}workadventure/audio-worklet.js`); const handle = await mod.createNoiseSuppressionAudioWorklet(ctx, { bypassUntilReady: true }); return { node: handle.node, dispose: () => handle.dispose() }; @@ -81,7 +80,6 @@ export async function buildModelNode( // deepfilternet/v2/... Override its cdnUrl to our absolute base so nothing // hits the upstream CDN. DeepFilterNet3Core builds the worklet node directly. const dfnBase = new URL(`${BASE}deepfilternet`, window.location.href).href; - // eslint-disable-next-line @typescript-eslint/no-explicit-any const mod: any = await import(/* @vite-ignore */ `${BASE}deepfilternet/index.esm.js`); const core = new mod.DeepFilterNet3Core({ sampleRate: sampleRateFor(model), diff --git a/src/app/utils/keyboard.test.ts b/src/app/utils/keyboard.test.ts index 8e16059a2..7fef787ef 100644 --- a/src/app/utils/keyboard.test.ts +++ b/src/app/utils/keyboard.test.ts @@ -44,12 +44,10 @@ test('onTabPress fires only on Tab', () => { test('preventScrollWithArrowKey prevents default only on arrows', () => { const up = evt('ArrowUp', 38); - // eslint-disable-next-line @typescript-eslint/no-explicit-any preventScrollWithArrowKey(up as any); assert.equal(up.prevented, true); const a = evt('a', 65); - // eslint-disable-next-line @typescript-eslint/no-explicit-any preventScrollWithArrowKey(a as any); assert.equal(a.prevented, false); }); @@ -95,14 +93,12 @@ test('stopPropagation: stops unless an editable element is focused', () => { // nothing focused → stops, returns true withActive(null); let k = makeKeyEvt(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.equal(stopPropagation(k.ev as any), true); assert.equal(k.wasStopped(), true); // input focused → does not stop, returns false withActive({ nodeName: 'INPUT', getAttribute: () => null }); k = makeKeyEvt(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.equal(stopPropagation(k.ev as any), false); assert.equal(k.wasStopped(), false); @@ -112,6 +108,5 @@ test('stopPropagation: stops unless an editable element is focused', () => { getAttribute: (a: string) => (a === 'contenteditable' ? 'true' : null), }); k = makeKeyEvt(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.equal(stopPropagation(k.ev as any), false); }); diff --git a/src/app/utils/matrix.declineInvite.test.ts b/src/app/utils/matrix.declineInvite.test.ts index 6a397213f..70dd81e87 100644 --- a/src/app/utils/matrix.declineInvite.test.ts +++ b/src/app/utils/matrix.declineInvite.test.ts @@ -22,7 +22,6 @@ const makeMx = ( if (opts.forgetRejects) throw new Error('forget failed'); return {}; }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; return { mx, calls }; }; diff --git a/src/app/utils/poll.ts b/src/app/utils/poll.ts index 9e9e9442a..3a794a729 100644 --- a/src/app/utils/poll.ts +++ b/src/app/utils/poll.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { M_POLL_KIND_DISCLOSED } from 'matrix-js-sdk'; // Pure helpers for poll display. matrix-js-sdk 41.7.0's PollStartEvent / diff --git a/src/app/utils/room.ts b/src/app/utils/room.ts index 535c2e3f7..052ae3151 100644 --- a/src/app/utils/room.ts +++ b/src/app/utils/room.ts @@ -58,7 +58,6 @@ export function sendStateEvent( content: T, stateKey = '', ): Promise { - // eslint-disable-next-line @typescript-eslint/no-explicit-any return mx.sendStateEvent(roomId, eventType as any, content, stateKey); } diff --git a/src/lotus-terminal.css.ts b/src/lotus-terminal.css.ts index acc5cd4a7..160a3fb4a 100644 --- a/src/lotus-terminal.css.ts +++ b/src/lotus-terminal.css.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { globalStyle, keyframes, style } from '@vanilla-extract/css'; const glitch1 = keyframes({