{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "shadcn-ui-lint--block-arbitrary-tailwind-values",
 "repo": "shadcn-ui/lint",
 "repo_url": "https://github.com/shadcn-ui/lint",
 "repo_slug": "shadcn-ui-lint",
 "title": "Block arbitrary Tailwind values in agent-written UI",
 "page_title": "How to block arbitrary Tailwind values in agent-written UI with Lint",
 "summary": "Flag off-scale Tailwind values so agents use your theme's spacing, colors, and sizes instead.",
 "who": "A front-end developer whose coding agent keeps adding one-off pixel values like p-[13px] that break the design system.",
 "problem": "Agents often invent arbitrary Tailwind values. These pass review in isolation but drift the UI away from the theme.",
 "outcome": "Arbitrary values are reported as Lint errors, and the error points the agent back to values already in the theme.",
 "steps": [
  "Run `npm install -D @shadcn/lint eslint @typescript-eslint/parser` in the project.",
  "Create eslint.config.mjs with the shadcn plugin and the rule \"shadcn/no-arbitrary-values\": \"error\", as shown in the React ESLint setup.",
  "Run `npx eslint .` and confirm it reports any existing arbitrary values.",
  "Fix the reported files or add the Lint command to package.json as the Lint script."
 ],
 "agent_prompt": "Use the GitHub repo shadcn-ui/lint to set up the no-arbitrary-values rule in <project-path>. Follow the README ESLint setup for React, then run the lint command. Expected output: a list of arbitrary Tailwind values in the project, or zero errors. Verify that the rule reports a test class such as p-[13px] in one component file.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "The README says Oxlint reads only the script blocks of Vue and Svelte files, not their templates, so template classes need ESLint.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "Node.js 20.19 or later",
  "A Tailwind v4 project (shadcn/ui is not required)",
  "ESLint 9.30 or later, or Oxlint 1.80 or later",
  "A React, Vue, or Svelte project"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/shadcn-ui-lint/block-arbitrary-tailwind-values/",
 "md": "https://dedupedai.com/use-cases/shadcn-ui-lint/block-arbitrary-tailwind-values/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/shadcn-ui-lint--block-arbitrary-tailwind-values.json",
 "api_version": "v1"
}
