Add ESLint + Prettier + EditorConfig tooling at repo root

v1.0 Phase 1.1 — repo-wide lint/format baseline.

- eslint.config.mjs (flat config) lints server, client, shared
- .prettierrc.json, .prettierignore, .editorconfig, .nvmrc
- Root package.json holds shared devDeps; per-package scripts keep
  their typecheck + test runners
- Fix 7 lint issues surfaced by the baseline run:
  - TicketDetail.tsx: replace ternary-with-side-effects with if/else
  - admin/Users.tsx: escape apostrophe in JSX
  - errorHandler.ts: typed err as unknown with ErrorLike refinement
  - users.ts: Prisma.UserUpdateInput instead of Record<string, any>
  - seed.ts: drop unused goddard binding
- Run prettier across tracked sources for a clean formatting baseline
This commit is contained in:
2026-04-18 14:47:34 -04:00
parent 2a6090e473
commit 27d2ab0f0d
48 changed files with 14460 additions and 1096 deletions
+53 -53
View File
@@ -1,74 +1,74 @@
export type Role = 'ADMIN' | 'AGENT' | 'USER' | 'SERVICE'
export type TicketStatus = 'OPEN' | 'IN_PROGRESS' | 'RESOLVED' | 'CLOSED'
export type Role = 'ADMIN' | 'AGENT' | 'USER' | 'SERVICE';
export type TicketStatus = 'OPEN' | 'IN_PROGRESS' | 'RESOLVED' | 'CLOSED';
export interface User {
id: string
username: string
displayName: string
email: string
role: Role
apiKey?: string
createdAt?: string
id: string;
username: string;
displayName: string;
email: string;
role: Role;
apiKey?: string;
createdAt?: string;
}
export interface Category {
id: string
name: string
id: string;
name: string;
}
export interface CTIType {
id: string
name: string
categoryId: string
category?: Category
id: string;
name: string;
categoryId: string;
category?: Category;
}
export interface Item {
id: string
name: string
typeId: string
type?: CTIType & { category?: Category }
id: string;
name: string;
typeId: string;
type?: CTIType & { category?: Category };
}
export interface Comment {
id: string
body: string
ticketId: string
authorId: string
author: Pick<User, 'id' | 'username' | 'displayName'>
createdAt: string
id: string;
body: string;
ticketId: string;
authorId: string;
author: Pick<User, 'id' | 'username' | 'displayName'>;
createdAt: string;
}
export interface AuditLog {
id: string
ticketId: string
userId: string
action: string
detail: string | null
createdAt: string
user: Pick<User, 'id' | 'username' | 'displayName'>
id: string;
ticketId: string;
userId: string;
action: string;
detail: string | null;
createdAt: string;
user: Pick<User, 'id' | 'username' | 'displayName'>;
}
export interface Ticket {
id: string
displayId: string
title: string
overview: string
severity: number
status: TicketStatus
categoryId: string
typeId: string
itemId: string
assigneeId: string | null
createdById: string
resolvedAt: string | null
createdAt: string
updatedAt: string
category: Category
type: CTIType
item: Item
assignee: Pick<User, 'id' | 'username' | 'displayName'> | null
createdBy: Pick<User, 'id' | 'username' | 'displayName'>
comments?: Comment[]
_count?: { comments: number }
id: string;
displayId: string;
title: string;
overview: string;
severity: number;
status: TicketStatus;
categoryId: string;
typeId: string;
itemId: string;
assigneeId: string | null;
createdById: string;
resolvedAt: string | null;
createdAt: string;
updatedAt: string;
category: Category;
type: CTIType;
item: Item;
assignee: Pick<User, 'id' | 'username' | 'displayName'> | null;
createdBy: Pick<User, 'id' | 'username' | 'displayName'>;
comments?: Comment[];
_count?: { comments: number };
}