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

@@ -114,5 +114,4 @@ app.delete("/:id", async (c) => {
return c.json({ success: true });
});
export { app as itemRoutes };

View File

@@ -1,5 +1,5 @@
import { and, asc, eq } from "drizzle-orm";
import { db as prodDb } from "../../db/index.ts";
import type { db as prodDb } from "../../db/index.ts";
import { categories, items } from "../../db/schema.ts";
type Db = typeof prodDb;

View File

@@ -1,4 +1,4 @@
import { and, eq, sql } from "drizzle-orm";
import { eq, sql } from "drizzle-orm";
import type { db as prodDb } from "../../db/index.ts";
import { categories, globalItems, items } from "../../db/schema.ts";
import { getOrCreateUncategorized } from "./category.service.ts";

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)

View File

@@ -359,9 +359,7 @@ export async function resolveThread(
.select()
.from(globalItems)
.where(eq(globalItems.id, candidate.globalItemId));
const fallbackName = gi
? `${gi.brand} ${gi.model}`
: candidate.name;
const fallbackName = gi ? `${gi.brand} ${gi.model}` : candidate.name;
insertValues = {
name: fallbackName,
globalItemId: candidate.globalItemId,

View File

@@ -1,4 +1,4 @@
import { and, eq, sql } from "drizzle-orm";
import { eq, sql } from "drizzle-orm";
import type { db as prodDb } from "../../db/index.ts";
import { categories, globalItems, items } from "../../db/schema.ts";