stylelint / stylelint-demo

The online demo on the Stylelint website
https://stylelint.io/demo/
MIT License
15 stars 8 forks source link

Demo of recommended configuration for Styled Components / Emotion / other CSS-in-JS #343

Closed karlhorky closed 1 year ago

karlhorky commented 1 year ago

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:

ybiquitous commented 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.

karlhorky commented 1 year ago

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.

karlhorky commented 1 year ago

In the meantime, there have been two custom syntaxes published 🎉🙌

I 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!