From 6ea0ec7d99fd34f0e7b61b32d9486343be8898bf Mon Sep 17 00:00:00 2001 From: openhands Date: Mon, 14 Sep 2026 17:43:54 +0200 Subject: [PATCH] Resolve remaining biome lint and formatting errors --- biome.json | 12 ++++++++++++ src/actions/twofactor.test.ts | 1 - src/app/globals.css | 4 ++++ .../admin/catalog-manager/bc-items-editor.tsx | 16 ++++++---------- .../admin/catalog-manager/inline-editor.tsx | 6 +++--- .../admin/catalog-manager/sortable-tree.tsx | 3 ++- src/lib/services/clone-import.test.ts | 1 - 7 files changed, 27 insertions(+), 16 deletions(-) diff --git a/biome.json b/biome.json index b90c07c8..ca9f7925 100644 --- a/biome.json +++ b/biome.json @@ -28,6 +28,18 @@ } } }, + "overrides": [ + { + "includes": ["**/*.test.ts", "**/*.test.tsx"], + "linter": { + "rules": { + "suspicious": { + "noExplicitAny": "off" + } + } + } + } + ], "css": { "parser": { "tailwindDirectives": true diff --git a/src/actions/twofactor.test.ts b/src/actions/twofactor.test.ts index fb2239fa..2bb96399 100644 --- a/src/actions/twofactor.test.ts +++ b/src/actions/twofactor.test.ts @@ -4,7 +4,6 @@ import { beforeEach, describe, expect, it, vi } from "vitest"; const mockRedirect = vi.hoisted(() => vi.fn((url: string) => { const err = new Error(`NEXT_REDIRECT: ${url}`); - // biome-ignore lint/suspicious/noExplicitAny: Next.js redirect signature (err as any).digest = `NEXT_REDIRECT;replace;${url};307;;`; throw err; }), diff --git a/src/app/globals.css b/src/app/globals.css index 7dc55ced..5eb2cfa0 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -139,9 +139,13 @@ html { *, *::before, *::after { + /* biome-ignore lint/complexity/noImportantStyles: must override any animation/transition for prefers-reduced-motion */ animation-duration: 0.01ms !important; + /* biome-ignore lint/complexity/noImportantStyles: must override any animation/transition for prefers-reduced-motion */ animation-iteration-count: 1 !important; + /* biome-ignore lint/complexity/noImportantStyles: must override any animation/transition for prefers-reduced-motion */ transition-duration: 0.01ms !important; + /* biome-ignore lint/complexity/noImportantStyles: must override any behavior for prefers-reduced-motion */ scroll-behavior: auto !important; } } diff --git a/src/components/admin/catalog-manager/bc-items-editor.tsx b/src/components/admin/catalog-manager/bc-items-editor.tsx index 5797bce0..8a06a497 100644 --- a/src/components/admin/catalog-manager/bc-items-editor.tsx +++ b/src/components/admin/catalog-manager/bc-items-editor.tsx @@ -2,11 +2,7 @@ import { Loader2, Package, Pencil, Plus, Trash2 } from "lucide-react"; import { useCallback, useEffect, useState } from "react"; -import { - createBcItem, - deleteBcItem, - updateBcItem, -} from "@/actions/catalog-bc"; +import { createBcItem, deleteBcItem, updateBcItem } from "@/actions/catalog-bc"; import { useConfirmDialog } from "@/components/admin/confirm-dialog"; import { Button } from "@/components/ui/button"; import { @@ -124,7 +120,9 @@ export function BcItemsEditor({ pageId, canEdit }: BcItemsEditorProps) { Item IDs Order Extra Data - {canEdit && Actions} + {canEdit && ( + Actions + )} @@ -137,9 +135,7 @@ export function BcItemsEditor({ pageId, canEdit }: BcItemsEditorProps) { {item.itemIds} - - {item.orderNumber} - + {item.orderNumber} {item.extradata || "\u2014"} @@ -330,4 +326,4 @@ function BcItemDialog({ ); -} \ No newline at end of file +} diff --git a/src/components/admin/catalog-manager/inline-editor.tsx b/src/components/admin/catalog-manager/inline-editor.tsx index a2436310..69136b4d 100644 --- a/src/components/admin/catalog-manager/inline-editor.tsx +++ b/src/components/admin/catalog-manager/inline-editor.tsx @@ -16,13 +16,13 @@ import { useCallback, useEffect, useMemo, useState } from "react"; import { toast } from "sonner"; import { updateCatalogPage } from "@/actions/catalog"; import { updateBcPage } from "@/actions/catalog-bc"; +import { BulkImportItems } from "@/components/admin/catalog/bulk-import-items"; +import { CatalogImagePicker } from "@/components/admin/catalog/catalog-image-picker"; import { type CatalogItemData, CatalogItemsTable, } from "@/components/admin/catalog/catalog-items-table"; import { CatalogTranslateTab } from "@/components/admin/catalog/catalog-translate-tab"; -import { BulkImportItems } from "@/components/admin/catalog/bulk-import-items"; -import { CatalogImagePicker } from "@/components/admin/catalog/catalog-image-picker"; import { IconPicker } from "@/components/admin/catalog/icon-picker"; import { QuickAddFurni } from "@/components/admin/catalog/quick-add-furni"; import { AutoOrganize } from "@/components/admin/catalog-manager/auto-organize"; @@ -420,7 +420,7 @@ function InlineEditorSession({ {t("preview.title")} )} - + {/* Dirty banner */} diff --git a/src/components/admin/catalog-manager/sortable-tree.tsx b/src/components/admin/catalog-manager/sortable-tree.tsx index 8e92dc4a..1676c004 100644 --- a/src/components/admin/catalog-manager/sortable-tree.tsx +++ b/src/components/admin/catalog-manager/sortable-tree.tsx @@ -809,8 +809,9 @@ export function SortableTree({ }; const activeNode = activeId ? flatItems.find((n) => n.id === activeId) : null; -const noop = () => {}; + const noop = () => {}; + // biome-ignore lint/correctness/useExhaustiveDependencies: intentionally partial deps (matching the eslint-disable-line below) const getItemProps = useCallback( (node: FlatTreeNode): Omit => ({ node, diff --git a/src/lib/services/clone-import.test.ts b/src/lib/services/clone-import.test.ts index a2f52623..edf1c46e 100644 --- a/src/lib/services/clone-import.test.ts +++ b/src/lib/services/clone-import.test.ts @@ -1,7 +1,6 @@ // @vitest-environment node import { beforeEach, describe, expect, it, vi } from "vitest"; -// biome-ignore lint/suspicious/noExplicitAny: test helper for mocking with arbitrary signatures type AnyFn = (...args: any[]) => any; const {