Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve react docgen plugin usage #460

Merged
merged 1 commit into from Jul 25, 2022
Merged

Improve react docgen plugin usage #460

merged 1 commit into from Jul 25, 2022

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Jul 25, 2022

Fixes #456

This uses the same approach as storybook itself. The react-docgen plugin is used as long as the option is not set to false (previously we did not respect that), and it is used on all files unless the option is set to react-docgen-typescript, in which case it does not run on typescript files, and leaves those to the other plugin.

This also includes a change to always set savePropValueAsString on the typescript plugin, as storybook does, even though from what I can tell, storybook is fine even when it's set to false. But, it seems worth it to match storybook to avoid any subtle bugs or corner cases it might be intended to prevent.

@IanVS IanVS requested a review from joshwooding July 25, 2022 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] React/Docgen TypeScript detection insufficient in NPM monorepo.
2 participants