diff --git a/packages/backend/src/boot/master.ts b/packages/backend/src/boot/master.ts index b4d95346f..6b1fce48c 100644 --- a/packages/backend/src/boot/master.ts +++ b/packages/backend/src/boot/master.ts @@ -153,7 +153,7 @@ async function spawnWorkers(clusterLimits: Required): P bootLogger.info(`Starting ${total} workers...`); await Promise.all(workers.map(mode => spawnWorker(mode))); - bootLogger.succ(`All workers started`); + bootLogger.succ('All workers started'); } function spawnWorker(mode: 'web' | 'queue'): Promise { diff --git a/packages/backend/src/misc/skipped-instances.ts b/packages/backend/src/misc/skipped-instances.ts index 37587c52e..efd1d588d 100644 --- a/packages/backend/src/misc/skipped-instances.ts +++ b/packages/backend/src/misc/skipped-instances.ts @@ -27,7 +27,7 @@ export async function skippedInstances(hosts: Array): Promise< return skipped.concat( await db.query( - `SELECT host FROM instance WHERE ("isSuspended" OR "latestStatus" = 410 OR "lastCommunicatedAt" < $1::date) AND host = ANY(string_to_array($2, ','))`, + 'SELECT host FROM instance WHERE ("isSuspended" OR "latestStatus" = 410 OR "lastCommunicatedAt" < $1::date) AND host = ANY(string_to_array($2, \',\'))', [ deadTime.toISOString(), // don't check hosts again that we already know are suspended diff --git a/packages/backend/src/models/entities/auth-session.ts b/packages/backend/src/models/entities/auth-session.ts index 98031f2de..8e3057dc6 100644 --- a/packages/backend/src/models/entities/auth-session.ts +++ b/packages/backend/src/models/entities/auth-session.ts @@ -45,5 +45,5 @@ export class AuthSession { nullable: true, comment: 'PKCE code_challenge value, if provided (OAuth only)', }) - pkceChallenge: string | null; + pkceChallenge: string | null; } diff --git a/packages/backend/src/remote/activitypub/deliver-manager.ts b/packages/backend/src/remote/activitypub/deliver-manager.ts index c706968df..bc86e5e58 100644 --- a/packages/backend/src/remote/activitypub/deliver-manager.ts +++ b/packages/backend/src/remote/activitypub/deliver-manager.ts @@ -147,8 +147,8 @@ export default class DeliverManager { // get (unique) list of hosts Array.from(new Set( Array.from(inboxes) - .map(inbox => new URL(inbox).host) - )) + .map(inbox => new URL(inbox).host), + )), ); // deliver diff --git a/packages/backend/src/remote/activitypub/misc/auth-user.ts b/packages/backend/src/remote/activitypub/misc/auth-user.ts index d8a7202f2..4705bb791 100644 --- a/packages/backend/src/remote/activitypub/misc/auth-user.ts +++ b/packages/backend/src/remote/activitypub/misc/auth-user.ts @@ -23,7 +23,7 @@ function authUserFromApId(uri: string): Promise { return uriPersonCache.fetch(uri) .then(async user => { if (!user) return null; - let key = await publicKeyByUserIdCache.fetch(user.id); + const key = await publicKeyByUserIdCache.fetch(user.id); if (!key) return null; return { user, key }; }); diff --git a/packages/backend/src/remote/activitypub/models/person.ts b/packages/backend/src/remote/activitypub/models/person.ts index c6eb92b4a..977cfb0ff 100644 --- a/packages/backend/src/remote/activitypub/models/person.ts +++ b/packages/backend/src/remote/activitypub/models/person.ts @@ -23,8 +23,8 @@ import { StatusError } from '@/misc/fetch.js'; import { uriPersonCache } from '@/services/user-cache.js'; import { publishInternalEvent } from '@/services/stream.js'; import { db } from '@/db/postgre.js'; -import { apLogger } from '../logger.js'; import { fromHtml } from '@/mfm/from-html.js'; +import { apLogger } from '../logger.js'; import { isCollectionOrOrderedCollection, isCollection, IActor, getApId, getOneApHrefNullable, IObject, isPropertyValue, getApType, isActor } from '../type.js'; import Resolver from '../resolver.js'; import { extractApHashtags } from './tag.js'; diff --git a/packages/backend/src/server/api/common/oauth.ts b/packages/backend/src/server/api/common/oauth.ts index c09712e9b..894842d40 100644 --- a/packages/backend/src/server/api/common/oauth.ts +++ b/packages/backend/src/server/api/common/oauth.ts @@ -127,5 +127,4 @@ export async function oauth(ctx: Koa.Context): void { token_type: 'bearer', scope: session.accessToken.permission.join(' '), }; - -}; +} diff --git a/packages/backend/src/server/api/endpoints/auth/session/generate.ts b/packages/backend/src/server/api/endpoints/auth/session/generate.ts index fe1286c03..8fb133bdf 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/generate.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/generate.ts @@ -57,7 +57,7 @@ export const paramDef = { minLength: 1, }, }, - required: ['clientId'] + required: ['clientId'], }, { properties: { appSecret: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts index 84096eac0..cbde7ef79 100644 --- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -1,5 +1,5 @@ -import { MONTH } from '@/const.js'; import { Brackets } from 'typeorm'; +import { MONTH } from '@/const.js'; import { Followings, Users } from '@/models/index.js'; import { User } from '@/models/entities/user.js'; import define from '../../define.js'; diff --git a/packages/backend/src/server/api/openapi/gen-spec.ts b/packages/backend/src/server/api/openapi/gen-spec.ts index a7f5d5cc9..fbb8d3163 100644 --- a/packages/backend/src/server/api/openapi/gen-spec.ts +++ b/packages/backend/src/server/api/openapi/gen-spec.ts @@ -1,10 +1,10 @@ import config from '@/config/index.js'; +import { kinds } from '@/misc/api-permissions.js'; +import { I18n } from '@/misc/i18n.js'; import { errors as errorDefinitions } from '../error.js'; import endpoints from '../endpoints.js'; import { schemas, convertSchemaToOpenApiSchema } from './schemas.js'; import { httpCodes } from './http-codes.js'; -import { kinds } from '@/misc/api-permissions.js'; -import { I18n } from '@/misc/i18n.js'; const i18n = new I18n('en-US'); diff --git a/packages/backend/src/services/note/polls/vote.ts b/packages/backend/src/services/note/polls/vote.ts index 5e27159e8..6e22af41f 100644 --- a/packages/backend/src/services/note/polls/vote.ts +++ b/packages/backend/src/services/note/polls/vote.ts @@ -68,7 +68,7 @@ export async function vote(user: CacheableUser, note: Note, choice: number): Pro createNotification(note.userId, 'pollVote', { notifierId: user.id, noteId: note.id, - choice: choice, + choice, }); } diff --git a/packages/backend/src/services/user-cache.ts b/packages/backend/src/services/user-cache.ts index f7f58dba5..d30b76a24 100644 --- a/packages/backend/src/services/user-cache.ts +++ b/packages/backend/src/services/user-cache.ts @@ -29,7 +29,7 @@ subscriber.on('message', async (_, data) => { const user = await Users.findOneByOrFail({ id: body.id }); userByIdCache.set(user.id, user); for (const [k, v] of uriPersonCache.cache.entries()) { - if (v.value?.id === user.id) { + if (v.value.id === user.id) { uriPersonCache.set(k, user); } }