tell the linter to shut up, this time

This commit is contained in:
dakkar 2024-08-22 13:55:22 +01:00
parent 1b5bedc1d0
commit 17b6c1b371

View file

@ -37,7 +37,12 @@ export class RateLimiterService {
return Promise.resolve(); 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 // Short-term limit
// eslint-disable-next-line brace-style
const minP = () => { return new Promise<void>((ok, reject) => { const minP = () => { return new Promise<void>((ok, reject) => {
const minIntervalLimiter = new Limiter({ const minIntervalLimiter = new Limiter({
id: `${actor}:${limitation.key}:min`, id: `${actor}:${limitation.key}:min`,
@ -63,9 +68,11 @@ export class RateLimiterService {
} }
} }
}); });
}) }; // eslint-disable-next-line brace-style
}); };
// Long term limit // Long term limit
// eslint-disable-next-line brace-style
const maxP = () => { return new Promise<void>((ok, reject) => { const maxP = () => { return new Promise<void>((ok, reject) => {
const limiter = new Limiter({ const limiter = new Limiter({
id: `${actor}:${limitation.key}`, id: `${actor}:${limitation.key}`,
@ -87,7 +94,8 @@ export class RateLimiterService {
return ok(); return ok();
} }
}); });
}) }; // eslint-disable-next-line brace-style
}); };
const hasShortTermLimit = typeof limitation.minInterval === 'number'; const hasShortTermLimit = typeof limitation.minInterval === 'number';