Comments (4)
Optionally, you can define a drizzleObjectName in the plugin options that accept a string or string[]. This is useful when you have objects or classes with a delete method thatβs not from Drizzle. Such a delete method will trigger the ESLint rule. To avoid that, you can define the name of the Drizzle object that you use in your codebase (like db) so that the rule would only trigger if the delete method comes from this object
https://orm.drizzle.team/docs/eslint-plugin#enforce-delete-with-where
from drizzle-orm.
Getting this issue too but with when using a tRPC procedure. Looks like it looks for a method called "delete" and ensures that the subsequently chained method is called "where"
from drizzle-orm.
Bumping because I get the same issue as OP, also when using a vanilla JS Map instance.
[email protected]
[email protected]
[email protected]
from drizzle-orm.
The same.
With Express.js:
import express from 'express'
const adminRouter = express.Router()
adminRouter.delete('/channel', channelDelete) // drizzle/enforce-delete-with-where
With @elastic/elasticsearch:
async function deleteIndex(indexName) {
await (await client).indices.delete({ index: indexName }) // drizzle/enforce-delete-with-where
}
"drizzle-orm": "^0.30.1"
"drizzle-kit": "^0.20.14"
"eslint-plugin-drizzle": "^0.2.3"
from drizzle-orm.
Related Issues (20)
- [BUG]: Circular reference causes type to become `any` HOT 1
- [BUG]: D1 too many SQL variables at offset
- [FEATURE]:Better types HOT 1
- [BUG]: Turso Introspection is empty
- [BUG]:SQL index against reserved column names omit quotes
- [BUG]: drizzle-kit hardcodes the schema into the migration file
- [BUG]: null value in column "XXX" of relation "YYY" violates not-null constraint HOT 1
- [FEATURE]: Merge conflicting migrations
- [FEATURE]: drizzle-kit migration missing relevation info on unsupported SQLite feature
- [FEATURE]: Multiple union / unionAll
- [FEATURE]: Eslint flat config
- [BUG]: Timestamp with null default, workaround quoted does not cater for generated SQL and errors in live prod mysql of my hosting provider HOT 1
- [BUG]: using any Drizzle-zod function in Workerd's (CFW runtime) would crash HOT 1
- [FEATURE]: drizzle-zod output to static files
- [BUG]: Partial Insert returning expected 0 arguments
- [BUG]: issue while building the project HOT 1
- [FEATURE]: explain analyse
- [BUG]: Relations inconsistent to what defined in schema and what is generated.
- [BUG]: Dark Themes Stopped Working HOT 1
- [BUG]:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drizzle-orm.