mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-22 12:41:31 +10:00
Update ESLint configuration and schemas to use Zod library
- Changed ESLint configuration to target TypeScript files and added parser options for better integration. - Updated various schemas across the application to replace `nestjs-zod/z` imports with `zod` for consistency. - Refactored password validation in authentication schemas to use `z.string()` instead of `z.password()`. - Enhanced date handling in user and resume schemas by introducing a new `dateSchema` utility. - Updated `.ncurc.json` to target minor upgrades for dependencies.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { defaultResumeData, idSchema, resumeDataSchema } from "@reactive-resume/schema";
|
||||
import { dateSchema } from "@reactive-resume/utils";
|
||||
import { createZodDto } from "nestjs-zod/dto";
|
||||
import { z } from "nestjs-zod/z";
|
||||
import { z } from "zod";
|
||||
|
||||
import { userSchema } from "../user";
|
||||
|
||||
@ -13,8 +14,8 @@ export const resumeSchema = z.object({
|
||||
locked: z.boolean().default(false),
|
||||
userId: idSchema,
|
||||
user: userSchema.optional(),
|
||||
createdAt: z.date().or(z.dateString()),
|
||||
updatedAt: z.date().or(z.dateString()),
|
||||
createdAt: dateSchema,
|
||||
updatedAt: dateSchema,
|
||||
});
|
||||
|
||||
export class ResumeDto extends createZodDto(resumeSchema) {}
|
||||
|
||||
Reference in New Issue
Block a user