diff --git a/src/app/components/url-preview/UrlPreviewCard.tsx b/src/app/components/url-preview/UrlPreviewCard.tsx index b2b32e53..01ad9fab 100644 --- a/src/app/components/url-preview/UrlPreviewCard.tsx +++ b/src/app/components/url-preview/UrlPreviewCard.tsx @@ -57,11 +57,9 @@ export const UrlPreviewCard = as<'div', { url: string; ts: number }>( // - Network errors: connectivity issues if (error?.httpStatus === 502 || error?.httpStatus === 503) { // Server's URL preview backend is down - this is a server-side issue - // eslint-disable-next-line no-console console.warn('[UrlPreview] Server URL preview service unavailable (502/503):', url); } else if (error?.httpStatus === 404) { // Server doesn't support URL previews - // eslint-disable-next-line no-console console.info('[UrlPreview] Server does not support URL previews:', url); } }); diff --git a/src/app/features/call/CallOverlay.tsx b/src/app/features/call/CallOverlay.tsx index ecbc0868..3ad03334 100644 --- a/src/app/features/call/CallOverlay.tsx +++ b/src/app/features/call/CallOverlay.tsx @@ -863,7 +863,6 @@ export function CallOverlay() { setIsFullscreen(false); } } catch (err) { - // eslint-disable-next-line no-console console.error('Fullscreen error:', err); } }, [isFullscreen]); @@ -944,7 +943,6 @@ export function CallOverlay() { setIsPip(false); } } catch (err) { - // eslint-disable-next-line no-console console.error('PiP error:', err); } }, [isPip]); diff --git a/src/app/features/call/CallService.ts b/src/app/features/call/CallService.ts index 0b748621..9466d24a 100644 --- a/src/app/features/call/CallService.ts +++ b/src/app/features/call/CallService.ts @@ -1,5 +1,3 @@ -/* eslint-disable no-console */ - import { Room, RoomEvent, diff --git a/src/app/features/call/CallSounds.ts b/src/app/features/call/CallSounds.ts index 6df6a88f..b6dbc5a3 100644 --- a/src/app/features/call/CallSounds.ts +++ b/src/app/features/call/CallSounds.ts @@ -1,5 +1,3 @@ -/* eslint-disable no-console */ - /** * Sound types that can be played during a call */ diff --git a/src/app/features/call/IncomingCallNotification.tsx b/src/app/features/call/IncomingCallNotification.tsx index 4655369a..dbb04167 100644 --- a/src/app/features/call/IncomingCallNotification.tsx +++ b/src/app/features/call/IncomingCallNotification.tsx @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import React, { useCallback, useEffect, useState } from 'react'; import { MatrixEvent, Room, RoomStateEvent } from 'matrix-js-sdk'; import { Box, IconButton, Text, color } from 'folds'; diff --git a/src/app/features/call/useCall.ts b/src/app/features/call/useCall.ts index 2fb5f440..433f8109 100644 --- a/src/app/features/call/useCall.ts +++ b/src/app/features/call/useCall.ts @@ -104,7 +104,6 @@ export function useCallService(): CallContextValue { setGlobalCallService(service); // Make available globally for Paarrot API setCallSupported(true); // Global flag - actual support checked per-room setCallSupportLoading(false); - // eslint-disable-next-line no-console console.log('Call service init - Success!'); unsubscribe = service.on((event: CallEvent) => { @@ -135,7 +134,6 @@ export function useCallService(): CallContextValue { } }); } catch (error) { - // eslint-disable-next-line no-console console.error('Call service init - Error:', error); setCallSupported(false); setCallSupportLoading(false); diff --git a/src/app/features/call/useRoomCallMembers.ts b/src/app/features/call/useRoomCallMembers.ts index 5293db9d..c4a1b88e 100644 --- a/src/app/features/call/useRoomCallMembers.ts +++ b/src/app/features/call/useRoomCallMembers.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import { useCallback, useEffect, useState } from 'react'; import { MatrixEvent, Room, RoomStateEvent } from 'matrix-js-sdk'; import { useMatrixClient } from '../../hooks/useMatrixClient'; diff --git a/src/app/features/create-room/CreateRoomModal.tsx b/src/app/features/create-room/CreateRoomModal.tsx index 451bcd8c..6a0e3904 100644 --- a/src/app/features/create-room/CreateRoomModal.tsx +++ b/src/app/features/create-room/CreateRoomModal.tsx @@ -88,7 +88,6 @@ function CreateRoomModal({ state }: CreateRoomModalProps) { const newContent: PaarrotSubRoomsContent = { children: [...currentChildren, newRoomId], }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any await mx.sendStateEvent( parentSubRoomId, StateEvent.PaarrotSubRooms as any, @@ -118,7 +117,6 @@ function CreateRoomModal({ state }: CreateRoomModalProps) { newRoomId, ); } catch (spaceError) { - // eslint-disable-next-line no-console console.warn(`Failed to add sub-room to space ${parentSpaceId}:`, spaceError); } } @@ -126,7 +124,6 @@ function CreateRoomModal({ state }: CreateRoomModalProps) { ); } } catch (error) { - // eslint-disable-next-line no-console console.error('Failed to set up sub-room relationship:', error); } } diff --git a/src/app/features/create-space/CreateSpace.tsx b/src/app/features/create-space/CreateSpace.tsx index f9682b92..4c4c73e8 100644 --- a/src/app/features/create-space/CreateSpace.tsx +++ b/src/app/features/create-space/CreateSpace.tsx @@ -169,7 +169,6 @@ export function CreateSpaceForm({ defaultKind, space, onCreate }: CreateSpaceFor try { await mx.sendStateEvent(roomId, StateEvent.PaarrotRoomKind, { kind: 'forum_space' }, ''); } catch (err) { - // eslint-disable-next-line no-console console.warn('Failed to set forum space marker state event:', err); } } diff --git a/src/app/features/room-settings/sub-rooms/SubRooms.tsx b/src/app/features/room-settings/sub-rooms/SubRooms.tsx index d651e985..440ed07e 100644 --- a/src/app/features/room-settings/sub-rooms/SubRooms.tsx +++ b/src/app/features/room-settings/sub-rooms/SubRooms.tsx @@ -132,7 +132,6 @@ export function SubRooms() { roomIdToAdd, ); } catch (spaceError) { - // eslint-disable-next-line no-console console.warn(`Failed to add sub-room to space ${parentSpaceId}:`, spaceError); } } diff --git a/src/app/features/room/RoomViewHeader.tsx b/src/app/features/room/RoomViewHeader.tsx index c3fe0a29..6eb93865 100644 --- a/src/app/features/room/RoomViewHeader.tsx +++ b/src/app/features/room/RoomViewHeader.tsx @@ -394,7 +394,6 @@ function RoomCallButtons({ roomId }: RoomCallButtonsProps) { // Debug logging React.useEffect(() => { - // eslint-disable-next-line no-console console.log('RoomCallButtons render:', { callSupportLoading, callSupported, roomId }); }, [callSupportLoading, callSupported, roomId]); diff --git a/src/app/features/room/ThreadView.tsx b/src/app/features/room/ThreadView.tsx index e5484f2b..2b8d5c37 100644 --- a/src/app/features/room/ThreadView.tsx +++ b/src/app/features/room/ThreadView.tsx @@ -128,7 +128,6 @@ export function ThreadView({ room, threadRootId }: ThreadViewProps) { const setActiveThreadId = useSetAtom(activeThreadIdAtomFamily(room.roomId)); const setReplyDraft = useSetAtom(roomIdToReplyDraftAtomFamily(room.roomId)); - // eslint-disable-next-line no-console console.log('[ThreadView] Component mount/render', { roomId: room.roomId, threadRootId, @@ -219,10 +218,8 @@ export function ThreadView({ room, threadRootId }: ThreadViewProps) { // If thread doesn't exist, try to find it by checking if threadRootId is a root event React.useEffect(() => { if (!thread) { - // eslint-disable-next-line no-console console.log('[ThreadView] Thread not found, checking if event exists in room timeline'); const rootEvent = room.findEventById(threadRootId); - // eslint-disable-next-line no-console console.log('[ThreadView] Root event lookup', { threadRootId, rootEventFound: !!rootEvent, @@ -240,9 +237,7 @@ export function ThreadView({ room, threadRootId }: ThreadViewProps) { const getThreadEvents = useCallback((): MatrixEvent[] => { const t = room.getThread(threadRootId); if (!t) { - // eslint-disable-next-line no-console console.log('[ThreadView] No thread found for ID:', threadRootId); - // eslint-disable-next-line no-console console.log('[ThreadView] Attempting to find replies manually from room timeline'); // Fallback: search the room timeline for events that are replies to this thread @@ -253,7 +248,6 @@ export function ThreadView({ room, threadRootId }: ThreadViewProps) { return relations?.rel_type === 'm.thread' && relations?.event_id === threadRootId; }); - // eslint-disable-next-line no-console console.log('[ThreadView] Manual search found', { totalEventsInTimeline: allEvents.length, repliesFound: threadReplies.length, @@ -271,7 +265,6 @@ export function ThreadView({ room, threadRootId }: ThreadViewProps) { const replies = [...t.events]; const liveTimelineEvents = t.liveTimeline?.getEvents() || []; - // eslint-disable-next-line no-console console.log('[ThreadView] getThreadEvents', { threadId: threadRootId, repliesCount: replies.length, @@ -297,7 +290,6 @@ export function ThreadView({ room, threadRootId }: ThreadViewProps) { // Try using liveTimeline events if thread.events is empty but liveTimeline has events if (replies.length === 0 && liveTimelineEvents.length > 0) { - // eslint-disable-next-line no-console console.log('[ThreadView] Using liveTimeline events instead of thread.events'); return [...liveTimelineEvents]; } @@ -337,7 +329,6 @@ export function ThreadView({ room, threadRootId }: ThreadViewProps) { // Subscribe to thread and room timeline events. useEffect(() => { - // eslint-disable-next-line no-console console.log('[ThreadView] Effect running', { threadId: threadRootId, threadExists: !!thread, @@ -349,7 +340,6 @@ export function ThreadView({ room, threadRootId }: ThreadViewProps) { const handleUpdate = () => { const newEvents = getThreadEvents(); - // eslint-disable-next-line no-console console.log('[ThreadView] handleUpdate - new events count:', newEvents.length); setEvents(newEvents); }; diff --git a/src/app/features/settings/audio/Audio.tsx b/src/app/features/settings/audio/Audio.tsx index 68a2ae3d..2257d896 100644 --- a/src/app/features/settings/audio/Audio.tsx +++ b/src/app/features/settings/audio/Audio.tsx @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import React, { useCallback, useEffect, useRef, useState, MouseEventHandler } from 'react'; import { Box, diff --git a/src/app/pages/client/home/HomeThreadsCategory.tsx b/src/app/pages/client/home/HomeThreadsCategory.tsx index 62280307..43ba372b 100644 --- a/src/app/pages/client/home/HomeThreadsCategory.tsx +++ b/src/app/pages/client/home/HomeThreadsCategory.tsx @@ -54,7 +54,6 @@ function ThreadNavItem({ room, thread, selected }: ThreadNavItemProps) { navigate(getHomeRoomPath(roomIdOrAlias)); // Defer slightly so RoomView has time to render before we set the atom. requestAnimationFrame(() => { - // eslint-disable-next-line no-console console.log('[HomeThreadsCategory] Opening thread', { threadId: thread.id, rootEventId: thread.rootEvent?.getId(), diff --git a/src/app/utils/animatedStickerConverter.ts b/src/app/utils/animatedStickerConverter.ts index f5206aa9..cb8c42ce 100644 --- a/src/app/utils/animatedStickerConverter.ts +++ b/src/app/utils/animatedStickerConverter.ts @@ -195,7 +195,6 @@ export async function tgsToGif( targetWidth = 256, targetHeight = 256, ): Promise { - // eslint-disable-next-line no-console console.log('tgsToGif: Starting conversion, blob size:', tgsBlob.size); const arrayBuffer = await tgsBlob.arrayBuffer(); const animationData = decompressTgs(arrayBuffer); @@ -219,7 +218,6 @@ export async function webmToGif( targetWidth = 256, targetHeight = 256, ): Promise { - // eslint-disable-next-line no-console console.log('webmToGif: Starting conversion, blob size:', webmBlob.size); return new Promise((resolve, reject) => { const video = document.createElement('video'); @@ -257,7 +255,6 @@ export async function webmToGif( video.load(); video.onloadedmetadata = () => { - // eslint-disable-next-line no-console console.log('webmToGif: Video metadata loaded, duration:', video.duration); const { duration } = video; const frameDelay = 1000 / GIF_FPS; @@ -269,16 +266,13 @@ export async function webmToGif( */ const captureNextFrame = () => { if (currentFrame >= totalFrames) { - // eslint-disable-next-line no-console console.log('webmToGif: All frames captured, rendering GIF'); URL.revokeObjectURL(url); gif.on('finished', (blob: Blob) => { - // eslint-disable-next-line no-console console.log('webmToGif: GIF rendered, size:', blob.size); resolve(blob); }); gif.on('error', (err) => { - // eslint-disable-next-line no-console console.error('webmToGif: GIF render error:', err); reject(err); }); @@ -304,7 +298,6 @@ export async function webmToGif( }; video.onerror = (e) => { - // eslint-disable-next-line no-console console.error('webmToGif: Video load error:', e, video.error); URL.revokeObjectURL(url); reject(new Error(`Failed to load video: ${video.error?.message || 'unknown error'}`)); @@ -313,7 +306,6 @@ export async function webmToGif( // Add timeout in case video never loads setTimeout(() => { if (!video.readyState) { - // eslint-disable-next-line no-console console.error('webmToGif: Video load timeout'); URL.revokeObjectURL(url); reject(new Error('Video load timeout')); diff --git a/src/app/utils/gifMetadata.ts b/src/app/utils/gifMetadata.ts index b5aaf3cb..6508f69d 100644 --- a/src/app/utils/gifMetadata.ts +++ b/src/app/utils/gifMetadata.ts @@ -18,7 +18,6 @@ * - Data sub-blocks (size byte + data, terminated by 0x00) */ -/* eslint-disable no-bitwise */ /* eslint-disable no-plusplus */ /* eslint-disable no-restricted-syntax */ diff --git a/src/app/utils/imageMetadata.ts b/src/app/utils/imageMetadata.ts index 8ee66a11..158be945 100644 --- a/src/app/utils/imageMetadata.ts +++ b/src/app/utils/imageMetadata.ts @@ -4,7 +4,6 @@ */ /* eslint-disable no-plusplus */ -/* eslint-disable no-console */ import { embedColorInPNG, diff --git a/src/app/utils/jpegMetadata.ts b/src/app/utils/jpegMetadata.ts index e0d4561c..d231cbfb 100644 --- a/src/app/utils/jpegMetadata.ts +++ b/src/app/utils/jpegMetadata.ts @@ -9,7 +9,6 @@ * - Ends with FFD9 (EOI marker) */ -/* eslint-disable no-bitwise */ /* eslint-disable no-plusplus */ /* eslint-disable no-restricted-syntax */ diff --git a/src/app/utils/pngMetadata.ts b/src/app/utils/pngMetadata.ts index 7f7bb03f..35e022fd 100644 --- a/src/app/utils/pngMetadata.ts +++ b/src/app/utils/pngMetadata.ts @@ -3,10 +3,8 @@ * Used to embed user color in avatar images */ -/* eslint-disable no-bitwise */ /* eslint-disable no-plusplus */ /* eslint-disable no-restricted-syntax */ -/* eslint-disable no-console */ /** PNG signature bytes */ import type { ImageMetadata, ProfileGradient } from './imageMetadata'; diff --git a/src/app/utils/telegramStickerImport.ts b/src/app/utils/telegramStickerImport.ts index f08deb8c..bec9e34e 100644 --- a/src/app/utils/telegramStickerImport.ts +++ b/src/app/utils/telegramStickerImport.ts @@ -265,7 +265,6 @@ export async function importTelegramStickerPack( }; } catch (err) { // Log error and continue with other stickers - // eslint-disable-next-line no-console console.error(`Failed to import sticker ${i + 1}:`, err); } } @@ -274,7 +273,6 @@ export async function importTelegramStickerPack( throw new Error('Failed to import any stickers from the pack'); } - // eslint-disable-next-line no-console console.log(`Successfully imported ${Object.keys(images).length} stickers`); // Create pack content @@ -303,18 +301,14 @@ export async function importTelegramStickerPack( }; // Save to user account data - // eslint-disable-next-line no-console console.log('Saving merged pack to account data:', AccountDataEvent.PoniesUserEmotes); - // eslint-disable-next-line no-console console.log('Merged content:', JSON.stringify(mergedContent, null, 2)); // eslint-disable-next-line @typescript-eslint/no-explicit-any await mx.setAccountData(AccountDataEvent.PoniesUserEmotes as any, mergedContent as any); - // eslint-disable-next-line no-console console.log('Pack saved successfully'); // Force the account data event to be emitted for UI refresh const updatedEvent = getAccountData(mx, AccountDataEvent.PoniesUserEmotes); - // eslint-disable-next-line no-console console.log('Updated account data after save:', updatedEvent?.getContent()); onProgress?.(total, total, 'Import complete!'); diff --git a/src/app/utils/webpMetadata.ts b/src/app/utils/webpMetadata.ts index 94b54882..3bca71f8 100644 --- a/src/app/utils/webpMetadata.ts +++ b/src/app/utils/webpMetadata.ts @@ -7,7 +7,6 @@ * - Chunks: chunk ID (4 bytes) + chunk size (4 bytes LE) + chunk data (+ padding byte if odd size) */ -/* eslint-disable no-bitwise */ /* eslint-disable no-plusplus */ /* eslint-disable no-restricted-syntax */ diff --git a/src/util/colorMXID.js b/src/util/colorMXID.js index b61f5081..9ec95743 100644 --- a/src/util/colorMXID.js +++ b/src/util/colorMXID.js @@ -91,9 +91,7 @@ function hashCode(str) { } for (i = 0; i < str.length; i += 1) { chr = str.charCodeAt(i); - // eslint-disable-next-line no-bitwise hash = (hash << 5) - hash + chr; - // eslint-disable-next-line no-bitwise hash |= 0; } return Math.abs(hash);