Skip to content

prefer-sorted-utilities

Reports utilities that are not in sorted order.

This rule reports utilities that are not in the order that stillwind fmt uses. The order does not change the CSS. A consistent order makes utilities easier to read and diffs smaller. The stylistic preset enables this rule.

Reported

style("px-4 flex");prefer-sorted-utilities: utilities are not in compiler order

Fixed

style("flex px-4");

How to fix

Run stillwind fmt, or stillwind lint --fix with this rule enabled. The editor also sorts on save with source.sort.stillwind.

stillwind fmt sorts even when this rule is off. To stop all sorting, set sort: false. See Sorting.

Rule settings

PresetSeverity
recommendedoff
strictoff
stylisticwarn

Configure lint to change the severity or options.

The CLI and the editor report this rule only when they analyze the whole project.