Resolve remaining biome lint and formatting errors
This commit is contained in:
1 parent
1df1ffc3e9
commit
6ea0ec7d99
7 files changed
+26
-15
No files matched your search
+12
@@ -28,6 +28,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"includes": ["**/*.test.ts", "**/*.test.tsx"],
|
||||||
|
"linter": {
|
||||||
|
"rules": {
|
||||||
|
"suspicious": {
|
||||||
|
"noExplicitAny": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"css": {
|
"css": {
|
||||||
"parser": {
|
"parser": {
|
||||||
"tailwindDirectives": true
|
"tailwindDirectives": true
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
|
|||||||
const mockRedirect = vi.hoisted(() =>
|
const mockRedirect = vi.hoisted(() =>
|
||||||
vi.fn((url: string) => {
|
vi.fn((url: string) => {
|
||||||
const err = new Error(`NEXT_REDIRECT: ${url}`);
|
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;;`;
|
(err as any).digest = `NEXT_REDIRECT;replace;${url};307;;`;
|
||||||
throw err;
|
throw err;
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -139,9 +139,13 @@ html {
|
|||||||
*,
|
*,
|
||||||
*::before,
|
*::before,
|
||||||
*::after {
|
*::after {
|
||||||
|
/* biome-ignore lint/complexity/noImportantStyles: must override any animation/transition for prefers-reduced-motion */
|
||||||
animation-duration: 0.01ms !important;
|
animation-duration: 0.01ms !important;
|
||||||
|
/* biome-ignore lint/complexity/noImportantStyles: must override any animation/transition for prefers-reduced-motion */
|
||||||
animation-iteration-count: 1 !important;
|
animation-iteration-count: 1 !important;
|
||||||
|
/* biome-ignore lint/complexity/noImportantStyles: must override any animation/transition for prefers-reduced-motion */
|
||||||
transition-duration: 0.01ms !important;
|
transition-duration: 0.01ms !important;
|
||||||
|
/* biome-ignore lint/complexity/noImportantStyles: must override any behavior for prefers-reduced-motion */
|
||||||
scroll-behavior: auto !important;
|
scroll-behavior: auto !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,7 @@
|
|||||||
|
|
||||||
import { Loader2, Package, Pencil, Plus, Trash2 } from "lucide-react";
|
import { Loader2, Package, Pencil, Plus, Trash2 } from "lucide-react";
|
||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
import {
|
import { createBcItem, deleteBcItem, updateBcItem } from "@/actions/catalog-bc";
|
||||||
createBcItem,
|
|
||||||
deleteBcItem,
|
|
||||||
updateBcItem,
|
|
||||||
} from "@/actions/catalog-bc";
|
|
||||||
import { useConfirmDialog } from "@/components/admin/confirm-dialog";
|
import { useConfirmDialog } from "@/components/admin/confirm-dialog";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import {
|
import {
|
||||||
@@ -124,7 +120,9 @@ export function BcItemsEditor({ pageId, canEdit }: BcItemsEditorProps) {
|
|||||||
<TableHead className="text-xs">Item IDs</TableHead>
|
<TableHead className="text-xs">Item IDs</TableHead>
|
||||||
<TableHead className="text-xs w-20">Order</TableHead>
|
<TableHead className="text-xs w-20">Order</TableHead>
|
||||||
<TableHead className="text-xs">Extra Data</TableHead>
|
<TableHead className="text-xs">Extra Data</TableHead>
|
||||||
{canEdit && <TableHead className="text-xs w-20">Actions</TableHead>}
|
{canEdit && (
|
||||||
|
<TableHead className="text-xs w-20">Actions</TableHead>
|
||||||
|
)}
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
@@ -137,9 +135,7 @@ export function BcItemsEditor({ pageId, canEdit }: BcItemsEditorProps) {
|
|||||||
<TableCell className="text-xs font-mono text-muted-foreground">
|
<TableCell className="text-xs font-mono text-muted-foreground">
|
||||||
{item.itemIds}
|
{item.itemIds}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell className="text-xs">
|
<TableCell className="text-xs">{item.orderNumber}</TableCell>
|
||||||
{item.orderNumber}
|
|
||||||
</TableCell>
|
|
||||||
<TableCell className="text-xs text-muted-foreground max-w-32 truncate">
|
<TableCell className="text-xs text-muted-foreground max-w-32 truncate">
|
||||||
{item.extradata || "\u2014"}
|
{item.extradata || "\u2014"}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ import { useCallback, useEffect, useMemo, useState } from "react";
|
|||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { updateCatalogPage } from "@/actions/catalog";
|
import { updateCatalogPage } from "@/actions/catalog";
|
||||||
import { updateBcPage } from "@/actions/catalog-bc";
|
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 {
|
import {
|
||||||
type CatalogItemData,
|
type CatalogItemData,
|
||||||
CatalogItemsTable,
|
CatalogItemsTable,
|
||||||
} from "@/components/admin/catalog/catalog-items-table";
|
} from "@/components/admin/catalog/catalog-items-table";
|
||||||
import { CatalogTranslateTab } from "@/components/admin/catalog/catalog-translate-tab";
|
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 { IconPicker } from "@/components/admin/catalog/icon-picker";
|
||||||
import { QuickAddFurni } from "@/components/admin/catalog/quick-add-furni";
|
import { QuickAddFurni } from "@/components/admin/catalog/quick-add-furni";
|
||||||
import { AutoOrganize } from "@/components/admin/catalog-manager/auto-organize";
|
import { AutoOrganize } from "@/components/admin/catalog-manager/auto-organize";
|
||||||
@@ -420,7 +420,7 @@ function InlineEditorSession({
|
|||||||
{t("preview.title")}
|
{t("preview.title")}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Dirty banner */}
|
{/* Dirty banner */}
|
||||||
|
|||||||
@@ -809,8 +809,9 @@ export function SortableTree({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const activeNode = activeId ? flatItems.find((n) => n.id === activeId) : null;
|
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(
|
const getItemProps = useCallback(
|
||||||
(node: FlatTreeNode): Omit<TreeItemProps, "sortMode" | "isOverlay"> => ({
|
(node: FlatTreeNode): Omit<TreeItemProps, "sortMode" | "isOverlay"> => ({
|
||||||
node,
|
node,
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// @vitest-environment node
|
// @vitest-environment node
|
||||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
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;
|
type AnyFn = (...args: any[]) => any;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
|||||||
Reference in new issue
Block a user