一份 Stylelint 配置,使用 stylelint-order 对 CSS 属性* 进行排序。
* 包含眼熟的和感兴趣的,欢迎补充。
安装 Stylelint,并将此包添加到你的项目中。
pnpm add -D stylelint stylelint-config-random-order
配置你的 stylelint 配置文件(.stylelintrc.json
)以启用此包。
{
+ "extends": ["stylelint-config-random-order"],
- // this package already does for you
- "plugins": ["stylelint-order"],
+ "rules": {
+ // Add overrides and additional rules here
+ }
}