Drop the unused eslint-disable directives. [skip build]
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -195,7 +195,6 @@ export async function tgsToGif(
|
||||
targetWidth = 256,
|
||||
targetHeight = 256,
|
||||
): Promise<Blob> {
|
||||
// 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<Blob> {
|
||||
// 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'));
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
*/
|
||||
|
||||
/* eslint-disable no-plusplus */
|
||||
/* eslint-disable no-console */
|
||||
|
||||
import {
|
||||
embedColorInPNG,
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* - Ends with FFD9 (EOI marker)
|
||||
*/
|
||||
|
||||
/* eslint-disable no-bitwise */
|
||||
/* eslint-disable no-plusplus */
|
||||
|
||||
/* eslint-disable no-restricted-syntax */
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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!');
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user