Latest Results
feat(useSortedClasses): sort with the Tailwind v4 engine and read the project stylesheet
Switch the rule to the Tailwind CSS v4 sort engine and remove the v3
engine. Classes now sort the way Tailwind v4 and prettier-plugin-tailwindcss
do: utilities in the order Tailwind emits them, variants grouped and
ordered after plain utilities, and unrecognized classes kept at the front
in their original order.
Add a `stylesheet` option pointing at the project's Tailwind CSS entry
file. The rule reads the `@theme`, `@utility`, and `@custom-variant`
directives of that file and the stylesheets it imports, and sorts custom
utilities, variants, breakpoints, and theme keys the way Tailwind does, so
the result matches prettier-plugin-tailwindcss on projects with custom
classes.
Stylesheet resolution goes through the module graph as a memoized query
keyed on the stylesheet's module: it is computed once per stylesheet and
recomputed only when a CSS file changes, and the rule reads no files
directly. The rule runs in the Project domain.
Fixtures under tests/sort_v4/stylesheet snapshot byte-identical to the
getClassOrder output produced by
packages/tailwindcss-config-analyzer/src/v4/oracle-with-css.ts.johncarmack1984:feat/use-sorted-classes-stylesheet-parity Latest Branches
0%
johncarmack1984:feat/use-sorted-classes-stylesheet-parity 0%
0%
© 2026 CodSpeed Technology