包详细信息

stylelint-config-alphabetical-order

jeddy316.2kMIT1.0.0

A shareable config for Stylelint that alphabetically orders properties

stylelint, stylelint-config, alphabetical, order

自述文件

stylelint-config-alphabetical-order

NPM version Actions Status

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.

Changelog

License