Norbert de Langen f6a569903a
fix linting
2023-02-15 20:19:45 +01:00

19 lines
667 B
TypeScript

/* eslint-disable import/no-extraneous-dependencies */
import { logger } from '@storybook/node-logger';
import type { PluginOptions } from '../types';
const incompatiblePresets = ['@storybook/preset-scss', '@storybook/preset-typescript'];
export const checkPresets = (options: PluginOptions): void => {
const { presetsList } = options;
presetsList.forEach((preset: string | { name: string }) => {
const presetName = typeof preset === 'string' ? preset : preset.name;
if (incompatiblePresets.includes(presetName)) {
logger.warn(
`\`${presetName}\` may not be compatible with \`@storybook/preset-create-react-app\``
);
}
});
};