Skip to main content
The design rules are enforced by scripts/check-ui-consistency.mjs. It runs every check of eslint/ui-consistency-plugin.mjs over src/**/*.tsx and compares the count per check and file with scripts/ui-baseline.json.

Commands

After a file is moved or renamed, lint:ui:update needs the flag --allow-increase, which is the only way a number may rise.

What a check reads

A string counts as a class string only in a class position: JSX className, the arguments of cn, clsx and cva, properties named like a class and constants named like one. The vendored editor, ai-elements, magicui, animate-ui and tests are not checked. Every report names the role to use instead.

Fix findings in bulk

A finding with a safe replacement is fixed by ESLint:
Fix one check in a folder
The fix needs the element, such as a Button, a menu or a card, because the right role depends on it. It never changes a condition or a text. The rest is left for a person.

Opt out of one line

Put a comment with the check and a reason on the same line or the line before:
Opt-out comment
Use it for a real exception, not to silence a finding. A new check needs cases in scripts/ui-selftest.mjs, and a selftest that misses a check fails.
Last modified on November 4, 2026