diff --git a/.changeset/violet-plums-sparkle.md b/.changeset/violet-plums-sparkle.md new file mode 100644 index 0000000000..bfe9b7d8cd --- /dev/null +++ b/.changeset/violet-plums-sparkle.md @@ -0,0 +1,5 @@ +--- +"create-t3-app": patch +--- + +Apply drizzle-orm lint rules for `db` keyword only diff --git a/cli/src/installers/eslint.ts b/cli/src/installers/eslint.ts index 706447d944..941d7604b9 100644 --- a/cli/src/installers/eslint.ts +++ b/cli/src/installers/eslint.ts @@ -28,8 +28,14 @@ const getEslintConfig = ({ usingDrizzle }: { usingDrizzle: boolean }) => { eslintConfig.rules = { ...eslintConfig.rules, - "drizzle/enforce-delete-with-where": "error", - "drizzle/enforce-update-with-where": "error", + "drizzle/enforce-delete-with-where": [ + "error", + { drizzleObjectName: ["db"] }, + ], + "drizzle/enforce-update-with-where": [ + "error", + { drizzleObjectName: ["db"] }, + ], }; } return eslintConfig;