From 326972e1a40201616e7fc8deb61fd23e32b9846a Mon Sep 17 00:00:00 2001 From: Noah Gundotra Date: Mon, 18 Nov 2024 10:28:36 -0500 Subject: [PATCH] fix lint --- .eslintrc.json | 2 +- app/providers/stats/solanaClusterStats.tsx | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 5141eb65..9c4c2b06 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,6 @@ { "extends": ["next/core-web-vitals", "@solana/eslint-config-solana"], - "plugins": ["testing-library", "simple-import-sort"], + "plugins": ["testing-library"], "overrides": [ // Only uses Testing Library lint rules in test files { diff --git a/app/providers/stats/solanaClusterStats.tsx b/app/providers/stats/solanaClusterStats.tsx index 7c6d6052..cb003000 100644 --- a/app/providers/stats/solanaClusterStats.tsx +++ b/app/providers/stats/solanaClusterStats.tsx @@ -7,7 +7,12 @@ import useTabVisibility from 'use-tab-visibility'; import { createSolanaRpc } from 'web3js-experimental'; import { DashboardInfo, DashboardInfoActionType, dashboardInfoReducer, EpochInfo } from './solanaDashboardInfo'; -import { PerformanceInfo, PerformanceInfoActionType, performanceInfoReducer, PerformanceSample } from './solanaPerformanceInfo'; +import { + PerformanceInfo, + PerformanceInfoActionType, + performanceInfoReducer, + PerformanceSample, +} from './solanaPerformanceInfo'; export const PERF_UPDATE_SEC = 5; export const SAMPLE_HISTORY_HOURS = 6; @@ -51,11 +56,11 @@ const initialDashboardInfo: DashboardInfo = { type SetActive = React.Dispatch>; const StatsProviderContext = React.createContext< | { - setActive: SetActive; - setTimedOut: () => void; - retry: () => void; - active: boolean; - } + setActive: SetActive; + setTimedOut: () => void; + retry: () => void; + active: boolean; + } | undefined >(undefined); @@ -159,7 +164,7 @@ export function SolanaClusterStatsProvider({ children }: Props) { epoch: epochInfoResponse.epoch, slotIndex: epochInfoResponse.slotIndex, slotsInEpoch: epochInfoResponse.slotsInEpoch, - } + }; if (stale) { return; @@ -193,7 +198,7 @@ export function SolanaClusterStatsProvider({ children }: Props) { } dispatchDashboardInfo({ data: { - blockTime: blockTime * 1000, + blockTime: Number(blockTime) * 1000, slot: lastSlot, }, type: DashboardInfoActionType.SetLastBlockTime,