goober icon indicating copy to clipboard operation
goober copied to clipboard

How to lint the css written using stylelint or eslint ?

Open mohamedfasil opened this issue 2 years ago • 3 comments

How to lint the css code written in JS / TS files using stylelint or eslint ?

mohamedfasil avatar Nov 03 '21 05:11 mohamedfasil

Hi @mohamedfasil!

That's a good question. I am not that familiar with either but is it possible to use them for css-in-js? 🤔 do styled-components or emotion found a way to support it? It'll be similar or exactly the same if they do.

cristianbote avatar Nov 03 '21 06:11 cristianbote

Hi @cristianbote, thanks for the reply I was able to add lint support using stylelint, I just followed the documentation for styled-components Maybe we can add this to the documentation, might be helpful for someone

mohamedfasil avatar Nov 03 '21 06:11 mohamedfasil

That's awesome! For sure, adding it to the documentation sounds great! Feel free to open up the PRs.

cristianbote avatar Nov 03 '21 07:11 cristianbote