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

Files with only styled-jsx template literals require a React import #213

Closed
amcgee opened this issue Dec 12, 2019 · 1 comment · Fixed by #262
Closed

Files with only styled-jsx template literals require a React import #213

amcgee opened this issue Dec 12, 2019 · 1 comment · Fixed by #262
Assignees
Labels
bug Something isn't working released

Comments

@amcgee
Copy link
Member

amcgee commented Dec 12, 2019

This can be problematic since the React import is technically not used in the source file, but is required after transpilation with Babel. This causes an unused-import ESLint error in the source and a Create React App runtime error after transpilation in the shell.

This causes an ESLint error:

https://github.com/dhis2/data-visualizer-app/blob/epic/merge-dv-and-pt-apps-DHIS2-7687/packages/app/src/components/VisualizationOptions/styles/VisualizationOptions.style.js

If React is omitted:

Screen Shot 2019-12-12 at 10 02 15

Thanks again @edoardo!

@dhis2-bot
Copy link
Contributor

🎉 This issue has been resolved in version 3.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Development

Successfully merging a pull request may close this issue.

2 participants