code-standards
Code Standards
Write code that is accessible, performant, type-safe, and maintainable.
Activation Conditions
- Linting errors need fixing
- Code formatting issues
- Code review feedback
- Questions about style guidelines
Quick Reference
| Action | Rule |
|---|---|
| Write components | react-functional-only.md |
| Async code | async-await-promises.md |
| Avoid legacy libs | no-legacy.md |
any types and top-level regex are enforced by Biome (noExplicitAny, useTopLevelRegex).
Commands
bun x ultracite fix # Format and fix
bun x ultracite check # Check for issues
bun x ultracite doctor # Diagnose setup
Quick Fix
Most issues are auto-fixed:
bun x ultracite fix
Console Logging
- Never use
console.log,console.debug, orconsole.infoin production code - Only use
console.errorandconsole.warnfor actionable errors - For debug logging, wrap in
if (IsDev) { ... } - Don't use
biome-ignoreto suppress console warnings - remove the logs instead
Rules
See rules/ directory for detailed guidance.
More from redpanda-data/console
react-best-practices
Client-side React performance optimization patterns.
72tanstack-router-migration
Migrate React applications from React Router to TanStack Router with file-based routing. Use when user requests: (1) Router migration, (2) TanStack Router setup, (3) File-based routing implementation, (4) React Router replacement, (5) Type-safe routing, or mentions 'migrate router', 'tanstack router', 'file-based routes'.
61security-scan
Resolve npm dependency vulnerabilities detected by security scans.
49api-patterns
Connect Query patterns for API calls. Use when working with mutations, queries, or data fetching.
48e2e-tester
Write and run Playwright E2E tests for Redpanda Console using testcontainers. Analyzes test failures, adds missing testids, and improves test stability. Use when user requests E2E tests, Playwright tests, integration tests, test failures, missing testids, or mentions 'test workflow', 'browser testing', 'end-to-end', or 'testcontainers'.
45ui-development
Build UI with Redpanda Registry components, Tailwind v4, and accessibility best practices.
44