[postcss-linaria] Allow for alias of css
in config
#1423
Labels
cat: modules aliasing 🔗
Issue related to modules aliasing
enhancement: proposal 💬
Improvement of current behaviour that needs to be discussed
needs: triage 🏷
Issue needs to be checked and prioritized
Describe the enhancement
Supply the ability to declare aliases for
css
andstyled
when runningstylelint
analysis for projects that export those methods fromlinaria
with a different name.Motivation
I'm using atomic styles in a personal project. I recently added
stylelint
withproperty-disallowed-list
to flag uses ofmargin
andpadding
, (to prompt usingmargin-left
instead, etc) and it wasn't working... at all.After a day of digging, it turned out the reason was I had abstracted the use of
linaria
out to a local import. And since I was needing to apply global styles for a component library, to differentiatecss
fromcore
andatomic
, I had done the following:and
Because
postcss-linaria
looks specifically forcss
andstyled
the string literals weren't being flagged.Possible implementations
Allow the ability to configure the syntax with aliases to each named method:
Related Issues
None I could find.
The text was updated successfully, but these errors were encountered: