Skip to content

oxlint-tailwindcssTailwind CSS linting for oxlint.

27 rules, designed for Tailwind v4. Deterministic, fast, fail-loud.

What is oxlint-tailwindcss? ​

oxlint-tailwindcss is a plugin for oxlint, the linter of the Oxc project, that lints Tailwind CSS v4 class names. It loads your project's design system from the CSS entry point you configure — its @theme tokens, @utility and @custom-variant definitions and plugins — and checks every class string in JSX, TSX, JavaScript and TypeScript (and the <script> of Vue, Svelte and Astro files) against it, with 27 rules, most with an autofix.

What it catches ​

Quick start ​

bash
pnpm add -D oxlint oxlint-tailwindcss
jsonc
// .oxlintrc.json
{
  "jsPlugins": ["oxlint-tailwindcss"],
  "settings": { "tailwindcss": { "entryPoint": "src/styles.css" } },
  "rules": {
    "tailwindcss/no-unknown-classes": "error",
    "tailwindcss/no-conflicting-classes": "error"
  }
}
bash
npx oxlint

entryPoint is the CSS file where you @import "tailwindcss". Setup has the recommended rules and the editor, monorepo and formatter setup.

Released under the MIT License.