From 77975b542378f0ec1c7d9c8d55db23042052111b Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Thu, 14 Dec 2023 13:18:11 +0100 Subject: [PATCH] style(prettier): run prettier-format --- client/src/document/baseline-indicator.tsx | 12 ++++++------ .../browser-compatibility-table/feature-row.tsx | 10 +++++----- client/src/document/molecules/tooltip/index.tsx | 6 +++--- client/src/document/toolbar/flaws.tsx | 4 ++-- client/src/plus/ai-help/index.tsx | 12 ++++++------ client/src/plus/ai-help/use-ai.ts | 10 +++++----- client/src/plus/collections/collection.tsx | 4 ++-- client/src/telemetry/glean-context.tsx | 4 ++-- client/src/ui/organisms/placement/index.tsx | 4 ++-- client/src/user-context.tsx | 12 ++++++------ filecheck/checker.ts | 4 ++-- scripts/ai-help-macros.ts | 4 ++-- 12 files changed, 43 insertions(+), 43 deletions(-) diff --git a/client/src/document/baseline-indicator.tsx b/client/src/document/baseline-indicator.tsx index 2737d5eb17d4..bb53f1de2ef8 100644 --- a/client/src/document/baseline-indicator.tsx +++ b/client/src/document/baseline-indicator.tsx @@ -45,8 +45,8 @@ export function BaselineIndicator({ status }: { status: SupportStatus }) { const level = status.baseline ? status.baseline : status.baseline === false - ? "not" - : undefined; + ? "not" + : undefined; const feedbackLink = `${SURVEY_URL}?page=${encodeURIComponent( pathname @@ -67,10 +67,10 @@ export function BaselineIndicator({ status }: { status: SupportStatus }) { ? `Supported in ${browser}` : `Not widely supported in ${browser}` : current === previous - ? ` and ${browser}` - : current - ? `, and supported in ${browser}` - : `, and not widely supported in ${browser}`; + ? ` and ${browser}` + : current + ? `, and supported in ${browser}` + : `, and not widely supported in ${browser}`; }) .join(""); diff --git a/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx b/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx index b5030abcb675..cde7ec7e0511 100644 --- a/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx +++ b/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx @@ -388,11 +388,11 @@ function getNotes( label: "Full support", } : isNotSupportedAtAll(item) - ? { - iconName: "footnote", - label: "No support", - } - : null, + ? { + iconName: "footnote", + label: "No support", + } + : null, ] .flat() .filter(isTruthy); diff --git a/client/src/document/molecules/tooltip/index.tsx b/client/src/document/molecules/tooltip/index.tsx index 35a287f22d25..5a52402e7b35 100644 --- a/client/src/document/molecules/tooltip/index.tsx +++ b/client/src/document/molecules/tooltip/index.tsx @@ -36,9 +36,9 @@ function Tooltip({ ? x : wH : // the center of the parent is on the right half of the window - x > iW - wH // if the inner width of the window is less than half the tooltip - ? 2 * wH - (iW - x) - : wH); + x > iW - wH // if the inner width of the window is less than half the tooltip + ? 2 * wH - (iW - x) + : wH); const tooltipOffset = `${offset.toFixed(2)}px`; setStyle(Object.fromEntries([["--tooltip-offset", tooltipOffset]])); }; diff --git a/client/src/document/toolbar/flaws.tsx b/client/src/document/toolbar/flaws.tsx index eaf3ab936233..191760550773 100644 --- a/client/src/document/toolbar/flaws.tsx +++ b/client/src/document/toolbar/flaws.tsx @@ -158,8 +158,8 @@ export function ToggleDocumentFlaws({ el.href = !allFlaws ? "/favicon-48x48-flawless.png" : allFlaws === allFixableFlaws - ? "/favicon-48x48-flaws-fixable.png" - : "/favicon-48x48-flaws.png"; + ? "/favicon-48x48-flaws-fixable.png" + : "/favicon-48x48-flaws.png"; } }, [doc.flaws]); diff --git a/client/src/plus/ai-help/index.tsx b/client/src/plus/ai-help/index.tsx index 49b6f30ee9c3..41fad629caf0 100644 --- a/client/src/plus/ai-help/index.tsx +++ b/client/src/plus/ai-help/index.tsx @@ -337,8 +337,8 @@ function AIHelpAssistantResponse({ {message.status === MessageStatus.Errored ? MESSAGE_FAILED : message.status === MessageStatus.InProgress - ? MESSAGE_ANSWERING - : MESSAGE_ANSWERED} + ? MESSAGE_ANSWERING + : MESSAGE_ANSWERED} )} {message.content && ( @@ -756,10 +756,10 @@ export function AIHelpInner() { isLoading ? MESSAGE_SEARCHING : isResponding - ? MESSAGE_ANSWERING - : hasConversation - ? "Ask your follow up question" - : "Ask your question" + ? MESSAGE_ANSWERING + : hasConversation + ? "Ask your follow up question" + : "Ask your question" )} />
diff --git a/client/src/plus/ai-help/use-ai.ts b/client/src/plus/ai-help/use-ai.ts index f3ee2989b43f..7c352f8351db 100644 --- a/client/src/plus/ai-help/use-ai.ts +++ b/client/src/plus/ai-help/use-ai.ts @@ -296,9 +296,9 @@ class AiHelpHistory { status: message.assistant ? MessageStatus.Complete : Date.now() - Date.parse(message.metadata.created_at) > - ERROR_TIMEOUT - ? MessageStatus.Errored - : MessageStatus.InProgress, + ERROR_TIMEOUT + ? MessageStatus.Errored + : MessageStatus.InProgress, sources: message.metadata.sources, chatId: message.metadata.chat_id, messageId: message.metadata.message_id, @@ -606,8 +606,8 @@ export function useAiChat({ let newPath = messageId ? addSibling(state, messageId) : parentId - ? [...findPath(state, parentId), 0] - : [0]; + ? [...findPath(state, parentId), 0] + : [0]; setPath(newPath); gleanClick(`${AI_HELP}: submit question ${newPath.length}`); dispatchState({ diff --git a/client/src/plus/collections/collection.tsx b/client/src/plus/collections/collection.tsx index d480435e916d..05bbf2ac48d3 100644 --- a/client/src/plus/collections/collection.tsx +++ b/client/src/plus/collections/collection.tsx @@ -83,8 +83,8 @@ export function CollectionComponent() { {itemLoading ? "Loading..." : itemError - ? "Error (try again)" - : "Show more"} + ? "Error (try again)" + : "Show more"}
)} diff --git a/client/src/telemetry/glean-context.tsx b/client/src/telemetry/glean-context.tsx index c8370d539032..b7ea335467ed 100644 --- a/client/src/telemetry/glean-context.tsx +++ b/client/src/telemetry/glean-context.tsx @@ -226,8 +226,8 @@ export function useGleanPage(pageNotFound: boolean, doc?: Doc) { isBaseline: doc?.baseline?.baseline ? `baseline_${doc.baseline.baseline}` : doc?.baseline?.baseline === false - ? "not_baseline" - : undefined, + ? "not_baseline" + : undefined, utm: getUTMParameters(), }); if (typeof userData !== "undefined" && path.current !== loc.pathname) { diff --git a/client/src/ui/organisms/placement/index.tsx b/client/src/ui/organisms/placement/index.tsx index 9038df03db7c..fe6c3f565937 100644 --- a/client/src/ui/organisms/placement/index.tsx +++ b/client/src/ui/organisms/placement/index.tsx @@ -116,8 +116,8 @@ export function TopPlacement() { isServer || placementData?.status === Status.loading ? "loading" : placementData?.top - ? "visible" - : "fallback"; + ? "visible" + : "fallback"; return (
diff --git a/client/src/user-context.tsx b/client/src/user-context.tsx index 9dfa9388a3b6..a47fb6ee6dea 100644 --- a/client/src/user-context.tsx +++ b/client/src/user-context.tsx @@ -256,12 +256,12 @@ export function UserDataProvider(props: { children: React.ReactNode }) { const userData = isLoading ? getSessionStorageData() : error || !data - ? { - ...getSessionStorageData(), - ...data, - maintenance: `The API is down for maintenance. You can continue to browse the MDN Web Docs, but MDN Plus and Search might not be available. Thank you for your patience!`, - } - : data; + ? { + ...getSessionStorageData(), + ...data, + maintenance: `The API is down for maintenance. You can continue to browse the MDN Web Docs, but MDN Plus and Search might not be available. Thank you for your patience!`, + } + : data; return ( diff --git a/filecheck/checker.ts b/filecheck/checker.ts index 742bf51baff7..1380b185d89e 100644 --- a/filecheck/checker.ts +++ b/filecheck/checker.ts @@ -171,8 +171,8 @@ export async function checkFile( const docFilePath = (await fse.exists(htmlFilePath)) ? htmlFilePath : (await fse.exists(mdFilePath)) - ? mdFilePath - : null; + ? mdFilePath + : null; if (!docFilePath) { throw new FixableError( `${getRelativePath( diff --git a/scripts/ai-help-macros.ts b/scripts/ai-help-macros.ts index 2dfaaf6ad310..3098df6d669b 100644 --- a/scripts/ai-help-macros.ts +++ b/scripts/ai-help-macros.ts @@ -348,8 +348,8 @@ function buildBCDSupportString( item.release_date ? ` (released ${item.release_date})` : "" }` : isNotSupportedAtAll(item) - ? "No support" - : null, + ? "No support" + : null, ] .flat() .filter((x) => Boolean(x));