Skip to content

Commit 4236f0d

Browse files
authored
patch: apply drizzle eslint rules to ctx.db (#1891)
1 parent 8e3866c commit 4236f0d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/dirty-snakes-rescue.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-t3-app": patch
3+
---
4+
5+
Apply drizzle rules for `ctx.db` object in tRPC context

cli/src/installers/eslint.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ const getEslintConfig = ({ usingDrizzle }: { usingDrizzle: boolean }) => {
3030
...eslintConfig.rules,
3131
"drizzle/enforce-delete-with-where": [
3232
"error",
33-
{ drizzleObjectName: ["db"] },
33+
{ drizzleObjectName: ["db", "ctx.db"] },
3434
],
3535
"drizzle/enforce-update-with-where": [
3636
"error",
37-
{ drizzleObjectName: ["db"] },
37+
{ drizzleObjectName: ["db", "ctx.db"] },
3838
],
3939
};
4040
}

0 commit comments

Comments
 (0)