Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Anna Henningsen <[email protected]>
  • Loading branch information
gagik and addaleax authored Oct 24, 2024
1 parent 7c606db commit 46adbb2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/shell-api/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
);
}
Expand Down

0 comments on commit 46adbb2

Please sign in to comment.