Skip to content

Commit

Permalink
patch: apply drizzle eslint rules to ctx.db (#1891)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecmdrunner committed May 17, 2024
1 parent 8e3866c commit 4236f0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-snakes-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": patch
---

Apply drizzle rules for `ctx.db` object in tRPC context
4 changes: 2 additions & 2 deletions cli/src/installers/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ const getEslintConfig = ({ usingDrizzle }: { usingDrizzle: boolean }) => {
...eslintConfig.rules,
"drizzle/enforce-delete-with-where": [
"error",
{ drizzleObjectName: ["db"] },
{ drizzleObjectName: ["db", "ctx.db"] },
],
"drizzle/enforce-update-with-where": [
"error",
{ drizzleObjectName: ["db"] },
{ drizzleObjectName: ["db", "ctx.db"] },
],
};
}
Expand Down

0 comments on commit 4236f0d

Please sign in to comment.