Zero-config Biome preset for strict TypeScript/JavaScript code quality with automated formatting, linting, and best practices for React, Next.js, and modern web development.
This skill has safety concerns that you should review before use. Some patterns were detected that may pose a risk.Safety score: 75/100.
KillerSkills scans all public content for safety. Use caution before installing or executing flagged content.
Enforce strict code quality standards using **Ultracite**, a zero-config Biome preset that provides automated formatting and linting for TypeScript/JavaScript projects.
This skill applies Ultracite code standards to ensure **accessible, performant, type-safe, and maintainable** code. Biome provides extremely fast Rust-based linting and formatting with automatic fixes for most issues.
When writing or reviewing code, ensure:
**Example:**
```typescript
// Good
const MAX_RETRIES = 3 as const;
function fetchData(url: string): Promise<Data> { ... }
// Avoid
function fetchData(url) { ... }
const retries = 3; // magic number without context
```
Follow these modern patterns:
**Example:**
```typescript
// Good
const fullName = `${user.firstName} ${user.lastName}`;
const email = user?.contact?.email ?? '[email protected]';
// Avoid
var fullName = user.firstName + ' ' + user.lastName;
```
**Example:**
```typescript
// Good
async function loadData() {
try {
const response = await fetch(url);
return await response.json();
} catch (error) {
console.error('Failed to load data:', error);
throw error;
}
}
// Avoid
function loadData() {
fetch(url).then(r => r.json()).then(data => { ... });
}
```
**Example:**
```tsx
// Good
function UserList({ users }: { users: User[] }) {
return (
<ul>
{users.map(user => (
<li key={user.id}>{user.name}</li>
))}
</ul>
);
}
// Avoid
function UserList({ users }) {
return (
<ul>
{users.map((user, index) => (
<li key={index}>{user.name}</li>
))}
</ul>
);
}
```
Use semantic HTML and ARIA attributes:
**Example:**
```tsx
// Good
<button onClick={handleClick} onKeyDown={handleKeyDown}>
Submit
</button>
<img src="/logo.png" alt="Company logo" />
// Avoid
<div onClick={handleClick}>Submit</div>
<img src="/logo.png" />
```
**Example:**
```typescript
// Good
function processUser(user: User | null) {
if (!user) {
throw new Error('User cannot be null');
}
// Process user...
}
// Avoid
function processUser(user) {
if (user) {
// deeply nested logic...
}
}
```
**Example:**
```typescript
// Good
const isEligibleForDiscount = user.isPremium && order.total > 100;
if (!isEligibleForDiscount) return regularPrice;
// Avoid
return user.isPremium && order.total > 100 ? discountedPrice : regularPrice;
```
**Example:**
```tsx
// Good
<a href={externalUrl} target="_blank" rel="noopener noreferrer">
External Link
</a>
// Avoid
<a href={externalUrl} target="_blank">External Link</a>
```
**Example:**
```typescript
// Good
import { useState, useEffect } from 'react';
// Avoid
import * as React from 'react';
```
**Example:**
```typescript
// Good
test('fetches user data', async () => {
const data = await fetchUser(123);
expect(data.name).toBe('John Doe');
});
// Avoid
test.only('fetches user data', (done) => {
fetchUser(123).then(data => {
expect(data.name).toBe('John Doe');
done();
});
});
```
Biome's linter catches most issues automatically. Focus your attention on:
1. **Business logic correctness** - Validate algorithms and data transformations
2. **Meaningful naming** - Use descriptive names for functions, variables, and types
3. **Architecture decisions** - Component structure, data flow, and API design
4. **Edge cases** - Handle boundary conditions and error states
5. **User experience** - Accessibility, performance, and usability considerations
6. **Documentation** - Add comments for complex logic, but prefer self-documenting code
**Before committing code:**
```bash
npx ultracite fix
```
This ensures all formatting and auto-fixable linting issues are resolved before code review.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/ultracite-code-standards-g0nfii/raw