From 2334b1df10d026664ef2041c0312d971d4c44ef3 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 15 Jan 2024 09:59:41 +0100 Subject: [PATCH] fix linting --- code/addons/docs/src/preview.ts | 17 ++++++++++------- code/lib/cli/src/upgrade.test.ts | 11 +++++++---- .../core-server/src/presets/common-manager.ts | 17 ++++++++++------- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/code/addons/docs/src/preview.ts b/code/addons/docs/src/preview.ts index d983f454ccd2..991a7811b472 100644 --- a/code/addons/docs/src/preview.ts +++ b/code/addons/docs/src/preview.ts @@ -1,13 +1,16 @@ import type { PreparedStory } from '@storybook/types'; import { global } from '@storybook/global'; -const excludeTags = Object.entries(global.TAGS_OPTIONS ?? {}).reduce((acc, entry) => { - const [tag, option] = entry; - if ((option as any).excludeFromDocsStories) { - acc[tag] = true; - } - return acc; -}, {} as Record); +const excludeTags = Object.entries(global.TAGS_OPTIONS ?? {}).reduce( + (acc, entry) => { + const [tag, option] = entry; + if ((option as any).excludeFromDocsStories) { + acc[tag] = true; + } + return acc; + }, + {} as Record +); export const parameters: any = { docs: { diff --git a/code/lib/cli/src/upgrade.test.ts b/code/lib/cli/src/upgrade.test.ts index 69b85cbc1d2a..be025028c495 100644 --- a/code/lib/cli/src/upgrade.test.ts +++ b/code/lib/cli/src/upgrade.test.ts @@ -11,10 +11,13 @@ vi.mock('@storybook/telemetry'); vi.mock('./versions', async (importOriginal) => { const originalVersions = ((await importOriginal()) as { default: typeof versions }).default; return { - default: Object.keys(originalVersions).reduce((acc, key) => { - acc[key] = '8.0.0'; - return acc; - }, {} as Record), + default: Object.keys(originalVersions).reduce( + (acc, key) => { + acc[key] = '8.0.0'; + return acc; + }, + {} as Record + ), }; }); diff --git a/code/lib/core-server/src/presets/common-manager.ts b/code/lib/core-server/src/presets/common-manager.ts index 081722917468..0564f8e00b92 100644 --- a/code/lib/core-server/src/presets/common-manager.ts +++ b/code/lib/core-server/src/presets/common-manager.ts @@ -6,13 +6,16 @@ const STATIC_FILTER = 'static-filter'; addons.register(STATIC_FILTER, (api) => { // FIXME: this ensures the filter is applied after the first render // to avoid a strange race condition in Webkit only. - const excludeTags = Object.entries(global.TAGS_OPTIONS ?? {}).reduce((acc, entry) => { - const [tag, option] = entry; - if ((option as any).excludeFromSidebar) { - acc[tag] = true; - } - return acc; - }, {} as Record); + const excludeTags = Object.entries(global.TAGS_OPTIONS ?? {}).reduce( + (acc, entry) => { + const [tag, option] = entry; + if ((option as any).excludeFromSidebar) { + acc[tag] = true; + } + return acc; + }, + {} as Record + ); api.experimental_setFilter(STATIC_FILTER, (item) => { const tags = item.tags || [];