stylelint-rational-order-plugin
Stylelint config that sorts related property declarations by grouping together following the order:
- Positioning
- Box Model
- Typography
- Visual
- Animation
- Misc
Usage
- Add stylelint and this package to your project:
npm install --save-dev stylelint stylelint-rational-order-plugin# or, if you prefer yarn over npm: yarn add --dev stylelint stylelint-rational-order-plugin
- Add this package to the end of your extends array inside Stylelint configuration (.stylelintrc for example):
"plugins": "stylelint-rational-order-plugin" "plugin/rational-order": true
Options
Boolean, or an array of options, where the first element is true
, and the second is an options object.
Boolean option
true
: Enables the plugin.
false
: Disables the plugin.
Optional secondary options
"borderInBoxModel": Boolean
Default border property belongs to the visual section "borderInBoxModel": false
. If true
border property belongs to the box model section.
"emptyLineBeetweenGroup": Boolean
This option adds an empty line between groups. Default false
.