From e6c423b7fd5089840224716a76e9ef956c69a558 Mon Sep 17 00:00:00 2001 From: twlite <46562212+twlite@users.noreply.github.com> Date: Tue, 14 Jan 2025 00:28:42 +0545 Subject: [PATCH] chore: prettier --- apps/docs/components/accordion.tsx | 2 +- apps/docs/components/layout/language-toggle.tsx | 5 +++-- .../commandkit/bin/esbuild-plugins/use-cache.mjs | 13 +++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/docs/components/accordion.tsx b/apps/docs/components/accordion.tsx index 4d26f62..206496c 100644 --- a/apps/docs/components/accordion.tsx +++ b/apps/docs/components/accordion.tsx @@ -22,7 +22,7 @@ export const Accordions = forwardRef< | Omit >(({ type = 'single', className, defaultValue, ...props }, ref) => { const [value, setValue] = useState( - type === 'single' ? defaultValue ?? '' : defaultValue ?? [], + type === 'single' ? (defaultValue ?? '') : (defaultValue ?? []), ); useEffect(() => { diff --git a/apps/docs/components/layout/language-toggle.tsx b/apps/docs/components/layout/language-toggle.tsx index b398125..63c9e2e 100644 --- a/apps/docs/components/layout/language-toggle.tsx +++ b/apps/docs/components/layout/language-toggle.tsx @@ -56,8 +56,9 @@ export function LanguageToggleText( props: HTMLAttributes, ): React.ReactElement { const context = useI18n(); - const text = context.locales?.find((item) => item.locale === context.locale) - ?.name; + const text = context.locales?.find( + (item) => item.locale === context.locale, + )?.name; return {text}; } diff --git a/packages/commandkit/bin/esbuild-plugins/use-cache.mjs b/packages/commandkit/bin/esbuild-plugins/use-cache.mjs index d816b56..38b5b21 100644 --- a/packages/commandkit/bin/esbuild-plugins/use-cache.mjs +++ b/packages/commandkit/bin/esbuild-plugins/use-cache.mjs @@ -8,7 +8,8 @@ const generate = _generate.default || _generate; const IMPORT_PATH = 'commandkit'; const DIRECTIVE = 'use cache'; -const CACHE_IDENTIFIER = 'unstable_super_duper_secret_internal_for_use_cache_directive_of_commandkit_cli_do_not_use_it_directly_or_you_will_be_fired_kthxbai'; +const CACHE_IDENTIFIER = + 'unstable_super_duper_secret_internal_for_use_cache_directive_of_commandkit_cli_do_not_use_it_directly_or_you_will_be_fired_kthxbai'; const generateRandomString = (length = 6) => { const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; @@ -115,11 +116,11 @@ export const cacheDirectivePlugin = () => { // Create a new body without the 'use cache' directive const newBody = t.isBlockStatement(path.node.body) ? t.blockStatement( - path.node.body.body, - path.node.body.directives.filter( - (d) => d.value.value !== DIRECTIVE, - ), - ) + path.node.body.body, + path.node.body.directives.filter( + (d) => d.value.value !== DIRECTIVE, + ), + ) : path.node.body; const wrapped = t.callExpression(