stylelint-config-alphabetical-order
A shareable config for Stylelint that alphabetically orders properties.
Installation
npm install --save-dev stylelint-config-alphabetical-order
Usage
Update your stylelint
config to:
```diff json { "extends": [ "stylelint-config-standard",
- "stylelint-config-alphabetical-order" ] } ```
Details
The config bundles and configures the stylelint-order plugin so that:
- properties are ordered alphabetically
- the
all
property comes first regardless - declarations come before nested rules
- custom properties come before properties
- nested style rules come before nested at-rules
The standard Stylelint config includes a rule that'll flag any shorthand property overrides introduced by reordering.