Currently, type imports in server files are inconsistent: some import types from "server/db", while others use imports directly from generated Prisma files (e.g., "...generated/prisma..."). This inconsistency could cause maintainability issues and confusion for contributors.
Task:
- Identify all type imports in server-side code (especially those related to database types).
- Standardize all server files to import types from a single source (preferably from "server/db").
- Update all relevant files to use the unified import path.
Acceptance Criteria:
- All server files reference types from either "server/db" or consistently from the chosen path.
- No direct imports from generated Prisma files unless absolutely necessary (with a strong justification).
- Brief documentation or code comment explaining the standard, if needed.
Example of current mixed import:
import type { db as appDb } from "~/server/db";
// elsewhere:
import type { Prisma } from "@prisma/client";
Benefits:
- Improves code consistency and maintainability
- Reduces risk of mismatches and breaking changes from Prisma updates
Please track files updated in the PR description or commit message.
Currently, type imports in server files are inconsistent: some import types from "server/db", while others use imports directly from generated Prisma files (e.g., "...generated/prisma..."). This inconsistency could cause maintainability issues and confusion for contributors.
Task:
Acceptance Criteria:
Example of current mixed import:
Benefits:
Please track files updated in the PR description or commit message.