Replies: 2 comments 1 reply
-
Hey Matheus, If you're only after the tw prop you can avoid the import altogether with babel-plugin-twin. I'm keen on adding a "tw hasn't been imported" warning too, but it'll only be possible with babel-plugin-twin running in your project. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thank you, @ben-rogerson! It works like a charm for my use case! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all!
In most of my cases, I use the
tw
directive within an HTML tag. The directive does not use any imported lib, but it depends on having an absolute import on every page that we use it. Example:The problem is: sometimes we forget to add the
twin.macro
during a refactor.I was wondering if we could apply a eslint rule or a warning when the file has a
tw
directive but notwin.macro
import. It's like the warning eslint shows when you use jsx without importing theReact
lib.Do you think it is possible?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions