From 45f141b4d2829d1409fcd769f7d6125e922fe536 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Wed, 6 Jul 2022 19:02:23 +1000 Subject: [PATCH] Code review --- addons/docs/src/preset.ts | 2 +- lib/core-server/src/dev-server.ts | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/addons/docs/src/preset.ts b/addons/docs/src/preset.ts index 583431ebf3ef..bac132b16ac8 100644 --- a/addons/docs/src/preset.ts +++ b/addons/docs/src/preset.ts @@ -137,7 +137,7 @@ export async function webpack( return result; } -export const storyIndexers = async (indexers: StoryIndexer[] | null) => { +export const storyIndexers = async (indexers?: StoryIndexer[]) => { const mdxIndexer = async (fileName: string, opts: IndexerOptions) => { let code = (await fs.readFile(fileName, 'utf-8')).toString(); // @ts-ignore diff --git a/lib/core-server/src/dev-server.ts b/lib/core-server/src/dev-server.ts index 01819ad63200..197b300ccaae 100644 --- a/lib/core-server/src/dev-server.ts +++ b/lib/core-server/src/dev-server.ts @@ -1,14 +1,8 @@ import express, { Router } from 'express'; import compression from 'compression'; -import { - CoreConfig, - DocsOptions, - Options, - StorybookConfig, - normalizeStories, - logConfig, -} from '@storybook/core-common'; +import type { CoreConfig, DocsOptions, Options, StorybookConfig } from '@storybook/core-common'; +import { normalizeStories, logConfig } from '@storybook/core-common'; import { telemetry } from '@storybook/telemetry'; import { getMiddleware } from './utils/middleware';