From 4261e77d40d2bb894776f5ca973f0bb0338dca69 Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Thu, 13 Nov 2025 21:41:37 -0500 Subject: [PATCH] fix lint errors in RoleService.ts --- packages/backend/src/core/RoleService.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/backend/src/core/RoleService.ts b/packages/backend/src/core/RoleService.ts index b7f535cb11..97212b4ac7 100644 --- a/packages/backend/src/core/RoleService.ts +++ b/packages/backend/src/core/RoleService.ts @@ -7,6 +7,7 @@ import { Inject, Injectable } from '@nestjs/common'; import * as Redis from 'ioredis'; import { In } from 'typeorm'; import { ModuleRef } from '@nestjs/core'; +import Ajv from 'ajv'; import type { MiMeta, MiRole, @@ -35,11 +36,10 @@ import { type ManagedMemorySingleCache, type ManagedMemoryKVCache, } from '@/global/CacheManagementService.js'; -import type { OnApplicationShutdown, OnModuleInit } from '@nestjs/common'; -import { getCallerId } from '@/misc/attach-caller-id.js'; -import Ajv from 'ajv'; -import type { JSONSchemaType, ValidateFunction } from 'ajv'; import { IdentifiableError } from '@/misc/identifiable-error.js'; +import { getCallerId } from '@/misc/attach-caller-id.js'; +import type { OnApplicationShutdown, OnModuleInit } from '@nestjs/common'; +import type { JSONSchemaType, ValidateFunction } from 'ajv'; export type RolePolicies = { gtlAvailable: boolean; @@ -185,8 +185,7 @@ const RoleSchema: JSONSchemaType = { // I picked `canTrend` here, but any policy name is fine, the // type of their bit of the schema is all the same [policy, value]: [string, JSONSchemaType['properties']['canTrend']] - ) => { - return [ + ) => [ policy, { type: 'object', @@ -201,8 +200,8 @@ const RoleSchema: JSONSchemaType = { value, }, }, - ]; - }), + ], + ), ), };