From 0340aa37493b1ba0bc8ce9435824b5fca88dffff Mon Sep 17 00:00:00 2001 From: Adam Shiervani Date: Thu, 28 Aug 2025 12:05:18 +0200 Subject: [PATCH] docs: add JSDoc comments to createChartArray function in Metric component for better documentation --- ui/src/components/Metric.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/src/components/Metric.tsx b/ui/src/components/Metric.tsx index fcb4e51..f791e60 100644 --- a/ui/src/components/Metric.tsx +++ b/ui/src/components/Metric.tsx @@ -1,3 +1,4 @@ +/* eslint-disable react-refresh/only-export-components */ import { ComponentProps } from "react"; import { cva, cx } from "cva"; @@ -28,7 +29,12 @@ interface MetricProps { badgeTheme?: ComponentProps["badgeTheme"]; } -/* eslint-disable-next-line */ +/** + * Creates a chart array from a metrics map and a metric name. + * + * @param metrics - Expected to be ordered from oldest to newest. + * @param metricName - Name of the metric to create a chart array for. + */ export function createChartArray( metrics: Map, metricName: K,