Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeddy3/stylelint-config-alphabetical-order
A shareable config for Stylelint that orders properties alphabetically
https://github.com/jeddy3/stylelint-config-alphabetical-order
Last synced: 15 days ago
JSON representation
A shareable config for Stylelint that orders properties alphabetically
- Host: GitHub
- URL: https://github.com/jeddy3/stylelint-config-alphabetical-order
- Owner: jeddy3
- License: mit
- Created: 2024-12-18T11:51:16.000Z (23 days ago)
- Default Branch: main
- Last Pushed: 2024-12-18T13:42:42.000Z (23 days ago)
- Last Synced: 2024-12-18T13:45:35.357Z (23 days ago)
- Language: JavaScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# stylelint-config-alphabetical-order
[![NPM version](https://img.shields.io/npm/v/stylelint-config-alphabetical-order.svg)](https://www.npmjs.com/package/stylelint-config-alphabetical-order) [![Actions Status](https://github.com/jeddy3/stylelint-config-alphabetical-order/workflows/node-ci/badge.svg)](https://github.com/jeddy3/stylelint-config-alphabetical-order/actions)
A shareable config for [Stylelint](https://stylelint.io) that alphabetically orders properties.
## Installation
```bash
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](https://www.npmjs.com/package/stylelint-order) plugin so that:
- properties are ordered alphabetically
- the [`all`](https://drafts.csswg.org/css-cascade/#all-shorthand) property comes first regardless
- declarations come before nested rules
- custom properties come before properties
- nested style rules come before nested at-rulesThe [standard Stylelint config](https://www.npmjs.com/package/stylelint-config-standard) includes [a rule](https://stylelint.io/user-guide/rules/declaration-block-no-shorthand-property-overrides) that'll flag any shorthand property overrides introduced by reordering.
## [Changelog](CHANGELOG.md)
## [License](LICENSE)