fixed lint issues

This commit is contained in:
Boki 2025-06-23 17:07:30 -04:00
parent b67fe48f72
commit 519d24722e
12 changed files with 54 additions and 46 deletions

View file

@ -1,4 +1,4 @@
import { useState, useEffect } from 'react';
import { useState, useEffect, useCallback } from 'react';
import {
ArrowPathIcon,
CircleStackIcon,
@ -7,7 +7,7 @@ import {
CheckCircleIcon,
} from '@heroicons/react/24/outline';
import { usePipeline } from './hooks/usePipeline';
import type { PipelineOperation } from './types';
import type { PipelineOperation, ExchangeStats, ProviderMappingStats, DataClearType } from './types';
const operations: PipelineOperation[] = [
// Symbol operations
@ -93,14 +93,14 @@ export function PipelinePage() {
const [selectedProvider, setSelectedProvider] = useState('yahoo');
const [clearFirst, setClearFirst] = useState(false);
const [clearDataType, setClearDataType] = useState<'all' | 'exchanges' | 'provider_mappings'>('all');
const [stats, setStats] = useState<{ exchanges?: any; providerMappings?: any }>({});
const [stats, setStats] = useState<{ exchanges?: ExchangeStats; providerMappings?: ProviderMappingStats }>({});
// Load stats on mount
useEffect(() => {
loadStats();
}, []);
}, [loadStats]);
const loadStats = async () => {
const loadStats = useCallback(async () => {
const [exchangeStats, mappingStats] = await Promise.all([
getExchangeStats(),
getProviderMappingStats(),
@ -109,7 +109,7 @@ export function PipelinePage() {
exchanges: exchangeStats,
providerMappings: mappingStats,
});
};
}, [getExchangeStats, getProviderMappingStats]);
const handleOperation = async (op: PipelineOperation) => {
switch (op.id) {
@ -368,7 +368,7 @@ export function PipelinePage() {
<label className="block text-xs text-text-muted mb-1">Data Type</label>
<select
value={clearDataType}
onChange={e => setClearDataType(e.target.value as any)}
onChange={e => setClearDataType(e.target.value as DataClearType)}
className="w-full px-2 py-1 text-xs bg-surface border border-border rounded focus:ring-1 focus:ring-warning focus:border-warning"
>
<option value="all">All Data</option>

View file

@ -7,7 +7,7 @@ import type {
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || 'http://localhost:2003';
class PipelineApiService {
private async request<T = any>(
private async request<T = unknown>(
endpoint: string,
options?: RequestInit
): Promise<T> {

View file

@ -5,12 +5,12 @@ export interface PipelineJobResult {
jobId?: string;
message?: string;
error?: string;
data?: any;
data?: unknown;
}
export interface PipelineStatsResult {
success: boolean;
data?: any;
data?: unknown;
error?: string;
}
@ -54,5 +54,5 @@ export interface PipelineOperation {
method: 'GET' | 'POST';
category: 'sync' | 'stats' | 'maintenance';
dangerous?: boolean;
params?: Record<string, any>;
params?: Record<string, unknown>;
}