-
Notifications
You must be signed in to change notification settings - Fork 71
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
Error message on wrong usage of macro #40
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super great. Thank you so much!
Could you add a test for this? Should hopefully be pretty straightforward :) You can use the error
function. Let me know if you need a hand.
Oh, and if you'd like you can add yourself to the contributors table with npm run add-contributor
👍
Thanks so much!
Codecov Report
@@ Coverage Diff @@
## master #40 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 4 4
Lines 98 100 +2
Branches 20 21 +1
=====================================
+ Hits 98 100 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect. Thank you!
What:
Error message when macro is used in wrong way (not tagged template literal, function call or JSX).
Why:
Was a TODO in the source and improves developer experience and I wanted to look into how this thing and babel-macros works.
How:
Throw a new error and add additional branch for
JSXClosingElement
(otherwise each JSXElement will be prevaled twice)Couple of open questions from my side:
MacroError
? Im not sure about the difference.