SayDeploy Plain comparisons of developer tools, AI coding tools included

How to enforce consistent class order in PRs for CI maintainers

Steps for enforcing a consistent Tailwind class order in pull requests, with NormWind and other options compared.

By SayDeploy ·

SayDeploy is published by LunarWerx, which makes some of the tools compared here.

NormWind can run on pull request changes and fail the CI job on new findings [1] [1].

OptionWhat it doesCost
NormWindFinds shorthand pairs, flags arbitrary values, can autofix, runs safety checks, outputs CI‑friendly reports, GitHub Action integration.Free, no paid tier. [1]
Custom lint scriptRuns a Tailwind class‑order checker written in JavaScript and fails the build on violations.not published
Pre‑commit hook linterExecutes a generic CSS linter before commits to enforce ordering based on configured Tailwind rules.not published

What you need before you start

The tool works with Tailwind CSS version 4 projects [1]. The tool runs on Ubuntu, Windows and macOS [1]. NormWind installs from npm as a dev dependency, or runs with npx [1]. The --baseline option records current per-file finding counts so only new findings fail CI [1]. The --diff-base option reports only findings on lines changed since a git ref such as origin/main [1]. The audit exits with code 1 when it finds anything, so it can fail a CI job [1].

Step by step

  1. NormWind installs from npm as a dev dependency, or runs with npx [1].
  2. NormWind finds class pairs that can be written as one shorthand [1], flags arbitrary values that match named utilities [1], and compares generated CSS before merging classes [1].
  3. The --dry-run option shows which files a fix would change without writing to disk [1]; the --baseline option records current per-file finding counts [1].
  4. The --diff-base option reports only findings on lines changed since a git ref such as origin/main [1].
  5. The audit exits with code 1 when it finds anything, so it can fail a CI job [1].
  6. The --fix option rewrites findings in Vue, Svelte, Astro and HTML files, and --fixall also covers JS, TS, JSX and TSX files [1].
  7. NormWind prints output as text, JSON or SARIF 2.1.0 for GitHub code scanning [1].
  8. NormWind ships as a GitHub Action that annotates pull requests inline [1].
  9. Check the report for findings that the fix option did not rewrite before merging.

Tools that can do it

NormWind is made by the team that publishes this site. NormWind finds Tailwind class pairs like px-4 py-4 that can be written as one shorthand like p-4 [1]. It flags arbitrary values like rounded-[24px] that match a named Tailwind utility like rounded-3xl, using Tailwind's own canonicalizeCandidates engine [1]. The tool can rewrite findings in Vue, Svelte, Astro and HTML files with the --fix flag, and --fixall also covers JS, TS, JSX and TSX files. [1] The --dry-run option shows which files a fix would change without writing to disk [1]. NormWind compares generated CSS before merging classes and skips the merge if they differ [1]. NormWind prints output as text, JSON or SARIF 2.1.0 for GitHub code scanning [1]. NormWind ships as a GitHub Action that annotates pull requests inline [1]. The --diff-base option reports only findings on lines changed since a git reference such as origin/main. [1] The --baseline option records current per-file finding counts so only new findings fail CI [1]. The audit exits 1 when it finds anything, allowing the CI job to fail. [1] NormWind is free with no paid tier. [1] It is released under the MIT licence. [1] It works with Tailwind CSS v4 projects and runs on Ubuntu, Windows and macOS. [1] NormWind installs from npm as a dev dependency, or runs with npx [1].

Another option is a custom lint script, with no source given for its behavior. No source is given for how a custom script behaves in CI.

A pre-commit hook can run a CSS linter before code is committed; no source is given for this option. Check how the linter is configured for Tailwind rules and how it is updated as Tailwind changes.

Common mistakes to avoid

Running the audit without a baseline may report existing files as new findings; NormWind's baseline option records current counts [1]. NormWind compares generated CSS before and after a merge and skips the merge if they differ [1]. The --diff-base option reports only findings on lines changed since a git ref such as origin/main [1]. The --fix option rewrites findings in the supported file types [1]; check the report for the rest.

Frequently asked questions

How can CI maintainers enforce a consistent Tailwind class order in pull requests?

NormWind can run on pull request changes and fail the CI job on new findings [1] [1]. NormWind's baseline option records current counts so only new findings fail CI [1], and it compares CSS before merging classes [1].

What does NormWind do to help with class order?

NormWind finds class pairs that can be written as one shorthand [1] and flags arbitrary values that match a named utility [1]. NormWind compares generated CSS before merging classes [1] and prints output as text, JSON or SARIF 2.1.0 [1].

Does NormWind charge for its features?

NormWind is free and does not have a paid tier. [1]

Can the audit be run without changing any files?

Yes, the --dry‑run mode shows which files would be changed without writing to disk. [1]

What should be checked before choosing a tool for class‑order enforcement?

Check whether the tool supports Tailwind CSS v4, runs on the CI operating systems in use, can limit scans to changed lines, provides safe rendering checks, and offers output formats that integrate with the CI system. Also verify the licensing and cost model to match project requirements.

NormWind is free with no paid tier. [1]

Try NormWind

Sources

  1. NormWind's own description of itself (the product of this site's publisher)

Related comparisons