Drop the unused eslint-disable directives. [skip build]
This commit is contained in:
@@ -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]);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
import {
|
||||
Room,
|
||||
RoomEvent,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
/**
|
||||
* Sound types that can be played during a call
|
||||
*/
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-console */
|
||||
import React, { useCallback, useEffect, useRef, useState, MouseEventHandler } from 'react';
|
||||
import {
|
||||
Box,
|
||||
|
||||
Reference in New Issue
Block a user