SayDeploy Plain comparisons of developer tools, AI coding tools included

How NormWind lints Tailwind classes in CI safely

NormWind checks Tailwind CSS class names and can fail a CI job when it finds issues. It is free and released under the MIT licence.

By SayDeploy ยท

SayDeploy is published by the makers of NormWind; this page explains how NormWind works from the maker's own description.

NormWind is a free tool that checks Tailwind CSS class names and can fail a CI job when it finds issues. [1] [1] It works with Tailwind CSS v4 projects. [1] It is released under the MIT licence. [1]

OptionWhat it does
Shorthand auditFinds Tailwind class pairs like px-4 py-4 that can be written as one shorthand like p-4. [1]
Arbitrary value checkFlags arbitrary values like rounded-[24px] that match a named Tailwind class like rounded-3xl. [1]
Automatic fixingRewrites findings in Vue, Svelte, Astro and HTML files, and a broader setting also covers JavaScript and TypeScript files. [1]
Preview modeShows which files a fix would change without writing to disk. [1]
Render safety checkCompares the generated CSS before and after a merge and skips the merge if the two differ. [1]
Output formatsPrints output as text, JSON or SARIF 2.1.0. JSON is a structured report format, and GitHub code scanning can read the SARIF report to show findings. [1]
GitHub ActionShows findings beside the relevant lines in pull requests. [1]
Changed-lines reportingReports only findings on lines changed since a git reference such as origin/main. [1]
BaselineRecords current per-file finding counts so only new findings fail CI. [1]
CI exit codeExits with code 1 when it finds anything, so it can fail a CI job. [1]

What it does and why

NormWind is made by the team that publishes this site.

It finds Tailwind class pairs like px-4 py-4 that can be written as one shorthand like p-4. [1]

It also flags arbitrary values like rounded-[24px] that match a named Tailwind class like rounded-3xl. [1]

Before it merges any classes, it compares the generated CSS from before and after the change, and it skips the merge if the two differ. [1]

NormWind prints output as text, JSON or SARIF 2.1.0 for GitHub code scanning. [1]

It also ships as a GitHub Action that shows findings beside the relevant lines in pull requests. [1]

How it works step by step

  1. Install NormWind from npm as a dev dependency, or run it with npx. [1]
  1. Run the audit. It exits with code 1 when it finds anything, which lets a CI job fail. [1]
  1. Preview any fix first. The preview mode shows which files a fix would change without writing to disk. [1]
  1. Apply fixes. Automatic fixing rewrites findings in Vue, Svelte, Astro and HTML files. [1] A broader setting also covers JavaScript and TypeScript files, including JSX and TSX. [1]
  1. Limit the report to changed lines. The changed-lines option reports only findings on lines changed since a git reference such as origin/main. [1]
  1. Record a baseline. The baseline records current per-file finding counts, so only new findings fail the build. [1]
  1. Show findings in pull requests. The GitHub Action shows findings beside the relevant lines in pull requests. [1]

Things to check before you choose

Automatic fixing covers Vue, Svelte, Astro and HTML files, and JavaScript and TypeScript files need the broader setting. [1]

When the render safety check finds that the generated CSS would change, the merge is skipped rather than applied. [1]

The facts on this page do not say whether NormWind supports Tailwind CSS versions before v4, so check your project's version before you rely on it.

The facts here also do not cover CI services other than GitHub, so check how your provider runs a command-line tool before you set it up.

What you need to run it

NormWind works with Tailwind CSS v4 projects, and its CI runs on Ubuntu, Windows and macOS. [1]

You install it from npm as a dev dependency or run it with npx. [1]

NormWind is free with no paid tier. [1]

It is released under the MIT licence. [1]

Frequently asked questions

Can NormWind run in GitHub Actions to check pull requests?

NormWind ships as a GitHub Action that shows findings beside the relevant lines in pull requests. [1] The audit exits with code 1 when it finds anything, which lets a CI job fail on those findings. [1] To limit the report to changed lines, use the changed-lines option with a git reference such as origin/main. [1]

Is NormWind free to use on a team project?

NormWind is free with no paid tier. [1] It is released under the MIT licence. [1] The facts on this page do not list a cost for running it in CI, so check your own CI provider's pricing for build minutes or runners before you set it up.

Can NormWind fix Tailwind classes automatically?

Yes. Automatic fixing rewrites findings in Vue, Svelte, Astro and HTML files. [1] A broader setting also covers JavaScript and TypeScript files, including JSX and TSX. [1] Before any write, the preview mode shows which files would change without writing to disk. [1] Merges are skipped when the render safety check finds that the generated CSS would change. [1]

Does NormWind work with Tailwind CSS v4?

NormWind works with Tailwind CSS v4 projects. [1] It can flag arbitrary values like rounded-[24px] that match a named class like rounded-3xl. [1] The facts on this page do not say whether it supports older Tailwind versions, so confirm your project's version against the install instructions before you adopt it.

How does NormWind check that a class merge will not change styles?

Before it merges classes, NormWind compares the generated CSS before and after the change. [1] If the two differ, it skips the merge. [1] A preview mode shows which files a fix would change before anything is written. [1] The baseline option records current per-file finding counts, so only new findings fail CI. [1]

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