From 41a77c8f2d636185948e9111fd0593e62ab5e98b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 15 May 2024 01:09:16 +0200 Subject: [PATCH] formatting --- code/frameworks/html-vite/src/types.ts | 5 ++++- code/frameworks/web-components-vite/src/types.ts | 5 ++++- code/lib/core-server/src/utils/build-or-throw.ts | 4 ++-- code/lib/manager-api/src/modules/whatsnew.tsx | 9 ++++----- code/renderers/svelte/src/public-types.ts | 14 ++++++++------ code/renderers/vue3/src/public-types.ts | 9 +++++---- 6 files changed, 27 insertions(+), 19 deletions(-) diff --git a/code/frameworks/html-vite/src/types.ts b/code/frameworks/html-vite/src/types.ts index 655509c1b3fd..c797975bcdef 100644 --- a/code/frameworks/html-vite/src/types.ts +++ b/code/frameworks/html-vite/src/types.ts @@ -1,4 +1,7 @@ -import type { StorybookConfig as StorybookConfigBase, CompatibleString } from '@storybook/core/dist/types'; +import type { + StorybookConfig as StorybookConfigBase, + CompatibleString, +} from '@storybook/core/dist/types'; import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite'; type FrameworkName = CompatibleString<'@storybook/html-vite'>; diff --git a/code/frameworks/web-components-vite/src/types.ts b/code/frameworks/web-components-vite/src/types.ts index 8fb62b8dfa18..e4720b643d45 100644 --- a/code/frameworks/web-components-vite/src/types.ts +++ b/code/frameworks/web-components-vite/src/types.ts @@ -1,4 +1,7 @@ -import type { CompatibleString, StorybookConfig as StorybookConfigBase } from '@storybook/core/dist/types'; +import type { + CompatibleString, + StorybookConfig as StorybookConfigBase, +} from '@storybook/core/dist/types'; import type { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite'; type FrameworkName = CompatibleString<'@storybook/web-components-vite'>; diff --git a/code/lib/core-server/src/utils/build-or-throw.ts b/code/lib/core-server/src/utils/build-or-throw.ts index cca34e9d96c0..9e356293b601 100644 --- a/code/lib/core-server/src/utils/build-or-throw.ts +++ b/code/lib/core-server/src/utils/build-or-throw.ts @@ -6,8 +6,8 @@ export async function buildOrThrow(callback: () => Promise): Promise { } catch (err: any) { const builderErrors = err.errors as { text: string }[]; if (builderErrors) { - const inconsistentVersionsError = builderErrors.find( - (er) => er.text?.includes('No matching export') + const inconsistentVersionsError = builderErrors.find((er) => + er.text?.includes('No matching export') ); if (inconsistentVersionsError) { diff --git a/code/lib/manager-api/src/modules/whatsnew.tsx b/code/lib/manager-api/src/modules/whatsnew.tsx index 5b6dd51b6ae5..51f8390dc2eb 100644 --- a/code/lib/manager-api/src/modules/whatsnew.tsx +++ b/code/lib/manager-api/src/modules/whatsnew.tsx @@ -59,11 +59,10 @@ export const init: ModuleFn = ({ fullAPI, store, provider }) => { function getLatestWhatsNewPost(): Promise { provider.channel?.emit(REQUEST_WHATS_NEW_DATA); - return new Promise( - (resolve) => - provider.channel?.once(RESULT_WHATS_NEW_DATA, ({ data }: { data: WhatsNewData }) => - resolve(data) - ) + return new Promise((resolve) => + provider.channel?.once(RESULT_WHATS_NEW_DATA, ({ data }: { data: WhatsNewData }) => + resolve(data) + ) ); } diff --git a/code/renderers/svelte/src/public-types.ts b/code/renderers/svelte/src/public-types.ts index 99578d7ed59f..7333e6225461 100644 --- a/code/renderers/svelte/src/public-types.ts +++ b/code/renderers/svelte/src/public-types.ts @@ -23,17 +23,19 @@ export type { Args, ArgTypes, Parameters, StrictArgs } from '@storybook/core/dis * * @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export) */ -export type Meta = CmpOrArgs extends SvelteComponent - ? ComponentAnnotations, Props> - : ComponentAnnotations; +export type Meta = + CmpOrArgs extends SvelteComponent + ? ComponentAnnotations, Props> + : ComponentAnnotations; /** * Story function that represents a CSFv2 component example. * * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) */ -export type StoryFn = TCmpOrArgs extends SvelteComponent - ? AnnotatedStoryFn - : AnnotatedStoryFn; +export type StoryFn = + TCmpOrArgs extends SvelteComponent + ? AnnotatedStoryFn + : AnnotatedStoryFn; /** * Story object that represents a CSFv3 component example. diff --git a/code/renderers/vue3/src/public-types.ts b/code/renderers/vue3/src/public-types.ts index ec4af4246525..d84ac24a1ce7 100644 --- a/code/renderers/vue3/src/public-types.ts +++ b/code/renderers/vue3/src/public-types.ts @@ -68,11 +68,12 @@ type AllowNonFunctionSlots = { export type ComponentPropsAndSlots = ComponentProps & ExtractSlots; -type ComponentPropsOrProps = TCmpOrArgs extends Constructor - ? ComponentPropsAndSlots - : TCmpOrArgs extends FunctionalComponent +type ComponentPropsOrProps = + TCmpOrArgs extends Constructor ? ComponentPropsAndSlots - : TCmpOrArgs; + : TCmpOrArgs extends FunctionalComponent + ? ComponentPropsAndSlots + : TCmpOrArgs; export type Decorator = DecoratorFunction; export type Loader = LoaderFunction;