Skip to content

A plugin pack of order related linting rules for Stylelint.

License

Notifications You must be signed in to change notification settings

hudochenkov/stylelint-order

Repository files navigation

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/order": [
			"custom-properties",
			"declarations"
		],
		"order/properties-alphabetical-order": true
		// ...
	}
}

List of rules

Thanks

properties-order and 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.