Skip to content

Commit 1f505d8

Browse files
committed
fix lint/types
1 parent ac27899 commit 1f505d8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

app/entry.server.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const ABORT_DELAY = 5000
2121
initEnv()
2222
global.ENV = getEnv()
2323

24-
initCron()
24+
void initCron()
2525

2626
type DocRequestArgs = Parameters<HandleDocumentRequestFunction>
2727

app/utils/cron.server.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ const cronIntervalRef = remember<{
1616
current: ReturnType<typeof setIntervalAsync> | null
1717
}>('cronInterval', () => ({ current: null }))
1818

19-
export function init() {
19+
export async function init() {
2020
console.log('initializing cron interval')
21-
if (cronIntervalRef.current) clearIntervalAsync(cronIntervalRef.current)
21+
if (cronIntervalRef.current) await clearIntervalAsync(cronIntervalRef.current)
2222

2323
cronIntervalRef.current = setIntervalAsync(
24-
() => sendNextTexts().catch(err => console.error(err)),
24+
() => sendNextTexts().catch((err) => console.error(err)),
2525
1000 * 5,
2626
)
2727
}
@@ -43,7 +43,7 @@ export async function sendNextTexts() {
4343
})
4444

4545
const messagesToSend = recipients
46-
.map(recipient => {
46+
.map((recipient) => {
4747
const { scheduleCron, messages, lastRemindedAt } = recipient
4848
const lastMessage = messages[0]
4949
const interval = cronParser.parseExpression(scheduleCron, {
@@ -64,7 +64,7 @@ export async function sendNextTexts() {
6464
prev,
6565
}
6666
})
67-
.filter(r => r.due || r.remind)
67+
.filter((r) => r.due || r.remind)
6868

6969
if (!messagesToSend.length) return
7070

tests/setup/setup-test-env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ installGlobals()
1414
afterEach(() => server.resetHandlers())
1515
afterEach(() => cleanup())
1616

17-
export let consoleError: MockInstance<Parameters<(typeof console)['error']>>
17+
export let consoleError: MockInstance<(typeof console)['error']>
1818

1919
beforeEach(() => {
2020
const originalConsoleError = console.error

0 commit comments

Comments
 (0)