💄 Prettier repository

This commit is contained in:
ajnart
2023-07-21 18:08:40 +09:00
parent b40cafc65a
commit 739b95888b
197 changed files with 507 additions and 335 deletions

View File

@@ -6,7 +6,7 @@ export const findAppProperty = (app: ConfigAppType, key: IntegrationField) =>
/** Checks if the type of an integration is part of the TIntegrations array with propper typing */
export const checkIntegrationsType = <
TTest extends CheckIntegrationTypeInput,
TIntegrations extends readonly IntegrationType[]
TIntegrations extends readonly IntegrationType[],
>(
test: TTest | undefined | null,
integrations: TIntegrations
@@ -21,7 +21,7 @@ type CheckIntegrationTypeInput = {
type CheckIntegrationType<
TInput extends CheckIntegrationTypeInput,
TIntegrations extends readonly IntegrationType[]
TIntegrations extends readonly IntegrationType[],
> = TInput & {
type: TIntegrations[number];
};

View File

@@ -10,9 +10,9 @@ const ranges = [
export const formatNumber = (n: number, decimalPlaces: number) => {
// eslint-disable-next-line no-restricted-syntax
for (const range of ranges) {
if (n < range.divider) continue;
if (n < range.divider) continue;
return (n / range.divider).toFixed(decimalPlaces) + range.suffix;
return (n / range.divider).toFixed(decimalPlaces) + range.suffix;
}
return n.toFixed(decimalPlaces);
};