psixdev / stylelint-order

A collection of order related linting rules for stylelint.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stylelint-order Build Status

A collection of order related linting rules for stylelint (in a form of a plugin).

Installation

npm install stylelint-order

Usage

Add stylelint-order to your stylelint config plugins array, then add rules you need to the rules list. All rules from stylelint-order need to be namespaced with order.

Like so:

// .stylelintrc
{
	"plugins": [
		"stylelint-order"
	],
	"rules": {
		// ...
		"order/declaration-block-order": [
			"custom-properties",
			"declarations"
		],
		"order/declaration-block-properties-alphabetical-order": true
		// ...
	}
}

List of rules

Thanks

declaration-block-properties-specified-order and declaration-block-properties-alphabetical-order code and readme are based on declaration-block-properties-order rule which was a stylelint's core rule prior stylelint 8.0.0.

About

A collection of order related linting rules for stylelint.

License:MIT License


Languages

Language:JavaScript 100.0%