index.ts
Function flattenErrors
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
Wontfix
function flattenErrors(result: z.SafeParseError<unknown>) {
return result.error.errors.reduce<Record<string, string>>(
(prev: Record<string, string>, next) => {
const result = { ...prev };
const key = next.path.join(".");