stylelint-logical-order
Stylelint config that sorts related property declarations by grouping together following the order:
- Special
- Position
- Box Model
- Border
- Box
- Spacing
- Typography
- Content Layout
- Visual
- Background
- Transform
- Animation
- Svg
- Misc.
.element
Usage
- Add stylelint and this package to your project:
npm install --save-dev stylelint stylelint-logical-order# or, if you prefer yarn over npm: yarn add --dev stylelint stylelint-logical-order
- Add this package to the end of your extends array inside Stylelint configuration (.stylelintrc for example):
"extends": "stylelint-logical-order"
Extended version with more settings
"stylelint": "rules": "at-rule-no-unknown": true "ignoreAtRules": "if" "for" "import" "else" "each" "mixin" "include" "content" "extend" "at-root" "order/order": "custom-properties" "dollar-variables" "declarations" "rules" "indentation": "tab" "extends": "stylelint-logical-order"