Skip to content

Commit

Permalink
[docs] Fix eslint config in compatibility (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
maruware authored Jan 16, 2024
1 parent 3e66da5 commit 7d17941
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 21 deletions.
10 changes: 6 additions & 4 deletions docs/compatibility/node-postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ Second, add the following rule to your ESLint config:
"connections": [
{
// ...
"targets": {
// The name of the wrapper that should be checked:
"wrapper": "client.query",
}
"targets": [
{
// The name of the wrapper that should be checked:
"wrapper": "client.query",
}
]
}
]
}
Expand Down
16 changes: 9 additions & 7 deletions docs/compatibility/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ Second, add the following rule to your ESLint config:
{
// The migrations path:
"migrationsDir": "./prisma/migrations",
"targets": {
// The sql tags that should be checked.
// either `db.$queryRaw` or `db.$executeRaw`:
"tag": "prisma.+($queryRaw|$executeRaw)",
// Transform the query result to array
"transform": "{type}[]"
}
"targets": [
{
// The sql tags that should be checked.
// either `db.$queryRaw` or `db.$executeRaw`:
"tag": "prisma.+($queryRaw|$executeRaw)",
// Transform the query result to array
"transform": "{type}[]"
}
]
}
]
}
Expand Down
6 changes: 3 additions & 3 deletions docs/compatibility/sequelize.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ Second, add the following rule to your ESLint config:
{
// ...

"targets": {
"targets": [
{
// The name of the wrapper that should be checked:
"wrapper": "sequelize.query",
}
}
]
}
]
}
]
}
Expand Down
16 changes: 9 additions & 7 deletions docs/compatibility/slonik.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ Second, add the following rule to your ESLint config:
"connections": [
{
// ...
"targets": {
// The name of the tag that should be checked:
"tag": "sql.+(type\\(*\\)|unsafe)",
// this will tell safeql to not suggest type annotations
// since we will be using our Zod schemas in slonik
"skipTypeAnnotations": true
}
"targets": [
{
// The name of the tag that should be checked:
"tag": "sql.+(type\\(*\\)|unsafe)",
// this will tell safeql to not suggest type annotations
// since we will be using our Zod schemas in slonik
"skipTypeAnnotations": true
}
]
}
]
}
Expand Down

1 comment on commit 7d17941

@vercel
Copy link

@vercel vercel bot commented on 7d17941 Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.