Who it is forA front-end developer whose coding agent keeps adding one-off pixel values like p-[13px] that break the design system.
The problemAgents often invent arbitrary Tailwind values. These pass review in isolation but drift the UI away from the theme.
The outcomeArbitrary values are reported as Lint errors, and the error points the agent back to values already in the theme.
What you need first
- 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
Steps
- Run
npm install -D @shadcn/lint eslint @typescript-eslint/parserin 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.
Prompt for your agent
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.
Caveat. The README says Oxlint reads only the script blocks of Vue and Svelte files, not their templates, so template classes need ESLint.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
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 [email protected] and we will look at it promptly. Full disclaimer page