Fix pre-existing eslint unused-import errors to pass script/checks gate

Remove 20 no-unused-vars violations across 5 files:
- src/actions.ts: unused Subscription type import, getCronExpression
- src/alert.ts: unused cron-parser and @welshman/lib imports
- src/digest.ts: unused now, nth, nthEq, dateToSeconds, getIdFilters,
  getReplyFilters, Loader, AdapterContext, makeLoader, SocketAdapter,
  call, loadRelaySelections
- src/env.ts: unused netContext import
- src/worker/email.ts: assigned-but-unused purgeJob variable

These were pre-existing errors unrelated to the web UI removal.
This commit is contained in:
Agent 2026-09-10 10:36:54 -04:00
parent abc993e595
commit 2fb738981e
5 changed files with 2 additions and 15 deletions

View file

@ -1,6 +1,4 @@
import { instrument } from 'succinct-async'
import type { Subscription } from './alert.js'
import { getCronExpression } from './alert.js'
import * as mailer from './mailer.js'
import * as worker from './worker/index.js'
import * as db from './database.js'

View file

@ -1,5 +1,4 @@
import { CronExpressionParser } from 'cron-parser'
import { tryCatch, int, HOUR } from '@welshman/lib'
export type Subscription = {
id: string

View file

@ -1,13 +1,9 @@
import { neventEncode, decode } from 'nostr-tools/nip19'
import {
spec,
now,
sortBy,
groupBy,
displayList,
nth,
nthEq,
dateToSeconds,
secondsToDate,
} from '@welshman/lib'
import { parse, truncate, renderAsHtml } from '@welshman/content'
@ -15,8 +11,6 @@ import {
TrustedEvent,
normalizeRelayUrl,
getParentId,
getIdFilters,
getReplyFilters,
NOTE,
COMMENT,
REACTION,
@ -24,15 +18,12 @@ import {
displayPubkey,
getTagValue,
} from '@welshman/util'
import { Loader, AdapterContext, makeLoader, SocketAdapter } from '@welshman/net'
import { call } from '@welshman/lib'
import { displayDuration, createElement } from './util.js'
import type { Subscription } from './alert.js'
import { sendDigest } from './mailer.js'
import { EVENT_VIEWER_URL } from './env.js'
import {
profilesByPubkey,
loadRelaySelections,
loadProfile,
} from './repository.js'

View file

@ -1,7 +1,6 @@
import 'dotenv/config'
import { always } from '@welshman/lib'
import { normalizeRelayUrl } from '@welshman/util'
import { netContext } from '@welshman/net'
import { Nip01Signer } from '@welshman/signer'
import { routerContext } from '@welshman/router'

View file

@ -65,7 +65,7 @@ export const removeJob = (sub: Subscription) => {
}
// Daily purge of events older than 7 days
const purgeJob = CronJob.from({
CronJob.from({
cronTime: '0 0 3 * * *', // 3am UTC daily
onTick: async () => {
const weekAgo = Math.floor(Date.now() / 1000) - 7 * 24 * 3600