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

❓ Type safety in mdx files #763

Closed
apdrsn opened this issue Nov 4, 2021 · 3 comments
Closed

❓ Type safety in mdx files #763

apdrsn opened this issue Nov 4, 2021 · 3 comments

Comments

@apdrsn
Copy link

apdrsn commented Nov 4, 2021

Hi and thank you very much for making your code public - it's a very nice and comprehensive styleguide. πŸ‘
I am in the middle of creating one for my company using more or less the same stack. React, typescript and storybook.
I am very curious to find out if you managed to get mdx to check for types? I love the idea of making custom stories, but I don't like that it breaks my build without letting me know. I also experienced that it breaks without notice, if the file is missing a line break between code and heading for instance. Have you also experienced that?

Again - thanks a lot for letting your code live where I can learn from it. πŸ’―
And I hope it is okay that I ask you about this :)

Kind regards,
Anders

@apdrsn apdrsn added the question label Nov 4, 2021
@alexasselin008
Copy link
Member

Hi Anders!

Glad our repo could help you.

Sadly we did not find a way yet to statically check types in mdx files . I'm following this issue on the TypeScript github, hoping that they support it one day.

As for the line breaks between the code and the heading, i haven't experienced that, but maybe @patricklafrance has.

@patricklafrance
Copy link
Member

Hi @apdrsn

We also experienced issues with line breaks. MDX 2.0 should fix these issues but I think there is still a long way to go until it's release.

@apdrsn
Copy link
Author

apdrsn commented Nov 5, 2021

Thank you very much for the reply, @patricklafrance and @alexasselin008.
We'll just need to be patient and hope that it will arrive at some point.
I'll stick with CSF format for now (even though that also have some issues).
Have a very nice weekend πŸ‘

@apdrsn apdrsn closed this as completed Nov 5, 2021
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

No branches or pull requests

3 participants