♡🔮cynthia🐾♡
TTCTheo's Typesafe Cult
•Created by ♡🔮cynthia🐾♡ on 7/8/2023 in #questions
shortest import path with eslint + tsconfig.json paths
Is there any way to configure eslint (I am using
eslint-plugin-import
+ eslint-import-resolver-typescript
as well) to use the shortest import between my "absolute" path configured in my tsconfig, and just the relative path? For example if I have "src/*": ["./src/*"]
defined in my paths, I want the linter to pick src/components/myComponent/MyComponent
over ../../../components/myComponent/MyComponent
, but pick ./MyComponent
over src/components/myComponent/MyComponent
. Thx2 replies
TTCTheo's Typesafe Cult
•Created by ♡🔮cynthia🐾♡ on 6/23/2023 in #questions
Problems with Turborepo + Prisma Data Proxy / Edge Client
I'm not 100% sure if this is a Turborepo problem or not but my guess is that it is. I have a Turborepo-based (pnpm too if that matters) monorepo setup for a tRPC + Next.js + Prisma project. I am using @prisma/client/edge (I've tried to replicate this issue without the data proxy, but it doesn't work using prisma in my next middleware).
Error message in server console:
I have tried with and without
@prisma/nextjs-monorepo-workaround-plugin
, doesn't seem to make a difference.2 replies
TTCTheo's Typesafe Cult
•Created by ♡🔮cynthia🐾♡ on 6/11/2023 in #questions
App dir + tRPC +
Hi, I am setting up a project with [[email protected] + /app + tRPC (v10.27.1) + @tanstack/react-query (v5.0.0-alpha.58)], and I had a few questions about how this all works with the app directory.
I saw that with the /pages directory, you would use the hoc trpc.withTRPC, a <trpc.Provider client={...}>, and a <QueryClientProvider client={...}> to pass the tRPC to the rest of the app, but in my project I see a trpc/client.ts which seems to create a similar client to above but uses experimental_createTRPCNextAppDirClient.
Firstly, how do client calls to tRPC work without setting up any context (unless I'm missing something) and what is experimental_createTRPCNextAppDirClient doing?
Secondly, I'm just curious about how I setup react query with this whole setup.
Apologies if this has already been answered or if I'm missing something obvious (I've tried reading a lot of documentation for tRPC and React Query but I couldn't find much useful for the app dir and figured I'd come here), thanks!
21 replies