From 15cbe9565faa944621ba360e031fea5bc8cd19bd Mon Sep 17 00:00:00 2001 From: Everett Pompeii Date: Sat, 11 Jan 2025 14:10:51 -0600 Subject: [PATCH] fmt and lint --- .../src/components/landing/Customers.astro | 28 +++++++++---------- services/console/src/util/platform.ts | 20 ++++++------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/services/console/src/components/landing/Customers.astro b/services/console/src/components/landing/Customers.astro index c9bfc901f..08d0c81fa 100644 --- a/services/console/src/components/landing/Customers.astro +++ b/services/console/src/components/landing/Customers.astro @@ -3,20 +3,20 @@ import { BENCHER_GITHUB_URL } from "../../util/ext"; import { CUSTOMERS } from "./customers.tsx"; const padQuote = (quote: string) => { - const MAX = CUSTOMERS.reduce((acc, customers) => { - const max = customers.reduce((acc, customer) => { - return Math.max(acc, customer.quote.length); - }, 0); - return Math.max(acc, max); - }, 0); - const padding = []; - const quoteLength = quote.length; - if (quoteLength < MAX) { - for (let i = 0; i < MAX - quoteLength; i++) { - padding.push(null); - } - } - return padding; + const MAX = CUSTOMERS.reduce((acc, customers) => { + const max = customers.reduce((acc, customer) => { + return Math.max(acc, customer.quote.length); + }, 0); + return Math.max(acc, max); + }, 0); + const padding = []; + const quoteLength = quote.length; + if (quoteLength < MAX) { + for (let i = 0; i < MAX - quoteLength; i++) { + padding.push(null); + } + } + return padding; }; --- diff --git a/services/console/src/util/platform.ts b/services/console/src/util/platform.ts index 8194d5f6d..c2bf7308d 100644 --- a/services/console/src/util/platform.ts +++ b/services/console/src/util/platform.ts @@ -29,24 +29,24 @@ export const getPlatform = async () => { return Platform.Unix; default: if ( - (navigator.appVersion?.indexOf("Win") ?? -1) != -1 || - (navigator.appVersion?.indexOf("Mac") ?? -1) != -1 || - (navigator.appVersion?.indexOf("FreeBSD") ?? -1) != -1 + (navigator.appVersion?.indexOf("Win") ?? -1) !== -1 || + (navigator.appVersion?.indexOf("Mac") ?? -1) !== -1 || + (navigator.appVersion?.indexOf("FreeBSD") ?? -1) !== -1 ) { return Platform.Unix; } if ( - (navigator.oscpu?.indexOf("Win32") ?? -1) != -1 || - (navigator.oscpu?.indexOf("Win64") ?? -1) != -1 + (navigator.oscpu?.indexOf("Win32") ?? -1) !== -1 || + (navigator.oscpu?.indexOf("Win64") ?? -1) !== -1 ) { return Platform.Windows; } if ( - (navigator.oscpu?.indexOf("Mac") ?? -1) != -1 || - (navigator.oscpu?.indexOf("Linux") ?? -1) != -1 || - (navigator.oscpu?.indexOf("FreeBSD") ?? -1) != -1 || - (navigator.oscpu?.indexOf("NetBSD") ?? -1) != -1 || - (navigator.oscpu?.indexOf("SunOS") ?? -1) != -1 + (navigator.oscpu?.indexOf("Mac") ?? -1) !== -1 || + (navigator.oscpu?.indexOf("Linux") ?? -1) !== -1 || + (navigator.oscpu?.indexOf("FreeBSD") ?? -1) !== -1 || + (navigator.oscpu?.indexOf("NetBSD") ?? -1) !== -1 || + (navigator.oscpu?.indexOf("SunOS") ?? -1) !== -1 ) { return Platform.Unix; }