🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
chore(web): remove nested ternary eslint-disable in experiment charts utils (#19602)
cursor[bot]a00bdd651438
diff --git a/web/src/features/experiments/utils/charts.ts b/web/src/features/experiments/utils/charts.tsindex 6375927224..84ce8767d4 100644--- a/web/src/features/experiments/utils/charts.ts+++ b/web/src/features/experiments/utils/charts.ts@@ -1,4 +1,3 @@-/* eslint-disable no-nested-ternary */import {BASE_CHART_IDS,CATEGORICAL_SCORE_CHART_CONFIG,@@ -133,12 +132,15 @@ export function buildMetricOptions(label: scoreName,group: "Scores" as const,level,- valueKind:- dataType === "categorical"- ? ("categorical" as const)- : booleanNames.has(scoreName)- ? ("boolean" as const)- : ("numeric" as const),+ valueKind: ((): "categorical" | "boolean" | "numeric" => {+ if (dataType === "categorical") {+ return "categorical";+ }+ if (booleanNames.has(scoreName)) {+ return "boolean";+ }+ return "numeric";+ })(),}));},);