From eec30a5d71076213f575517c977ed2a10a06d8d0 Mon Sep 17 00:00:00 2001 From: Jakob Langdal <jakob.langdal@alexandra.dk> Date: Thu, 21 Nov 2024 16:07:07 +0100 Subject: [PATCH] Format all --- packages/core/index.html | 2 +- packages/core/src/context/experiment/test-utils.ts | 6 +++--- packages/ui/index.html | 2 +- .../ui/src/features/core/title-card/title-card.tsx | 4 ++-- packages/ui/src/features/core/title-card/util.ts | 8 ++++---- .../ui/src/features/data-points/useDataPoints.ts | 2 +- .../src/features/input-model/variable-editor.tsx | 4 ++-- packages/ui/src/features/plots/plots.tsx | 4 ++-- sample-app/index.html | 2 +- sample-app/src/styles/globals.css | 14 ++++++++++++-- 10 files changed, 29 insertions(+), 19 deletions(-) diff --git a/packages/core/index.html b/packages/core/index.html index 5946462b..e6783f21 100644 --- a/packages/core/index.html +++ b/packages/core/index.html @@ -1,4 +1,4 @@ -<!DOCTYPE html> +<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> diff --git a/packages/core/src/context/experiment/test-utils.ts b/packages/core/src/context/experiment/test-utils.ts index b2733af7..bfcd798e 100644 --- a/packages/core/src/context/experiment/test-utils.ts +++ b/packages/core/src/context/experiment/test-utils.ts @@ -17,7 +17,7 @@ export const createValueVariable = (input: Partial<ValueVariableType>) => min: input.min ?? 0, max: input.max ?? 100, enabled: input.enabled ?? true, - } satisfies ValueVariableType) + }) satisfies ValueVariableType export const createCategoricalVariable = ( input: Partial<CategoricalVariableType> @@ -27,14 +27,14 @@ export const createCategoricalVariable = ( description: input.description ?? '', options: input.options ?? ['option1', 'option2'], enabled: input.enabled ?? true, - } satisfies CategoricalVariableType) + }) satisfies CategoricalVariableType export const createScoreVariable = (input: Partial<ScoreVariableType>) => ({ name: input.name ?? 'name', description: input.description ?? '', enabled: input.enabled ?? true, - } satisfies ScoreVariableType) + }) satisfies ScoreVariableType export const createDataPoints = ( count: number, diff --git a/packages/ui/index.html b/packages/ui/index.html index 5946462b..e6783f21 100644 --- a/packages/ui/index.html +++ b/packages/ui/index.html @@ -1,4 +1,4 @@ -<!DOCTYPE html> +<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> diff --git a/packages/ui/src/features/core/title-card/title-card.tsx b/packages/ui/src/features/core/title-card/title-card.tsx index 2102591d..bb29ae38 100644 --- a/packages/ui/src/features/core/title-card/title-card.tsx +++ b/packages/ui/src/features/core/title-card/title-card.tsx @@ -56,8 +56,8 @@ export const TitleCard = (props: TitleCardProps) => { loadingMode === 'skeleton' ? loadingSkeleton : loadingMode === 'overlay' - ? loadingOverlay - : loadingView + ? loadingOverlay + : loadingView const cardView = loading ? loadingComponent : children diff --git a/packages/ui/src/features/core/title-card/util.ts b/packages/ui/src/features/core/title-card/util.ts index 489113c6..1ea6a17b 100644 --- a/packages/ui/src/features/core/title-card/util.ts +++ b/packages/ui/src/features/core/title-card/util.ts @@ -5,10 +5,10 @@ export const sortMessages = (a: Message, b: Message) => { m.type === 'info' ? 1 : m.type === 'error' - ? 2 - : m.type === 'warning' - ? 3 - : 4 + ? 2 + : m.type === 'warning' + ? 3 + : 4 const x = order(a) const y = order(b) return x < y ? -1 : x > y ? 1 : 0 diff --git a/packages/ui/src/features/data-points/useDataPoints.ts b/packages/ui/src/features/data-points/useDataPoints.ts index b71a30df..6b8a23c0 100644 --- a/packages/ui/src/features/data-points/useDataPoints.ts +++ b/packages/ui/src/features/data-points/useDataPoints.ts @@ -32,7 +32,7 @@ export const useDataPoints = ( dataPoints ), meta: dataPoints.map(dp => dp.meta), - } as const), + }) as const, [categoricalVariables, dataPoints, scoreNames, valueVariables] ) diff --git a/packages/ui/src/features/input-model/variable-editor.tsx b/packages/ui/src/features/input-model/variable-editor.tsx index 5943300e..db83a7dd 100644 --- a/packages/ui/src/features/input-model/variable-editor.tsx +++ b/packages/ui/src/features/input-model/variable-editor.tsx @@ -34,8 +34,8 @@ export default function VariableEditor(props: VariableEditorProps) { props.editingValueVariable ? `value-${props.editingValueVariable.index}` : props.editingCategoricalVariable - ? `categorial-${props.editingCategoricalVariable.index}` - : 'blank' + ? `categorial-${props.editingCategoricalVariable.index}` + : 'blank' } /> ) diff --git a/packages/ui/src/features/plots/plots.tsx b/packages/ui/src/features/plots/plots.tsx index 40cce282..7ea9103d 100644 --- a/packages/ui/src/features/plots/plots.tsx +++ b/packages/ui/src/features/plots/plots.tsx @@ -48,8 +48,8 @@ export const Plots: FC<Props> = ({ loadingMode === 'overlay' ? undefined : loadingMode === 'custom' - ? loadingView - : defaultLoadingView + ? loadingView + : defaultLoadingView return ( <> diff --git a/sample-app/index.html b/sample-app/index.html index 3540be8f..9d42d623 100644 --- a/sample-app/index.html +++ b/sample-app/index.html @@ -1,4 +1,4 @@ -<!DOCTYPE html> +<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> diff --git a/sample-app/src/styles/globals.css b/sample-app/src/styles/globals.css index e5e2dcc2..51a2a4ea 100644 --- a/sample-app/src/styles/globals.css +++ b/sample-app/src/styles/globals.css @@ -2,8 +2,18 @@ html, body { padding: 0; margin: 0; - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, - Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; + font-family: + -apple-system, + BlinkMacSystemFont, + Segoe UI, + Roboto, + Oxygen, + Ubuntu, + Cantarell, + Fira Sans, + Droid Sans, + Helvetica Neue, + sans-serif; } a {