Open monsieurnebo opened 2 years ago
postcss-lit likely won't work out of the box on styled-components (or at least not entirely).
really we need a new postcss-styled-components syntax. i started creating one of those but didn't find time to finish it yet. i have a busy few weeks ahead but will try have another look at it.
ill also update the thread you linked to if i get chance. im not aware of a solution out of the box until we do that
@43081j Thanks for your answer.
really we need a new postcss-styled-components syntax. i started creating one of those but didn't find time to finish it yet. i have a busy few weeks ahead but will try have another look at it.
I'm looking forward to this!
One error I ran into (the same babel parser issue) was that I was using a processor (linaria) and needed to remove it in order to let postcss-lit (and babel under the hood) parse the whole file, not just the css.
You may want to try:
- "processors": ["stylelint-processor-styled-components"],
+ "processors": [],
"extends": [
"stylelint-config-standard-scss",
"stylelint-config-styled-components"
],
"customSyntax": "postcss-lit",
Hi folks,
postcss-lit & styled-components ?
I'm looking for the "2022 right way of linting styled components", and
postcss-lit
has been brought in this discussion.From my understanding: ✅ it does grant stylelint the ability to extract CSS from JS template literals... 🔴 ... But it does not add the "whole styled components" syntax support.
Am I right?
Usage error
I just gave a try to the package with the following stylelint config:
Which leads me to the following error:
Isn't is supposed to work? 🤔
Thanks for your work.
Related to: https://github.com/43081j/postcss-lit/issues/24