Skip to content
Back to search

oxlint-tailwindcss

Tailwind CSS v4 lint rules for oxlint that read your design system: unknown, conflicting and deprecated classes, theme colors and class order, with autofixes.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/sergioazoc/oxlint-tailwindcss with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/sergioazoc/oxlint-tailwindcss'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/sergioazoc--oxlint-tailwindcss/badge.svg)](/listings/sergioazoc--oxlint-tailwindcss)

HTML

<a href="/listings/sergioazoc--oxlint-tailwindcss"><img src="/api/listings/sergioazoc--oxlint-tailwindcss/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

pnpm add -D oxlint-tailwindcss

Add the plugin and your Tailwind entry point to `.oxlintrc.json`:

{
  "jsPlugins": ["oxlint-tailwindcss"],
  "settings": {
    "tailwindcss": {
      "entryPoint": "src/styles.css", // your CSS file with @import "tailwindcss"
    },
  },
  "rules": {
    "tailwindcss/no-unknown-classes": "error",
    "tailwindcss/no-conflicting-classes": "error",
    "tailwindcss/enforce-sort-order": "warn",
  },
}

Then run `oxlint`. See the [Setup guide](https://oxlint-tailwindcss.pages.dev/setup) for the recommended full rule set, monorepo patterns, and all `settings.tailwindcss` options.

> **Upgrading from v0.x?** `settings.tailwindcss.entryPoint` is now required — see the > [migration guide](https://oxlint-tailwindcss.pages.dev/migration/v0-to-v1).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 12 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "oxlint-tailwindcss",
  3. "owner": { "name": "Sergio Azocar", "url": "https://github.com/sergioazoc" },
  4. "description": "The oxlint-tailwindcss plugin for Claude Code.",
  5. "plugins": [
  6. {
  7. "name": "oxlint-tailwindcss",
  8. "source": "./agent/claude-code",
  9. "description": "Tailwind CSS v4 lint rules for oxlint, in Claude Code: diagnostics as Claude edits, a check of the files it edited before it finishes, and a skill for setting the plugin up."
  10. }
  11. ]
  12. }
README.md · README · 187 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <div align="center">
  2. # oxlint-tailwindcss
  3. **Tailwind CSS v4 linting rules for [oxlint](https://oxc.rs/docs/guide/usage/linter)** — fast,
  4. deterministic, with typo suggestions and autofixes.
  5. [![npm version](https://img.shields.io/npm/v/oxlint-tailwindcss?color=cb0000&label=npm)](https://www.npmjs.com/package/oxlint-tailwindcss)
  6. [![npm downloads](https://img.shields.io/npm/dm/oxlint-tailwindcss?color=cb0000)](https://www.npmjs.com/package/oxlint-tailwindcss)
  7. [![license](https://img.shields.io/npm/l/oxlint-tailwindcss?color=blue)](./LICENSE)
  8. [![docs](https://img.shields.io/badge/docs-oxlint--tailwindcss.pages.dev-2563eb)](https://oxlint-tailwindcss.pages.dev)
  9. [Documentation](https://oxlint-tailwindcss.pages.dev) ·
  10. [Documentación (ES)](https://oxlint-tailwindcss.pages.dev/es) · [Rules](#rules) ·
  11. [Changelog](./packages/oxlint-tailwindcss/CHANGELOG.md)
  12. </div>
  13. ---
  14. 27 lint rules that catch invalid classes, conflicts, and deprecated utilities, and keep your class
  15. strings canonical and sorted — reading your real Tailwind v4 design system (`@theme` tokens, shadcn
  16. variables, typography plugin) for exact, machine-independent results.
  17. ```tsx
  18. // oxlint-tailwindcss flags this:
  19. <div className="flex itms-center bg-blu-500 text-red-500 text-blue-500 flex-grow" />
  20. // ^^^^^^^^^^^ "itms-center" → did you mean "items-center"? (no-unknown-classes)
  21. // ^^^^^^^^^^ "bg-blu-500" → did you mean "bg-blue-500"?
  22. // text-red-500 / text-blue-500 both set "color" (no-conflicting-classes)
  23. // ^^^^^^^^^ "flex-grow" is deprecated in v4 → "grow" (no-deprecated-classes)
  24. // ...and autofixes this:
  25. <div className="text-red-500 flex items-center p-4" /> → <div className="flex items-center p-4 text-red-500" />
  26. // (enforce-sort-order — identical output to oxfmt and prettier-plugin-tailwindcss)
  27. ```
  28. ## Used by
  29. <p align="center">
  30. <a href="https://expo.dev"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/docs/public/users/expo-white.svg"><img src="packages/docs/public/users/expo.svg" alt="Expo" title="Expo" height="24"></picture></a>&nbsp;&nbsp;&nbsp;
  31. <a href="https://mastra.ai"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/docs/public/users/mastra-white.svg"><img src="packages/docs/public/users/mastra.svg" alt="Mastra" title="Mastra" height="24"></picture></a>&nbsp;&nbsp;&nbsp;
  32. <a href="https://skyward.ai"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/docs/public/users/skyward-white.svg"><img src="packages/docs/public/users/skyward.svg" alt="Skyward" title="Skyward" height="24"></picture></a>&nbsp;&nbsp;&nbsp;
  33. <a href="https://univer.ai"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/docs/public/users/univer-white.svg"><img src="packages/docs/public/users/univer.svg" alt="Univer" title="Univer" height="24"></picture></a>&nbsp;&nbsp;&nbsp;
  34. <a href="https://www.thebluealliance.com"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/docs/public/users/the-blue-alliance-white.svg"><img src="packages/docs/public/users/the-blue-alliance.svg" alt="The Blue Alliance" title="The Blue Alliance" height="24"></picture></a>&nbsp;&nbsp;&nbsp;
  35. <a href="https://retroachievements.org"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/docs/public/users/retroachievements-white.svg"><img src="packages/docs/public/users/retroachievements.svg" alt="RetroAchievements" title="RetroAchievements" height="24"></picture></a>&nbsp;&nbsp;&nbsp;
  36. <a href="https://tamery.app"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/docs/public/users/tamery-white.svg"><img src="packages/docs/public/users/tamery.svg" alt="Tamery" title="Tamery" height="24"></picture></a>&nbsp;&nbsp;&nbsp;
  37. <a href="https://stll.app"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/docs/public/users/stella-white.svg"><img src="packages/docs/public/users/stella.svg" alt="Stella" title="Stella" height="24"></picture></a>
  38. </p>
  39. ## Why
  40. - **Configure once, never fails** — declare your CSS entry point and every rule reads the same
  41. design system. Same input → same output on every machine and CI.
  42. - **Built for Tailwind v4** — reads your `@theme { … }` tokens, shadcn variables, and
  43. `@plugin`/`@import` plugins (`@tailwindcss/typography`, `tailwindcss-animate`, `tw-animate-css`).
  44. - **Coexists with oxfmt & Prettier** — point every tool at the same CSS and list your class helpers
  45. in the formatter, and they sort the same way.
  46. [Interop guide ↗](https://oxlint-tailwindcss.pages.dev/interop)
  47. - **Monorepo-ready** — one root config with a glob → CSS mapping, or one `.oxlintrc.json` per
  48. package. Both fully deterministic.
  49. - **Fail loud** — misconfiguration surfaces as a single `designSystemUnavailable` diagnostic with an
  50. actionable hint, never silently skipped rules, and a misspelt setting is named with the one you
  51. meant.
  52. - **Lightweight & fast** — native oxlint plugin with content-hash disk caching; only two runtime
  53. dependencies (`@tailwindcss/node`, `tailwindcss`).
  54. ## Quick start
  55. ```bash
  56. pnpm add -D oxlint-tailwindcss
  57. ```
  58. Add the plugin and your Tailwind entry point to `.oxlintrc.json`:
  59. ```jsonc
  60. {
  61. "jsPlugins": ["oxlint-tailwindcss"],
  62. "settings": {
  63. "tailwindcss": {
  64. "entryPoint": "src/styles.css", // your CSS file with @import "tailwindcss"
  65. },
  66. },
  67. "rules": {
  68. "tailwindcss/no-unknown-classes": "error",
  69. "tailwindcss/no-conflicting-classes": "error",
  70. "tailwindcss/enforce-sort-order": "warn",
  71. },
  72. }
  73. ```
  74. Then run `oxlint`. See the [Setup guide](https://oxlint-tailwindcss.pages.dev/setup) for the
  75. recommended full rule set, monorepo patterns, and all `settings.tailwindcss` options.
  76. > **Upgrading from v0.x?** `settings.tailwindcss.entryPoint` is now required — see the
  77. > [migration guide](https://oxlint-tailwindcss.pages.dev/migration/v0-to-v1).
  78. ## Rules
  79. 27 rules across four categories. Every rule has a
  80. [dedicated docs page](https://oxlint-tailwindcss.pages.dev/rules/) (EN/ES) with examples and
  81. options.
  82. <!-- generated:rule-list -->
  83. **Correctness** — `no-conflicting-classes` · `no-contradicting-variants` · `no-dark-without-light` ·
  84. `no-duplicate-classes` · `no-dynamic-classes` · `no-unknown-classes`
  85. **Modernization** — `enforce-canonical` · `enforce-negative-arbitrary-values` ·
  86. `no-deprecated-classes` · `no-unnecessary-arbitrary-value` · `prefer-scale-token` ·
  87. `prefer-theme-tokens`
  88. **Consistency** — `consistent-variant-order` · `enforce-consistent-important-position` ·
  89. `enforce-consistent-line-wrapping` · `enforce-consistent-variable-syntax` · `enforce-logical` ·
  90. `enforce-physical` · `enforce-shorthand` · `enforce-sort-order` · `no-unnecessary-whitespace`
  91. **Design-system guardrails** — `max-class-count` · `no-arbitrary-value` ·
  92. `no-borrowed-component-styles` (experimental) · `no-default-palette` · `no-hardcoded-colors` ·
  93. `no-restricted-classes`
  94. <!-- /generated:rule-list -->
  95. Classes are detected in `className`/`class` attributes, 14 utility helpers (`cn`, `clsx`, `cva`,
  96. `tv`, `twMerge`, …), `tw` tagged templates, and variables matching `/^classNames?$/`, `/^classes$/`,
  97. `/^styles?$/` (e.g. `className`, `classNames`, `classes`, `styles`) — all extendable via
  98. `settings.tailwindcss`.
  99. **Files:** everything oxlint lints — `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.cjs`, `.mts`, `.cts`.
  100. In `.vue`, `.svelte` and `.astro` files oxlint only passes plugins the `<script>` blocks (and
  101. Astro's frontmatter), so template and markup classes are not checked yet — see
  102. [Vue, Svelte & Astro](https://oxlint-tailwindcss.pages.dev/frameworks).
  103. ## AI coding agents
  104. ```bash
  105. npx skills add sergioazoc/oxlint-tailwindcss --skill oxlint-tailwindcss # the skill, for any agent
  106. ```
  107. In Claude Code, `/plugin marketplace add sergioazoc/oxlint-tailwindcss` and
  108. `/plugin install oxlint-tailwindcss@oxlint-tailwindcss` add the plugin: diagnostics as Claude edits,
  109. and a check of the files it edited before it finishes. See
  110. [AI coding agents](https://oxlint-tailwindcss.pages.dev/ai-agents).
  111. ## Requirements
  112. - Node.js `^20.19.0 || >=22.12.0` (the same range oxlint itself requires)
  113. - Tailwind CSS v4.1.15+ (older releases lack a design-system API the plugin needs)
  114. - oxlint ≥ 1.43.0
  115. ## Repository structure
  116. This is a pnpm monorepo:
  117. - **[`packages/oxlint-tailwindcss`](./packages/oxlint-tailwindcss)** — the published npm package.
  118. Full installation, configuration, and per-rule reference live in its
  119. [README](./packages/oxlint-tailwindcss/README.md).
  120. - **[`packages/docs`](./packages/docs)** — the VitePress documentation site at
  121. [oxlint-tailwindcss.pages.dev](https://oxlint-tailwindcss.pages.dev) (English at the root, Spanish
  122. at `/es`).
  123. - **[`skills/oxlint-tailwindcss`](./skills/oxlint-tailwindcss)** — the agent skill, and
  124. **[`agent/claude-code`](./agent/claude-code)** — the Claude Code plugin, listed by
  125. [`.claude-plugin/marketplace.json`](./.claude-plugin/marketplace.json).
  126. - **[`bench`](./bench)** — the benchmark behind
  127. [/benchmark](https://oxlint-tailwindcss.pages.dev/benchmark), outside the workspace.
  128. ## Development
  129. ```bash
  130. pnpm install # install all workspaces
  131. pnpm build # build the plugin
  132. pnpm test # run the plugin's test suite
  133. pnpm lint # lint the plugin sources
  134. pnpm typecheck # type-check
  135. pnpm -C packages/docs dev # run the docs site locally
  136. ```
  137. Top-level scripts (`build`, `test`, `lint`, `format`, `typecheck`) delegate to
  138. `packages/oxlint-tailwindcss`. Target a specific package with `pnpm -C packages/<name> <script>`.
  139. ## Contributing
  140. Bug reports and feature requests are welcome — please
  141. [open an issue](https://github.com/sergioazoc/oxlint-tailwindcss/issues). If a Tailwind plugin's
  142. classes aren't recognized, an issue with the CSS that triggers it helps a lot.
  143. ## License
  144. [MIT](./LICENSE) © [Sergio Azócar](https://sergioazocar.com)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.