spacing rule · error

no-arbitrary-spacing

Detects Tailwind arbitrary values (p-[7px]) and inline styles outside the spacing scale.

What it flags

Stick to the project-defined spacing scale.

Examples

On system

<div className="p-4" />

Flagged

<div className="p-[7px]" />

How to run it

Run npx windcraft check to run this and the other rules over your project. It ships at error severity by default, and your AI tools can call it on a snippet over MCP through validate_component_code — so drift is caught as the code is written, not just in review.

Catch design drift before it ships.