-
Notifications
You must be signed in to change notification settings - Fork 262
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
Display errors in styled-jsx #234
Comments
I had conversation with @giuseppeg in slack, he recon two possible ways:
export default `
/* @styled-jsx */
div { color }
`
This would be logged for any invalid css string i.e. if you are exporting a message or any other string that is not css you'd get this warning. Eg. export default `I ❤️ pizza` see conversationg [10 minutes ago] g [10 minutes ago] ron [9 minutes ago] ron [9 minutes ago] g [8 minutes ago] ron [7 minutes ago] g [7 minutes ago] g [6 minutes ago] g [6 minutes ago] export default `
/* @styled-jsx */
div { color }
` ron [5 minutes ago] g [5 minutes ago]
|
Just had the same problem! Damn typos. AFAIK errors are not detected by the transformer, rules are just passed "as is" and included in the build for the browser to handle. I think the best option would be to try and use stylelint as described here: Or wait until a linter plugin is available on stylis: |
in v2 i am going to remove autodetection and force people to tag styles so that there is no magic and it won't fail silently |
Fixed by #288 |
If there is an css error, styled-jsx just silently swollen it, which cause very difficult to fix the issue. Anyway to make it explicit? See examples below
css.js
The text was updated successfully, but these errors were encountered: