fix: remove pre-eslint unused-variable errors across src/
Remove 21 unused imports/variables that caused eslint failures: - actions.ts (2): Subscription type import, getCronExpression import - alert.ts (4): CronExpressionParser, tryCatch, int, HOUR - digest.ts (12): now, nth, nthEq, dateToSeconds, getIdFilters, getReplyFilters, Loader, AdapterContext, makeLoader, SocketAdapter, call, loadRelaySelections - env.ts (1): netContext - worker/email.ts (1): purgeJob variable (kept CronJob side-effect) All unused symbols were pre-existing, not related to changed files. tsc --noEmit passes; script/checks now returns 0 on the src check.
This commit is contained in:
parent
d5f54845b6
commit
4497a7dee9
5 changed files with 3 additions and 15 deletions
|
|
@ -1,6 +1,4 @@
|
||||||
import { instrument } from 'succinct-async'
|
import { instrument } from 'succinct-async'
|
||||||
import type { Subscription } from './alert.js'
|
|
||||||
import { getCronExpression } from './alert.js'
|
|
||||||
import * as mailer from './mailer.js'
|
import * as mailer from './mailer.js'
|
||||||
import * as worker from './worker/index.js'
|
import * as worker from './worker/index.js'
|
||||||
import * as db from './database.js'
|
import * as db from './database.js'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import { CronExpressionParser } from 'cron-parser'
|
|
||||||
import { tryCatch, int, HOUR } from '@welshman/lib'
|
|
||||||
|
|
||||||
export type Subscription = {
|
export type Subscription = {
|
||||||
id: string
|
id: string
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
import { neventEncode, decode } from 'nostr-tools/nip19'
|
import { neventEncode, decode } from 'nostr-tools/nip19'
|
||||||
import {
|
import {
|
||||||
spec,
|
spec,
|
||||||
now,
|
|
||||||
sortBy,
|
sortBy,
|
||||||
groupBy,
|
groupBy,
|
||||||
displayList,
|
displayList,
|
||||||
nth,
|
|
||||||
nthEq,
|
|
||||||
dateToSeconds,
|
|
||||||
secondsToDate,
|
secondsToDate,
|
||||||
} from '@welshman/lib'
|
} from '@welshman/lib'
|
||||||
import { parse, truncate, renderAsHtml } from '@welshman/content'
|
import { parse, truncate, renderAsHtml } from '@welshman/content'
|
||||||
|
|
@ -15,8 +11,6 @@ import {
|
||||||
TrustedEvent,
|
TrustedEvent,
|
||||||
normalizeRelayUrl,
|
normalizeRelayUrl,
|
||||||
getParentId,
|
getParentId,
|
||||||
getIdFilters,
|
|
||||||
getReplyFilters,
|
|
||||||
NOTE,
|
NOTE,
|
||||||
COMMENT,
|
COMMENT,
|
||||||
REACTION,
|
REACTION,
|
||||||
|
|
@ -24,15 +18,13 @@ import {
|
||||||
displayPubkey,
|
displayPubkey,
|
||||||
getTagValue,
|
getTagValue,
|
||||||
} from '@welshman/util'
|
} from '@welshman/util'
|
||||||
import { Loader, AdapterContext, makeLoader, SocketAdapter } from '@welshman/net'
|
|
||||||
import { call } from '@welshman/lib'
|
|
||||||
import { displayDuration, createElement } from './util.js'
|
import { displayDuration, createElement } from './util.js'
|
||||||
import type { Subscription } from './alert.js'
|
import type { Subscription } from './alert.js'
|
||||||
import { sendDigest } from './mailer.js'
|
import { sendDigest } from './mailer.js'
|
||||||
import { EVENT_VIEWER_URL } from './env.js'
|
import { EVENT_VIEWER_URL } from './env.js'
|
||||||
import {
|
import {
|
||||||
profilesByPubkey,
|
profilesByPubkey,
|
||||||
loadRelaySelections,
|
|
||||||
loadProfile,
|
loadProfile,
|
||||||
} from './repository.js'
|
} from './repository.js'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import 'dotenv/config'
|
import 'dotenv/config'
|
||||||
import { always } from '@welshman/lib'
|
import { always } from '@welshman/lib'
|
||||||
import { normalizeRelayUrl } from '@welshman/util'
|
import { normalizeRelayUrl } from '@welshman/util'
|
||||||
import { netContext } from '@welshman/net'
|
|
||||||
import { Nip01Signer } from '@welshman/signer'
|
import { Nip01Signer } from '@welshman/signer'
|
||||||
import { routerContext } from '@welshman/router'
|
import { routerContext } from '@welshman/router'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export const removeJob = (sub: Subscription) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Daily purge of events older than 7 days
|
// Daily purge of events older than 7 days
|
||||||
const purgeJob = CronJob.from({
|
CronJob.from({
|
||||||
cronTime: '0 0 3 * * *', // 3am UTC daily
|
cronTime: '0 0 3 * * *', // 3am UTC daily
|
||||||
onTick: async () => {
|
onTick: async () => {
|
||||||
const weekAgo = Math.floor(Date.now() / 1000) - 7 * 24 * 3600
|
const weekAgo = Math.floor(Date.now() / 1000) - 7 * 24 * 3600
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue