hudochenkov / stylelint-order

A plugin pack of order related linting rules for Stylelint.
MIT License
916 stars 61 forks source link

Does this plugin work with styled-component? #116

Closed zRelux closed 4 years ago

zRelux commented 4 years ago

I was wondering if this plugin works with styled components. If so if I could get a basic setup to try it out

hudochenkov commented 4 years ago

It does. There are some limitation to autofixing (some times it won't work to avoid breaking styles).

For basic setup you could try my config. Copy content of this file to .stylelintrc.js in the root of your projects.

Install stylelint and plugin:

npm install --save-dev stylelint stylelint-order

And run stylelint:

stylelint "src/**/*.js"