Scan your whole stack
From OX Research Newsroom
Are you using tailwind-lint?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.17.2
tailwind-lint was last scanned on 23 Nov 2026 at version 0.17.2. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.17.2 LATEST | 23 Nov 2026 | No rules fired |
| 0.17.1 | 17 Nov 2026 | No rules fired |
| 0.17.0 | 7 Nov 2026 | No rules fired |
| 0.16.2 | 7 Nov 2026 | Not shown |
| 0.16.1 | 3 Nov 2026 | Not shown |
Findings for v0.17.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.17.2; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
It just lints your Tailwind project as the IDE will do, just on the command line.
Supports Tailwind CSS v4 (CSS config files and Vite projects using @tailwindcss/vite) and v3 (JavaScript config, legacy).
# npm
npm install -g tailwind-lint
# pnpm
pnpm add -g tailwind-lint
# npx (no installation)
npx tailwind-lint "src/**/*.html"
# pnpm dlx (no installation)
pnpm dlx tailwind-lint "src/**/*.html"
# fastest way to lint and fix issues
npx tailwind-lint --auto --fix
tailwind-lint [options] [files...]
Simply run tailwind-lint in your project directory - it automatically discovers your Tailwind config and files:
# Auto-discover config and lint files
tailwind-lint
# Fix issues automatically
tailwind-lint --fix
# Verbose mode for debugging
tailwind-lint --verbose
Tailwind CSS v4:
app.css, index.css, tailwind.css, global.css, etc../, ./src/, ./src/styles/, ./app/, etc.vite.config.* files that use @tailwindcss/vite@theme tokens and @source directives are available to diagnostics@source directives if present./**/*.{js,jsx,ts,tsx,html,vue,svelte,astro,mdx}src/styles/global.css), files are discovered from the project rootTailwind CSS v3:
tailwind.config.js, tailwind.config.cjs, tailwind.config.mjs, tailwind.config.tscontent array in your config, resolved from the package root (or from the config file with content.relative: true)Monorepos:
package.json workspaces or pnpm-workspace.yaml are detected; without a workspace definition every directory with a package.json is treated as a packagetailwindcss is resolved from the config's package first, falling back to the working directory--verbose to see which config each package uses-c, --config <path> - Path to Tailwind config file (default: auto-discover)-a, --auto - Auto-discover files from the resolved Tailwind config or CSS @source directives--fix - Automatically fix problems that can be fixed--dry-run - Show the fixes --fix would apply (with a line diff) without writing any files--concurrency <number|auto> - Worker threads for linting and fixing (default: 1)--format <text|json> - Output format (text default, json for machine-readable output)-v, --verbose - Enable verbose logging for debugging-h, --help - Show help message--version - Show version number# Lint specific files only
tailwind-lint "src/**/*.{js,jsx,ts,tsx}"
# Specify a custom config location
tailwind-lint --config ./config/tailwind.config.js
# Scan files based on an explicit config
tailwind-lint --config ./src/app.css
# Lint and fix specific file types
tailwind-lint "**/*.vue" --fix
# Preview fixes without changing files
tailwind-lint --dry-run
# Lint with a specific CSS config (v4)
tailwind-lint --config ./styles/app.css
# Lint a Vite-based Tailwind v4 project
tailwind-lint --auto
# Machine-readable output for LLMs/agents
tailwind-lint --auto --format json
Use JSON output to avoid brittle text parsing:
tailwind-lint --auto --format json
The JSON payload includes:
ok - true when no errors are foundsummary - counts for errors, warnings, fixable, fixed, filesWithIssues, totalFilesProcessedconfig - resolved runtime values (cwd, configPath, autoDiscover, fix, dryRun, patterns)files[] - per-file diagnostics with 1-based line/column rangesOn JSON errors, the CLI keeps the same top-level shape and adds error so agent integrations do not need a separate parser for failure cases.
Typical agent flow:
tailwind-lint --auto --format json.summary.errors > 0, fail the check and surface diagnostics.--fix when autofix is allowed.Create a CSS config file (app.css, index.css, or tailwind.css):
@import "tailwindcss";
@theme {
--color-primary: #3b82f6;
}
@source "./src/**/*.{js,jsx,ts,tsx,html}";
The CLI auto-detects configs at: app.css, src/app.css, index.css, src/index.css, tailwind.css, src/tailwind.css
You can also use a Vite-based Tailwind v4 project with @tailwindcss/vite and no standalone Tailwind CSS config file:
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [tailwindcss()],
});
If a real CSS config is also present, the CLI uses that file so custom @theme tokens and @source directives are available to diagnostics.
The CLI also reads Tailwind workspace settings from common editor config files so extraction behavior can match your editor more closely.
Class extraction matches the Tailwind language server defaults: class attributes such as class and className are linted, but plain JS/TS string literals are not. To lint class strings outside attributes, configure classFunctions (e.g. cva, cx) or experimental.classRegex.
Supported locations:
.zed/settings.json.vscode/settings.jsonOther editors' settings (e.g. JetBrains .idea) are not read. Whatever editor you use, put shared Tailwind settings in one of the files above so the CLI and CI pick them up.
Supported settings:
classFunctionsexperimental.classRegexclassAttributesincludeLanguagesfiles.excludelintrootFontSizeZed format:
{
"lsp": {
"tailwindcss-language-server": {
"settings": {
"classFunctions": ["cva", "cx"],
"experimental": {
"classRegex": ["tw=\"([^\"]*)\""]
}
}
}
}
}
VS Code format:
{
"tailwindCSS.classFunctions": ["cva", "cx"],
"tailwindCSS.experimental": {
"classRegex": ["tw=\"([^\"]*)\""]
}
}
Create a JavaScript config file (tailwind.config.js):
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
plugins: [],
};
Opt in to multiple CPU cores with --concurrency. It works for both linting and autofix:
tailwind-lint --auto --concurrency 4
tailwind-lint --auto --concurrency 4 --fix
tailwind-lint --auto --concurrency auto --fix
Use a positive integer to choose the number of worker threads, or auto to use Node.js's available CPU parallelism. The number of workers is capped by the number of discovered files. The default, 1, runs in the main thread without starting workers.
Files are discovered and assigned to their Tailwind config before workers start. Each file is processed once, with the complete fix loop handled by one worker. Workers load independent Tailwind states before any fixes begin, and results remain sorted by file path, including in JSON output.
For v4 canonical class suggestions, workers collect candidates through the same language-service extraction and workspace settings used by validation. Suggestions are prepared once per config and font-size setting, then shared as plain strings. Classes introduced during fixing that are absent from that lookup use Tailwind's normal implementation.
Workers add startup time and memory usage for their Tailwind states. Small projects may be faster with --concurrency 1; compare values on your own project before choosing a default for CI. In the JavaScript API, pass concurrency: 4 or concurrency: "auto" to lint() from the built package.
To compare cold CLI runs on generated fixtures after building the project:
node scripts/benchmark-concurrency.mjs --files 80 --runs 3
node scripts/benchmark-concurrency.mjs --files 320 --fix-lines 10 --runs 3
The benchmark rotates the order of 1, 2, and 4 workers, includes startup in its timing, and checks identical diagnostics and fixed file contents. --output report.json saves individual measurements and medians. These synthetic workloads do not predict the speedup for every project.
Use --fix to automatically resolve issues:
Use --dry-run to preview the changes without writing them.
Fixes that do not overlap are applied together, and files are revalidated until no fixable issues remain. The autofix process has a safety limit of 100 iterations per file to prevent infinite loops.
Core (v3 & v4):
block flex, text-left text-center) - Note: Works reliably in v4, limited support in v3 - no autofix@applyconfig() and theme() functions@tailwind layer values--fix flagclass and className attributesv4-Specific:
top-[60px] → top-15)@source directive paths# Install dependencies
pnpm install
# Build for production
pnpm build
# Development mode (watch)
pnpm dev
# Run tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with coverage
pnpm test:coverage
# Format and lint code
pnpm format
# Check code without fixing
pnpm lint
# Preview next version locally (no publish)
pnpm release:dry
Releases are automated with Semantic Release on pushes to main.
NPM_TOKEN required.Commit examples:
feat: add json output mode -> minor releasefix: resolve v4 config discovery in monorepos -> patch releasefeat: drop Node 20 support + commit body BREAKING CHANGE: Node 20 is no longer supported -> major releaseperf: speed up config discovery -> patch releasedocs: update readme -> no releasepnpm release:dry runs against the local repo metadata (--repository-url .) so it does not require GitHub remote access.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.