/stylelint-order

A plugin pack of order related linting rules for stylelint.

Primary LanguageJavaScriptMIT LicenseMIT

stylelint-order Build Status

A plugin pack of order related linting rules for stylelint.

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.