From 46adbb20b00ab91f5b7d9d33c040506f650c1d22 Mon Sep 17 00:00:00 2001 From: Gagik Amaryan Date: Thu, 24 Oct 2024 11:20:25 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Anna Henningsen --- packages/shell-api/src/helpers.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/shell-api/src/helpers.ts b/packages/shell-api/src/helpers.ts index 061766024..2484c8d8c 100644 --- a/packages/shell-api/src/helpers.ts +++ b/packages/shell-api/src/helpers.ts @@ -343,7 +343,7 @@ export async function getPrintableShardStatus( balancerStatus: 1, }); balancerRunning = balancerStatus.inBalancerRound ? 'yes' : 'no'; - } catch (err) { + } catch { // pass, ignore all error messages } balancerRes['Currently running'] = balancerRunning; @@ -370,9 +370,7 @@ export async function getPrintableShardStatus( if (activeLocks?.length > 0) { balancerRes['Collections with active migrations'] = activeLocks.map( (lock) => { - // This type assertion is necessary for the string literal type check - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion - return `${lock._id} started at ${lock.when}` as `${string} started at ${string}`; + return `${lock._id} started at ${lock.when}` as const; } ); }