feat(frontend): biome

This commit is contained in:
ryan
2026-07-22 22:24:32 +08:00
parent f28aa6520e
commit 5b1e27d0a3
15 changed files with 338 additions and 176 deletions
@@ -97,7 +97,8 @@ function SparklineMetricCard({
formatter: (params: unknown) => {
const items = Array.isArray(params) ? params : [];
const item = items[0] as
{ axisValueLabel?: string; value?: number } | undefined;
| { axisValueLabel?: string; value?: number }
| undefined;
if (!item) return '';
const raw = typeof item.value === 'number' ? item.value : 0;
const formatted = valueFormatter
@@ -206,7 +206,8 @@ export function RatePressureChart({ data, hours }: RatePressureChartProps) {
const applyVisibleAxisMax = useCallback(
(startPercent: number, endPercent: number) => {
const instance = chartRef.current?.getEchartsInstance?.() as
EChartsType | undefined;
| EChartsType
| undefined;
if (!instance) return;
instance.setOption(
{
@@ -242,7 +243,8 @@ export function RatePressureChart({ data, hours }: RatePressureChartProps) {
}>;
}) => {
const instance = chartRef.current?.getEchartsInstance?.() as
EChartsType | undefined;
| EChartsType
| undefined;
const { start, end } = readZoomPercent(
params,
chartModel.rpsValues.length,
@@ -335,7 +335,7 @@ export function RuleFlowCanvas({
);
const contextCanDeleteEdge = Boolean(
contextMenu?.kind === 'edge' &&
graph.edges.some((edge) => edge.id === contextMenu.id),
graph.edges.some((edge) => edge.id === contextMenu.id),
);
return (
+5 -5
View File
@@ -1,5 +1,5 @@
@import 'tailwindcss';
@import 'tw-animate-css';
@import "tailwindcss";
@import "tw-animate-css";
@plugin "@tailwindcss/typography";
@custom-variant dark (&:is(.dark *));
@@ -7,10 +7,10 @@
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
--font-sans: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
--font-mono:
var(--font-geist-mono), 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono',
'PingFang SC', 'Microsoft YaHei', monospace;
var(--font-geist-mono), "SF Mono", "Monaco", "Inconsolata", "Roboto Mono",
"PingFang SC", "Microsoft YaHei", monospace;
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);