From b563319bed24f296b391f4341b263b90b0c90d02 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Thu, 5 Mar 2026 16:19:05 -0800 Subject: [PATCH] Fix biome lint: update schema to 2.3.13, exclude npm dir, fix lint errors Co-Authored-By: Claude Opus 4.6 --- biome.json | 5 +++-- src-web/components/Settings/SettingsLicense.tsx | 1 - src-web/components/core/Dialog.tsx | 2 +- src-web/components/core/Editor/Editor.tsx | 2 ++ src-web/components/git/GitCommitDialog.tsx | 3 +-- src-web/components/git/GitDropdown.tsx | 2 +- src-web/lib/theme/window.ts | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/biome.json b/biome.json index 2a9cd936..2d8c601e 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.13/schema.json", "linter": { "enabled": true, "rules": { @@ -48,7 +48,8 @@ "!src-web/routeTree.gen.ts", "!packages/plugin-runtime-types/lib", "!**/bindings", - "!flatpak" + "!flatpak", + "!npm" ] } } diff --git a/src-web/components/Settings/SettingsLicense.tsx b/src-web/components/Settings/SettingsLicense.tsx index b398cdf3..a699b8af 100644 --- a/src-web/components/Settings/SettingsLicense.tsx +++ b/src-web/components/Settings/SettingsLicense.tsx @@ -13,7 +13,6 @@ import { Link } from '../core/Link'; import { PlainInput } from '../core/PlainInput'; import { Separator } from '../core/Separator'; import { HStack, VStack } from '../core/Stacks'; -import { LocalImage } from '../LocalImage'; export function SettingsLicense() { return ( diff --git a/src-web/components/core/Dialog.tsx b/src-web/components/core/Dialog.tsx index 5e837eb7..455e0358 100644 --- a/src-web/components/core/Dialog.tsx +++ b/src-web/components/core/Dialog.tsx @@ -5,7 +5,7 @@ import { useMemo } from 'react'; import { Overlay } from '../Overlay'; import { Heading } from './Heading'; import { IconButton } from './IconButton'; -import { DialogSize } from '@yaakapp-internal/plugins'; +import type { DialogSize } from '@yaakapp-internal/plugins'; export interface DialogProps { children: ReactNode; diff --git a/src-web/components/core/Editor/Editor.tsx b/src-web/components/core/Editor/Editor.tsx index a33cb7bd..01ff2d21 100644 --- a/src-web/components/core/Editor/Editor.tsx +++ b/src-web/components/core/Editor/Editor.tsx @@ -327,6 +327,7 @@ function EditorInner({ ); // Update the language extension when the language changes + // biome-ignore lint/correctness/useExhaustiveDependencies: intentionally limited deps useEffect(() => { if (cm.current === null) return; const { view, languageCompartment } = cm.current; @@ -360,6 +361,7 @@ function EditorInner({ ]); // Initialize the editor when ref mounts + // biome-ignore lint/correctness/useExhaustiveDependencies: only reinitialize when necessary const initEditorRef = useCallback( function initEditorRef(container: HTMLDivElement | null) { if (container === null) { diff --git a/src-web/components/git/GitCommitDialog.tsx b/src-web/components/git/GitCommitDialog.tsx index 7de28a23..7b32730b 100644 --- a/src-web/components/git/GitCommitDialog.tsx +++ b/src-web/components/git/GitCommitDialog.tsx @@ -1,4 +1,4 @@ -import { useCachedNode } from '@dnd-kit/core/dist/hooks/utilities'; + import type { GitStatusEntry } from '@yaakapp-internal/git'; import { useGit } from '@yaakapp-internal/git'; import type { @@ -12,7 +12,6 @@ import type { import classNames from 'classnames'; import { useCallback, useMemo, useState } from 'react'; import { modelToYaml } from '../../lib/diffYaml'; -import { isSubEnvironment } from '../../lib/model_util'; import { resolvedModelName } from '../../lib/resolvedModelName'; import { showErrorToast } from '../../lib/toast'; import { Banner } from '../core/Banner'; diff --git a/src-web/components/git/GitDropdown.tsx b/src-web/components/git/GitDropdown.tsx index e80ba731..210c8452 100644 --- a/src-web/components/git/GitDropdown.tsx +++ b/src-web/components/git/GitDropdown.tsx @@ -75,7 +75,7 @@ function SyncDropdownWithSyncDir({ syncDir }: { syncDir: string }) { const currentBranch = status.data.headRefShorthand; const hasChanges = status.data.entries.some((e) => e.status !== 'current'); - const hasRemotes = (status.data.origins ?? []).length > 0; + const _hasRemotes = (status.data.origins ?? []).length > 0; const { ahead, behind } = status.data; const tryCheckout = (branch: string, force: boolean) => { diff --git a/src-web/lib/theme/window.ts b/src-web/lib/theme/window.ts index a5dd5939..ed54758c 100644 --- a/src-web/lib/theme/window.ts +++ b/src-web/lib/theme/window.ts @@ -138,7 +138,7 @@ function bannerColorVariables(color: YaakColor | null): Partial { }; } -function inputCSS(color: YaakColor | null): Partial { +function _inputCSS(color: YaakColor | null): Partial { if (color == null) return {}; const theme: Partial = {