Skip to content

Commit

Permalink
add comment as to why eslint-disable for no misuse promises is added
Browse files Browse the repository at this point in the history
  • Loading branch information
codemist committed Aug 29, 2024
1 parent 8a19403 commit 0c7ad96
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/db/tables/subscribers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,15 @@ async function getSubscribersWaitingForMonthlyEmail(
let query = knex("subscribers")
.select()
// Only send to users who haven't opted out of the monthly activity email...
// It looks like Knex's `.where` type definition doesn't accept Promise-returning
// eslint-disable-next-line @typescript-eslint/no-misused-promises
.where((builder) =>
builder
.whereNull("monthly_monitor_report")
.orWhere("monthly_monitor_report", true),
)
// ...who haven't received the email in the last 1 month...
// It looks like Knex's `.where` type definition doesn't accept Promise-returning
// eslint-disable-next-line @typescript-eslint/no-misused-promises
.andWhere((builder) =>
builder
Expand Down

0 comments on commit 0c7ad96

Please sign in to comment.