Closed niklasmh closed 4 years ago
Doesnt storybook have a linter?
@kharann I think they have some kind of formatter, or something configurable in normal js-stories, but it seems like mdx-stories do something different as the issue only exists there. Now I am just guessing, but it currently seems like a problem with the MDX implementation. I also noticed now that if we go back to normal old fashion stories (aka no MDX), we will not get the source code at all. This is apparently a known issue as well: https://github.com/storybookjs/storybook/issues/8104. Another thing to notice is that this is only an issue with TS. Luckily for us they are actually working on it as we speak: https://github.com/storybookjs/storybook/pull/8499
It is a @storybook/addon-docs
problem, meaning it should probably be fixed by them. But if anyone here wants to debug and track down the core issue, you are more than welcome😄 It is still hacktober, so if you are up for a challenge, go for it!
They have it on their TODO, so they will hopefully fix it in the future:
Describe the bug
The source code in the storybook examples is misformatted.
This is probably a core storybook problem as someone else has already filed an issue on the topic: https://github.com/storybookjs/storybook/issues/8078
To Reproduce
Feedback
->Spinner
->Show code
Expected behavior
We want a pretty output:
Screenshots
Thus we are getting this instead: