4 Ultracite

Skill: 4-ultracite

udecode 95f0edb 1.2 KB Updated

File contents

Code Standards

When writing code in a project with Ultracite, follow these standards. For the full rules reference, see references/code-standards.md.

Key rules at a glance:

Formatting: 2-space indent, semicolons, double quotes, 80-char width, ES5 trailing commas, LF line endings.

Style: Arrow functions preferred. const by default, never var. for...of over .forEach(). Template literals over concatenation. No enums (use objects with as const). No nested ternaries. Kebab-case filenames.

Correctness: No unused imports/variables. No any (use unknown). Always await promises in async functions. No console.log/debugger/alert in production.

React: Function components only. Hooks at top level. Exhaustive deps. key on iterables (no array index). No nested component definitions. Semantic HTML + ARIA.

Performance: No accumulating spread in loops. No barrel files. Avoid namespace imports except import * as z from "zod" when it is required to keep deployed entry graphs tree-shakeable. Top-level regex.

Security: rel="noopener" on target="_blank". No dangerouslySetInnerHTML. No eval().

udecode/better-convex/tree/main/.agents/skills/4-ultracite commit 95f0edb534

Frequently asked questions

npx skillmds@latest add udecode/4-ultracite