fix: resolve all lint errors across source and test files
Some checks failed
CI / ci (push) Failing after 11s
CI / e2e (push) Has been skipped

- Fix unused function parameters (prefix with _)
- Fix unused imports in test files
- Fix import ordering in test files
- Auto-fix formatting issues across 22 files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-06 19:39:47 +02:00
parent e19d40e232
commit 3638e7b240
18 changed files with 47 additions and 58 deletions

View File

@@ -1,7 +1,7 @@
import { and, count, eq, ilike, or, sql } from "drizzle-orm";
import type { SQL } from "drizzle-orm";
import { and, count, eq, ilike, or, sql } from "drizzle-orm";
import { db as prodDb } from "../../db/index.ts";
import { globalItemTags, globalItems, items, tags } from "../../db/schema.ts";
import { globalItems, globalItemTags, items, tags } from "../../db/schema.ts";
type Db = typeof prodDb;
@@ -22,10 +22,7 @@ export async function searchGlobalItems(
const escaped = query.replace(/%/g, "\\%").replace(/_/g, "\\_");
const pattern = `%${escaped}%`;
conditions.push(
or(
ilike(globalItems.brand, pattern),
ilike(globalItems.model, pattern),
)!,
or(ilike(globalItems.brand, pattern), ilike(globalItems.model, pattern))!,
);
}
@@ -59,10 +56,7 @@ export async function searchGlobalItems(
* Get a single global item by ID with the count of user items referencing it
* via items.globalItemId.
*/
export async function getGlobalItemWithOwnerCount(
db: Db = prodDb,
id: number,
) {
export async function getGlobalItemWithOwnerCount(db: Db = prodDb, id: number) {
const [item] = await db
.select()
.from(globalItems)