Giter Club home page Giter Club logo

Comments (4)

arjunyel avatar arjunyel commented on June 13, 2024 1

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.

LightBounded avatar LightBounded commented on June 13, 2024

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"
image

from drizzle-orm.

mrfigg avatar mrfigg commented on June 13, 2024

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.

Vishtar avatar Vishtar commented on June 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.