antfu / eslint-config

Anthony's ESLint config preset

Home Page:https://eslint-config.antfu.me/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider adding some tool to sort CSS properties.

stefanobartoletti opened this issue · comments

Clear and concise description of the problem

First of all thanks for integrating the ability to lint also CSS files in the latest versions.

I think it would be a nice thing to have some sort of preset for ordering CSS properties, in order to have a more logical disposition and also help with git merges.

In my current config based on stylelint I am using https://github.com/stormwarning/stylelint-config-recess-order
and it does the job very nicely.

Suggested solution

Since at the moment you have included Prettier to lint CSS, you can consider this

https://github.com/Siilwyn/prettier-plugin-css-order

which in turn seems to be based on the more generic PostCSS

https://github.com/Siilwyn/css-declaration-sorter

If in the future you will consider dropping Prettier for good, another solution may need to be found, but at the moment this seems to be a nice solution

Alternative

No response

Additional context

No response

Validations