-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Optional Chaining and null coalescing not working #1660
Comments
I believe this is an issue with Babel via React-docgen, as seen here. Edit: see this issue as well |
+1 My work around is not great. |
We only use Babel to compile Styleguidist code, if you see any warning like this, they are coming from your project. |
I believe this is not completely true, as it's Babel/ast-types as used by React-docgen. Which still perhaps does not make it an issue with styleguidist necessarily, as it has been present in issues with storybook as well. However, I do think this is still an issue and shouldn't be closed, but the only fix is for this issue in ast-types to be fixed, react-docgen updating its dependencies and then styleguidist as well. |
Current behavior
Latest version of Styleguide uses Babel v.7.9.0. Since of v7.8.0 babel supports optional chaining (https://babeljs.io/blog/2020/01/11/7.8.0) but when I use it
obj?.prop
in styleguide environment app doesnt start and throws errorTo reproduce
rlesniak/example@8fdeeac
Expected behavior
Should work with that features
The text was updated successfully, but these errors were encountered: