Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { dependencies, devDependencies } = packageJson;
if (
framework === 'react' &&
((dependencies && dependencies['react-scripts']) ||
(devDependencies && devDependencies['react-scripts']))
) {
presetOptions = {
configureJSX: true,
};
}
const j = api.jscodeshift;
const root = j(file.source);
presetsAddPreset(`@storybook/addon-docs/preset`, presetOptions, { root, api });
return root.toSource({ quote: 'single' });
}