eslint fixes

This commit is contained in:
wobsoriano
2022-11-05 11:56:14 -07:00
parent e9081d00ad
commit e359702c41
7 changed files with 25 additions and 25 deletions

View File

@@ -5,19 +5,19 @@ import type { Context } from './context'
const t = initTRPC.context<Context>().create({
transformer: superjson,
errorFormatter({ shape, error }) {
errorFormatter ({ shape, error }) {
return {
...shape,
data: {
...shape.data,
zodError:
error.code === 'BAD_REQUEST'
&& error.cause instanceof ZodError
error.code === 'BAD_REQUEST' &&
error.cause instanceof ZodError
? error.cause!.flatten()
: null,
},
: null
}
}
},
}
})
/**