I use the Repository Pattern to wrap the code that uses Drizzle ORM.
The name of the repository contains that name of the model, and therefore, Drizzle ESLint thinks I access the model, which is wrong.
Code example:
// schema.ts
export const websites = pgTable('websites', {
id: varchar('id', { length: 128 }).primaryKey(),
});
// app.ts
WebsiteRepository.delete(1); // ESLint: Without `.where(...)` you will delete all the rows in a table. If you didn't want to do it, please use `WebsiteRepository.delete(...).where(...)` instead. Otherwise you can ignore this rule here(drizzle/enforce-delete-with-where)
What version of
drizzle-orm
are you using?0.31.0
What version of
drizzle-kit
are you using?0.22.1
Describe the Bug
I use the Repository Pattern to wrap the code that uses Drizzle ORM.
The name of the repository contains that name of the model, and therefore, Drizzle ESLint thinks I access the model, which is wrong.
Code example:
Expected behavior
The error should not be triggered.
Environment & setup
No response