Closed karlhorky closed 1 year ago
@karlhorky Thanks for using the template.
Your suggestion seems interesting, but this official demo app focuses on the built-in rules for standard CSS syntax only, and additionally we've discussed the deprecation of @stylelint/postcss-css-in-js
. So I believe it's difficult to add 3rd-party rules and support CSS-in-JS syntaxes.
Oh that's too bad, reading a bit into it, I guess Stylelint does not want to maintain CSS-in-JS linting packages anymore.
I have opened the following issue to ask for a customSyntax
for Styled Components / Emotion here:
I will also close #343 here, because it sounds like support for Stylelint + CSS-in-JS will not come from the Stylelint team.
In the meantime, there have been two custom syntaxes published 🎉🙌
postcss-styled-syntax
by @hudochenkov https://github.com/styled-components/styled-components/issues/3897#issuecomment-1372362580postcss-styled-components
by @43081j https://github.com/styled-components/styled-components/issues/3897#issuecomment-1365245338I would suggest that anyone looking to set up Stylelint with Emotion or Styled Components to try these out!
Super big thanks to @43081j and @hudochenkov for putting in the work to get these out the door!
What is the problem you're trying to solve?
Easily find a current, working configuration for Styled Components, Emotion or other CSS-in-JS solutions.
What solution would you like to see?
A recommended, working configuration, even if not "ideal" (eg. a custom Styled Components syntax for Stylelint v14 may be ideal, but it doesn't exist yet).
Potentially one of the following configurations could be used as a base for this:
customSyntax: 'postcss-scss', processors: ['stylelint-processor-styled-components']
customSyntax: '@stylelint/postcss-css-in-js'
(but this is buggy 😬)