From 978420d0ba8be237313f8fc5bb51944da798bf2e Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sat, 18 Sep 2021 15:56:32 +0800 Subject: [PATCH] Fix deepscan errors --- lib/core-server/src/utils/stories-json.ts | 3 --- lib/csf-tools/src/CsfFile.ts | 3 --- 2 files changed, 6 deletions(-) diff --git a/lib/core-server/src/utils/stories-json.ts b/lib/core-server/src/utils/stories-json.ts index f01d63fe9af..aed48269c4b 100644 --- a/lib/core-server/src/utils/stories-json.ts +++ b/lib/core-server/src/utils/stories-json.ts @@ -16,9 +16,6 @@ type ExtractedStories = Record; async function extractStories(normalizedStories: NormalizedStoriesEntry[], configDir: string) { const storiesGlobs = normalizedStories.map((s) => s.glob); - if (!storiesGlobs) { - throw new Error('No stories glob'); - } const storyFiles: string[] = []; await Promise.all( storiesGlobs.map(async (storiesGlob) => { diff --git a/lib/csf-tools/src/CsfFile.ts b/lib/csf-tools/src/CsfFile.ts index 0961ebbf475..91a377aad43 100644 --- a/lib/csf-tools/src/CsfFile.ts +++ b/lib/csf-tools/src/CsfFile.ts @@ -1,5 +1,4 @@ /* eslint-disable no-underscore-dangle */ -import global from 'global'; import fs from 'fs-extra'; import { parse } from '@babel/parser'; import generate from '@babel/generator'; @@ -7,8 +6,6 @@ import * as t from '@babel/types'; import traverse, { Node } from '@babel/traverse'; import { toId, isExportStory, storyNameFromExport } from '@storybook/csf'; -const { FEATURES = {} } = global; - const logger = console; interface Meta { title?: string;