fix: resolve all lint errors across source and test files
- 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user