---
tags: 前端工具
---
【筆記】StyleLint
===
- [RULE LIST](https://stylelint.io/user-guide/rules/list)
- [安裝教學](https://ithelp.ithome.com.tw/articles/10232650)
```
// package.json, scripts
"style-lint": "stylelint src/sass/**/*.{scss,sass}",
```
## autofix
- vscode安裝 stylelint 套件
## .stylelintrc.json
```
{
"extends": [
"stylelint-config-standard",
"stylelint-config-sass-guidelines"
],
"plugins": [
"stylelint-order",
"stylelint-scss"
],
"rules": {
"number-leading-zero": "never",
"at-rule-no-unknown": null,
"property-no-vendor-prefix": null,
"order/properties-order": [
"position",
"top",
"right",
"bottom",
"left",
"z-index",
"display",
"align-items",
"justify-content",
"float",
"clear",
"overflow",
"overflow-x",
"overflow-y",
"margin",
"margin-top",
"margin-right",
"margin-bogttom",
"margin-left",
"padding",
"padding-top",
"padding-right",
"padding-bottom",
"padding-left",
"width",
"min-width",
"max-width",
"height",
"min-height",
"max-height",
"font-size",
"font-family",
"font-weight",
"text-align",
"text-justify",
"text-indent",
"text-overflow",
"text-decoration",
"white-space",
"color",
"background",
"background-position",
"background-repeat",
"background-size",
"background-color",
"background-clip",
"border",
"border-style",
"border-width",
"border-color",
"border-top-style",
"border-top-width",
"border-top-color",
"border-right-style",
"border-right-width",
"border-right-color",
"border-bottom-style",
"border-bottom-width",
"border-bottom-color",
"border-left-style",
"border-left-width",
"border-left-color",
"border-radius",
"opacity",
"filter",
"list-style",
"outline",
"visibility",
"box-shadow",
"text-shadow",
"resize",
"transition"
]
}
}
```