-
Notifications
You must be signed in to change notification settings - Fork 472
Javascript Drizzle ORM Raw SQL #3628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
@p4p3r If you have a moment to review, I'd appreciate. It's a rule request from the folks at Replit! |
dismissing so I can mark up some of the linter output
- patterns: | ||
- pattern-either: | ||
- pattern-inside: | | ||
const { sql } = require('drizzle-orm') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicit const/var/let
here necessitates coverage of the other two, unless you are certain that this will only ever be a const
import. Not making this change will cause CI to throw linter errors on this rule.
- patterns: | ||
- pattern-either: | ||
- pattern-inside: | | ||
const $DRIZZLE = require('drizzle-orm') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
import { sql as $ALIAS } from 'drizzle-orm' | ||
... | ||
- pattern-inside: | | ||
const { sql: $ALIAS } = require('drizzle-orm') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
This PR adds rules to prevent string concatenation in query when using Drizzle ORM
raw()
function.Reference: https://orm.drizzle.team/docs/sql#sqlraw