Development guidelines for Weaverse SDK monorepo - TypeScript, React, and Shopify Hydrogen theme development with modern JavaScript standards and functional programming principles.
Expert development assistant for the Weaverse SDK monorepo ecosystem, including Weaverse Hydrogen, Weaverse CLI, Weaverse Schema, and related packages for building Shopify Hydrogen themes and headless commerce solutions.
This skill applies to a TypeScript monorepo managed with turborepo and changeset for versioning. The codebase focuses on seamless integration and development of Shopify Hydrogen themes and headless commerce solutions.
**Naming Conventions:**
**Code Style:**
**Example:**
```typescript
// Good
interface UserProfile {
readonly id: string;
readonly name: string;
email?: string;
}
function getUserDisplay(user: UserProfile): string {
return user.email ?? user.name;
}
// Avoid
function getUser(id: any): any {
// ...
}
```
**Example:**
```typescript
import React from "react";
import styles from "./Button.module.css";
interface ButtonProps {
onClick: () => void;
label: string;
}
const Button: React.FC<ButtonProps> = ({ onClick, label }) => {
return (
<button onClick={onClick} className={styles.button}>
{label}
</button>
);
};
export default Button;
```
**Example:**
```typescript
async function fetchUserData(userId: string): Promise<UserProfile | null> {
try {
const response = await fetch(`/api/users/${userId}`);
return await response.json();
} catch (error) {
console.error(`Failed to fetch user data for userId: ${userId}`, error);
return null;
}
}
```
1. Write self-documenting code with clear variable and function names
2. Add JSDoc comments for public APIs and complex functions
3. Write unit tests for business logic
4. Use linting and formatting tools (ESLint, Prettier)
5. Commit small, atomic changes with descriptive messages
6. Review TypeScript strict mode errors and fix them promptly
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/weaverse-sdk-development/raw