Skip to content

Commit 0cc9136

Browse files
committed
refactor: remove unused type imports and suppress eslint warnings for 'any' usage
1 parent 59bec6f commit 0cc9136

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

services/backend/src/db/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function generateSchema(dialect: 'sqlite' | 'postgres'): AnySchema {
5353
const generatedSchema: AnySchema = {};
5454

5555
// Create enum for PostgreSQL auth_type
56+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5657
let authTypeEnum: any = null;
5758
if (dialect === 'postgres') {
5859
authTypeEnum = pgEnum('auth_type', authTypeEnumValues);
@@ -331,6 +332,7 @@ export function getSchema(): AnySchema {
331332

332333
// Helper function to safely execute database operations with proper typing
333334
export function executeDbOperation<T>(
335+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
334336
operation: (db: any, schema: any) => Promise<T> | T
335337
): Promise<T> | T {
336338
const db = getDb();

services/backend/src/lib/lucia.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import type { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
99
// These types would ideally be more specific, generated by Drizzle or manually defined
1010
// to match your authUserTable, authSessionTable structures.
1111
// For now, using 'any' as a placeholder based on db/index.ts AnySchema.
12+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1213
type AuthUserTable = any;
14+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1315
type AuthSessionTable = any;
1416

1517
// Cached instances for lazy initialization

services/backend/src/routes/auth/github.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import type { FastifyInstance, FastifyReply } from 'fastify';
23
import { getLucia, getGithubAuth } from '../../lib/lucia';
3-
import { GithubCallbackSchema, type GithubCallbackInput } from './schemas';
4+
import { type GithubCallbackInput } from './schemas';
45
import { getDb, getSchema } from '../../db';
56
import { eq } from 'drizzle-orm';
67
import { generateId } from 'lucia';

services/backend/src/routes/auth/loginEmail.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { FastifyInstance, FastifyReply } from 'fastify';
22
import { getLucia } from '../../lib/lucia'; // Corrected import
3-
import { LoginEmailSchema, type LoginEmailInput } from './schemas';
3+
import { type LoginEmailInput } from './schemas';
44
// argon2 is not directly used here as lucia.useKey handles password verification
55
import { verify } from '@node-rs/argon2';
66
import { getDb, getSchema } from '../../db';
@@ -23,6 +23,7 @@ export default async function loginEmailRoute(fastify: FastifyInstance) {
2323
}
2424

2525
// Find user by email or username
26+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2627
const users = await (db as any)
2728
.select()
2829
.from(authUserTable)

services/backend/src/routes/auth/registerEmail.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import type { FastifyInstance, FastifyReply } from 'fastify';
23
import { getLucia } from '../../lib/lucia';
3-
import { RegisterEmailSchema, type RegisterEmailInput } from './schemas';
4+
import { type RegisterEmailInput } from './schemas';
45
import { getDb, getSchema } from '../../db';
56
import { eq, or } from 'drizzle-orm';
67
import { generateId } from 'lucia'; // Lucia's utility for generating IDs

0 commit comments

Comments
 (0)