From 17b6c1b3710c2db317ed52cdbc6ac804d56ea5f6 Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 22 Aug 2024 13:55:22 +0100 Subject: [PATCH] tell the linter to shut up, this time --- .../backend/src/server/api/RateLimiterService.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/RateLimiterService.ts b/packages/backend/src/server/api/RateLimiterService.ts index a30cb2d47d..e94160a657 100644 --- a/packages/backend/src/server/api/RateLimiterService.ts +++ b/packages/backend/src/server/api/RateLimiterService.ts @@ -37,7 +37,12 @@ export class RateLimiterService { return Promise.resolve(); } + // those lines with the "wrong" brace style / indentation are + // done that way so that the *other* lines stay identical to + // Misskey, simplifying merges + // Short-term limit + // eslint-disable-next-line brace-style const minP = () => { return new Promise((ok, reject) => { const minIntervalLimiter = new Limiter({ id: `${actor}:${limitation.key}:min`, @@ -63,9 +68,11 @@ export class RateLimiterService { } } }); - }) }; + // eslint-disable-next-line brace-style + }); }; // Long term limit + // eslint-disable-next-line brace-style const maxP = () => { return new Promise((ok, reject) => { const limiter = new Limiter({ id: `${actor}:${limitation.key}`, @@ -87,7 +94,8 @@ export class RateLimiterService { return ok(); } }); - }) }; + // eslint-disable-next-line brace-style + }); }; const hasShortTermLimit = typeof limitation.minInterval === 'number';