chore: auto-fix Biome formatting and configure lint rules
All checks were successful
CI / ci (push) Successful in 15s

Run biome check --write --unsafe to fix tabs, import ordering, and
non-null assertions across entire codebase. Disable a11y rules not
applicable to this single-user app. Exclude auto-generated routeTree.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 19:51:34 +01:00
parent 4d0452b7b3
commit b496462df5
63 changed files with 4752 additions and 4672 deletions

View File

@@ -3,11 +3,11 @@ import { drizzle } from "drizzle-orm/bun-sqlite";
import * as schema from "../../src/db/schema.ts";
export function createTestDb() {
const sqlite = new Database(":memory:");
sqlite.run("PRAGMA foreign_keys = ON");
const sqlite = new Database(":memory:");
sqlite.run("PRAGMA foreign_keys = ON");
// Create tables matching the Drizzle schema
sqlite.run(`
// Create tables matching the Drizzle schema
sqlite.run(`
CREATE TABLE categories (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL UNIQUE,
@@ -16,7 +16,7 @@ export function createTestDb() {
)
`);
sqlite.run(`
sqlite.run(`
CREATE TABLE items (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
@@ -31,7 +31,7 @@ export function createTestDb() {
)
`);
sqlite.run(`
sqlite.run(`
CREATE TABLE threads (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
@@ -43,7 +43,7 @@ export function createTestDb() {
)
`);
sqlite.run(`
sqlite.run(`
CREATE TABLE thread_candidates (
id INTEGER PRIMARY KEY AUTOINCREMENT,
thread_id INTEGER NOT NULL REFERENCES threads(id) ON DELETE CASCADE,
@@ -59,7 +59,7 @@ export function createTestDb() {
)
`);
sqlite.run(`
sqlite.run(`
CREATE TABLE setups (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
@@ -68,7 +68,7 @@ export function createTestDb() {
)
`);
sqlite.run(`
sqlite.run(`
CREATE TABLE setup_items (
id INTEGER PRIMARY KEY AUTOINCREMENT,
setup_id INTEGER NOT NULL REFERENCES setups(id) ON DELETE CASCADE,
@@ -76,19 +76,19 @@ export function createTestDb() {
)
`);
sqlite.run(`
sqlite.run(`
CREATE TABLE settings (
key TEXT PRIMARY KEY,
value TEXT NOT NULL
)
`);
const db = drizzle(sqlite, { schema });
const db = drizzle(sqlite, { schema });
// Seed default Uncategorized category
db.insert(schema.categories)
.values({ name: "Uncategorized", icon: "package" })
.run();
// Seed default Uncategorized category
db.insert(schema.categories)
.values({ name: "Uncategorized", icon: "package" })
.run();
return db;
return db;
}