chore(lint): biome cleanup across services — format, sort imports, drop unused

- discord-gateway: 74 lint errors -> 0 (format, import sorting, unused
  imports/vars, dead breath var)
- backend: format + sort imports (11 warnings left: noExplicitAny)
- frontend: remove unused imports, drop dead breathing var, fix
  useExhaustiveDependencies (scroll keyed on messages), a11y biome-ignore
  for drag surface + stopPropagation container (mouse-only gestures)
- remaining warnings are false positives: index keys on static lists,
  <img> in static export (next/image unsupported), noExplicitAny

tsc --noEmit clean on all 3 services; vitest green (60+36).
This commit is contained in:
asepharyana
2026-08-01 22:09:02 +07:00
parent 2357421841
commit 6293d588bc
123 changed files with 466 additions and 308 deletions
@@ -1,6 +1,6 @@
import { createChildLogger } from "../logger/index.js";
import { drizzle } from "drizzle-orm/node-postgres";
import type { Pool, PoolClient } from "pg";
import { createChildLogger } from "../logger/index.js";
import { closePool, createPoolFromConfig } from "./pool.js";
const logger = createChildLogger("database.init");
@@ -1,10 +1,10 @@
import "dotenv/config";
import { readFile } from "node:fs/promises";
import { join } from "node:path";
import { createChildLogger } from "@/shared/logger/index";
import { drizzle as drizzlePostgres } from "drizzle-orm/node-postgres";
import { migrate as migratePostgres } from "drizzle-orm/node-postgres/migrator";
import type { PoolClient } from "pg";
import { createChildLogger } from "@/shared/logger/index";
import {
closeDatabase,
initializeDatabase,
@@ -595,8 +595,7 @@ export type DbRetentionPolicyInsert =
// Chatbot Messages
export type ChatbotMessage = typeof chatbotMessagesTable.$inferSelect;
export type ChatbotMessageInsert =
typeof chatbotMessagesTable.$inferInsert;
export type ChatbotMessageInsert = typeof chatbotMessagesTable.$inferInsert;
// =============================================================================
// Moderation Actions (gateway-local)
@@ -1,8 +1,3 @@
import {
pgAttachmentsTable,
pgMessageReviewsTable,
pgMessagesTable,
} from "../../../shared/index.js";
import {
bigint as pgBigint,
boolean as pgBoolean,
@@ -11,6 +6,11 @@ import {
text as pgText,
uuid as pgUuid,
} from "drizzle-orm/pg-core";
import {
pgAttachmentsTable,
pgMessageReviewsTable,
pgMessagesTable,
} from "../../../shared/index.js";
// Re-export shared message/attachment/review tables
export { pgAttachmentsTable, pgMessageReviewsTable, pgMessagesTable };
@@ -25,5 +25,4 @@ export type UIStateInsert = typeof uiStateTable.$inferInsert;
export type RetentionPolicy = typeof retentionPoliciesTable.$inferSelect;
export type RetentionPolicyInsert = typeof retentionPoliciesTable.$inferInsert;
export type ChatbotMessage = typeof chatbotMessagesTable.$inferSelect;
export type ChatbotMessageInsert =
typeof chatbotMessagesTable.$inferInsert;
export type ChatbotMessageInsert = typeof chatbotMessagesTable.$inferInsert;
@@ -1,5 +1,5 @@
import { createChildLogger } from "@/shared/logger/index";
import { desc, eq } from "drizzle-orm";
import { createChildLogger } from "@/shared/logger/index";
import { getDatabase } from "./drizzle.js";
import {
type VoiceRecording,