fixed more lint issues

This commit is contained in:
Boki 2025-06-20 08:27:07 -04:00
parent 43f4429998
commit 5436509ed6
7 changed files with 15 additions and 16 deletions

View file

@ -28,7 +28,7 @@ export function DeleteExchangeDialog({
if (success) { if (success) {
onClose(); onClose();
} }
} catch (error) { } catch {
// Error deleting exchange - could add toast notification here // Error deleting exchange - could add toast notification here
} finally { } finally {
setLoading(false); setLoading(false);

View file

@ -3,7 +3,7 @@ import { PlusIcon, TrashIcon } from '@heroicons/react/24/outline';
import { ColumnDef } from '@tanstack/react-table'; import { ColumnDef } from '@tanstack/react-table';
import { useCallback, useMemo, useState } from 'react'; import { useCallback, useMemo, useState } from 'react';
import { useExchanges } from '../hooks/useExchanges'; import { useExchanges } from '../hooks/useExchanges';
import { Exchange, ProviderMapping, EditingCell, AddProviderMappingDialogState, DeleteDialogState } from '../types'; import { Exchange, EditingCell, AddProviderMappingDialogState, DeleteDialogState } from '../types';
import { AddProviderMappingDialog } from './AddProviderMappingDialog'; import { AddProviderMappingDialog } from './AddProviderMappingDialog';
import { DeleteExchangeDialog } from './DeleteExchangeDialog'; import { DeleteExchangeDialog } from './DeleteExchangeDialog';
import { sortProviderMappings, getProviderMappingColor, formatProviderMapping, formatDate } from '../utils/formatters'; import { sortProviderMappings, getProviderMappingColor, formatProviderMapping, formatDate } from '../utils/formatters';
@ -13,8 +13,7 @@ export function ExchangesTable() {
exchanges, exchanges,
loading, loading,
error, error,
updateExchange, updateExchange,
fetchExchangeDetails,
updateProviderMapping, updateProviderMapping,
createProviderMapping, createProviderMapping,
refetch refetch
@ -71,7 +70,7 @@ export function ExchangesTable() {
); );
const handleRowExpand = useCallback( const handleRowExpand = useCallback(
async (row: any) => { async (_row: any) => {
// Row expansion is now handled automatically by TanStack Table // Row expansion is now handled automatically by TanStack Table
// No need to fetch data since all mappings are already loaded // No need to fetch data since all mappings are already loaded
}, },
@ -105,7 +104,7 @@ export function ExchangesTable() {
header: 'Code', header: 'Code',
accessorKey: 'code', accessorKey: 'code',
size: 120, size: 120,
cell: ({ getValue, row, cell }) => { cell: ({ getValue, row, cell: _cell }) => {
const isEditing = const isEditing =
editingCell?.id === row.original.id && editingCell?.field === 'code'; editingCell?.id === row.original.id && editingCell?.field === 'code';
@ -148,7 +147,7 @@ export function ExchangesTable() {
header: 'Name', header: 'Name',
accessorKey: 'name', accessorKey: 'name',
size: 250, size: 250,
cell: ({ getValue, row, cell }) => { cell: ({ getValue, row, cell: _cell }) => {
const isEditing = const isEditing =
editingCell?.id === row.original.id && editingCell?.field === 'name'; editingCell?.id === row.original.id && editingCell?.field === 'name';
@ -236,7 +235,7 @@ export function ExchangesTable() {
cell: ({ getValue, row }) => { cell: ({ getValue, row }) => {
const totalMappings = parseInt(getValue() as string) || 0; const totalMappings = parseInt(getValue() as string) || 0;
const activeMappings = parseInt(row.original.active_mapping_count) || 0; const activeMappings = parseInt(row.original.active_mapping_count) || 0;
const verifiedMappings = parseInt(row.original.verified_mapping_count) || 0; const _verifiedMappings = parseInt(row.original.verified_mapping_count) || 0;
// Get provider mappings directly from the exchange data // Get provider mappings directly from the exchange data
const mappings = row.original.provider_mappings || []; const mappings = row.original.provider_mappings || [];

View file

@ -172,7 +172,7 @@ export class RedisConnectionManager {
try { try {
await connection.ping(); await connection.ping();
details[`shared:${name}`] = true; details[`shared:${name}`] = true;
} catch (_error) { } catch {
details[`shared:${name}`] = false; details[`shared:${name}`] = false;
allHealthy = false; allHealthy = false;
} }
@ -183,7 +183,7 @@ export class RedisConnectionManager {
try { try {
await connection.ping(); await connection.ping();
details[`unique:${name}`] = true; details[`unique:${name}`] = true;
} catch (_error) { } catch {
details[`unique:${name}`] = false; details[`unique:${name}`] = false;
allHealthy = false; allHealthy = false;
} }

View file

@ -77,7 +77,7 @@ export class EnvLoader implements ConfigLoader {
const path = key.toLowerCase().split('_'); const path = key.toLowerCase().split('_');
this.setNestedValue(config, path, parsedValue); this.setNestedValue(config, path, parsedValue);
} }
} catch (error) { } catch {
// Skip environment variables that can't be set (readonly properties) // Skip environment variables that can't be set (readonly properties)
// This is expected behavior for system environment variables // This is expected behavior for system environment variables
} }
@ -96,7 +96,7 @@ export class EnvLoader implements ConfigLoader {
target[lastKey] = value; target[lastKey] = value;
return true; return true;
} catch (error) { } catch {
// If we can't assign to any property (readonly), skip this env var silently // If we can't assign to any property (readonly), skip this env var silently
return false; return false;
} }

View file

@ -110,7 +110,7 @@ export class MockServer {
/** /**
* Handle errors * Handle errors
*/ */
private handleError(error: Error): Response { private handleError(_error: Error): Response {
return new Response('Server error', { status: 500 }); return new Response('Server error', { status: 500 });
} }
} }

View file

@ -5,8 +5,8 @@
* Provides utilities and mocks for testing logging operations. * Provides utilities and mocks for testing logging operations.
*/ */
import { afterAll, afterEach, beforeAll, beforeEach } from 'bun:test'; import { afterAll, afterEach, beforeAll } from 'bun:test';
import { Logger, LogMetadata, shutdownLoggers } from '../src'; import { shutdownLoggers } from '../src';
// Store original console methods // Store original console methods
const originalConsole = { const originalConsole = {

View file

@ -5,7 +5,7 @@
* without requiring an actual QuestDB instance. * without requiring an actual QuestDB instance.
*/ */
import { afterEach, beforeEach, describe, expect, it, mock } from 'bun:test'; import { afterEach, describe, expect, it } from 'bun:test';
import { import {
createQuestDBClient, createQuestDBClient,
QuestDBClient, QuestDBClient,