Setting up SafeQL for Prisma
I need help in setting up SafeQL for Prisma. I can't correctly configure my
eslint.config
and tsconfig
. This is my eslint.config.mjs
right now:
When I run npx eslint .
I get the following:
4 Replies
Hi @aith š
Can you please confirm that you've correctly installed the dependency
@ts-safeql/eslint-plugin
?
Also, have you taken a look at this section of the documentationConfiguration | SafeQL
Write SQL queries with confidence!
Hi. Yes, I have that installed. I also downgraded ESLint from v9 to v8 cause v9 was causing a lot of problems.
And this is my
eslintrc.js
When I run npx eslint .
I get this:
Nevermind, I just realised what I was doing lol. I didn't put @ts-safeql/check-sql
under the rules
.Okay I got this to work. The error is showing up as well. However, is there a way to have it be that I get the errors displayed as I type (like how it is done in the example video of SafeQL)? Right now, I have to type the query and then run the command for it to show me the error.
But I get the errors when I run the
npx eslint .
command: