Drop the unused eslint-disable directives. [skip build]
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user