omar-dulaimi / prisma-trpc-generator

Prisma 2+ generator to emit fully implemented tRPC routers
MIT License
676 stars 34 forks source link

Import only type of Context #77

Closed MilanJ88 closed 1 year ago

MilanJ88 commented 1 year ago

Context is only used as a type import in the generated createRouter file (export const t = trpc.initTRPC.context<Context>().create();) which generates an ESLint warning (@typescript-eslint/consistent-type-imports) for me. I think this PR should fix it but I didn't look into it much further so please confirm for yourself if this PR actually fixes the problem.

omar-dulaimi commented 1 year ago

It should work fine based on the eslint page description. Thank you for this PR!

omar-dulaimi commented 1 year ago

Released in https://github.com/omar-dulaimi/prisma-trpc-generator/releases/tag/1.4.1