Skip to content

Commit ab94507

Browse files
authored
Merge pull request #2 from lambda-curry/codegen-bot/upgrade-to-tailwind-v4-proper-1754510773
2 parents 4ea41cc + d0286b5 commit ab94507

21 files changed

+1681
-359
lines changed

.cursorrules/README.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

.cursorrules/monorepo.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

.cursorrules/monorepo.mdc

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
alwaysApply: true
3+
---
4+
5+
# Monorepo Cursor Rules
6+
7+
## Package Structure
8+
- `apps/` - Applications (todo-app)
9+
- `packages/` - Shared packages (ui, utils)
10+
- Each package has its own package.json with proper exports
11+
12+
## Workspace Dependencies
13+
- Use `workspace:*` for internal package dependencies
14+
- Keep external dependencies in sync across packages
15+
- Use peerDependencies for shared libraries like React
16+
17+
## Import Patterns
18+
```tsx
19+
// Import from workspace packages
20+
import { Button } from '@todo-starter/ui';
21+
import { cn, type Todo } from '@todo-starter/utils';
22+
23+
// Import from local files
24+
import { TodoItem } from '~/components/todo-item';
25+
import type { Route } from './+types/home';
26+
```
27+
28+
## Package Naming
29+
- Use scoped packages: `@todo-starter/package-name`
30+
- Keep names descriptive and consistent
31+
- Use kebab-case for package names
32+
33+
## Scripts and Tasks
34+
- Define scripts at both root and package level
35+
- Use Turbo for orchestrating build tasks
36+
- Prefer package-specific scripts for development
37+
38+
## TypeScript Configuration
39+
- Use Tailwind CSS v4's CSS-first configuration with `@theme` directive
40+
- Use path mapping for workspace packages
41+
- Keep tsconfig.json files minimal and focused
42+
43+
## Best Practices
44+
- Keep packages focused and single-purpose
45+
- Avoid circular dependencies between packages
46+
- Use proper exports in package.json
47+
- Document package APIs and usage patterns
48+
# Monorepo Cursor Rules
49+
50+
## Package Structure
51+
- `apps/` - Applications (todo-app)
52+
- `packages/` - Shared packages (ui, utils)
53+
- Each package has its own package.json with proper exports
54+
55+
## Workspace Dependencies
56+
- Use `workspace:*` for internal package dependencies
57+
- Keep external dependencies in sync across packages
58+
- Use peerDependencies for shared libraries like React
59+
60+
## Import Patterns
61+
```tsx
62+
// Import from workspace packages
63+
import { Button } from '@todo-starter/ui';
64+
import { cn, type Todo } from '@todo-starter/utils';
65+
66+
// Import from local files
67+
import { TodoItem } from '~/components/todo-item';
68+
import type { Route } from './+types/home';
69+
```
70+
71+
## Package Naming
72+
- Use scoped packages: `@todo-starter/package-name`
73+
- Keep names descriptive and consistent
74+
- Use kebab-case for package names
75+
76+
## Scripts and Tasks
77+
- Define scripts at both root and package level
78+
- Use Turbo for orchestrating build tasks
79+
- Prefer package-specific scripts for development
80+
81+
## TypeScript Configuration
82+
- Use Tailwind CSS v4's CSS-first configuration with `@theme` directive
83+
- Use path mapping for workspace packages
84+
- Keep tsconfig.json files minimal and focused
85+
86+
## Best Practices
87+
- Keep packages focused and single-purpose
88+
- Avoid circular dependencies between packages
89+
- Use proper exports in package.json
90+
- Document package APIs and usage patterns

.cursorrules/react-router-7.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

.cursorrules/react-router-7.mdc

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
alwaysApply: true
3+
---
4+
5+
# React Router 7 Cursor Rules
6+
7+
## Route Structure
8+
- Use file-based routing in `app/routes/`
9+
- Route files should export default component and optional meta, loader, action functions
10+
- Use `+types` for route-specific TypeScript types
11+
12+
## Component Patterns
13+
```tsx
14+
// Route component example
15+
import type { Route } from './+types/home';
16+
17+
export const meta: Route.MetaFunction = () => {
18+
return [
19+
{ title: 'Page Title' },
20+
{ name: 'description', content: 'Page description' }
21+
];
22+
};
23+
24+
export default function Home() {
25+
return <div>Content</div>;
26+
}
27+
```
28+
29+
## Data Loading
30+
- Use loaders for server-side data fetching
31+
- Use actions for form submissions and mutations
32+
- Prefer server-side data loading over client-side when possible
33+
34+
## Error Handling
35+
- Implement ErrorBoundary components for route-level error handling
36+
- Use isRouteErrorResponse for proper error type checking
37+
38+
## Navigation
39+
- Use Link component for internal navigation
40+
- Use NavLink for navigation with active states
41+
- Prefer declarative navigation over imperative
42+
43+
## Best Practices
44+
- Keep route components focused on layout and data orchestration
45+
- Extract business logic into custom hooks or utilities
46+
- Use proper TypeScript types from route type definitions
47+
- Implement proper loading and error states
48+
49+
# React Router 7 Cursor Rules
50+
51+
## Route Structure
52+
- Use file-based routing in `app/routes/`
53+
- Route files should export default component and optional meta, loader, action functions
54+
- Use `+types` for route-specific TypeScript types
55+
56+
## Component Patterns
57+
```tsx
58+
// Route component example
59+
import type { Route } from './+types/home';
60+
61+
export const meta: Route.MetaFunction = () => {
62+
return [
63+
{ title: 'Page Title' },
64+
{ name: 'description', content: 'Page description' }
65+
];
66+
};
67+
68+
export default function Home() {
69+
return <div>Content</div>;
70+
}
71+
```
72+
73+
## Data Loading
74+
- Use loaders for server-side data fetching
75+
- Use actions for form submissions and mutations
76+
- Prefer server-side data loading over client-side when possible
77+
78+
## Error Handling
79+
- Implement ErrorBoundary components for route-level error handling
80+
- Use isRouteErrorResponse for proper error type checking
81+
82+
## Navigation
83+
- Use Link component for internal navigation
84+
- Use NavLink for navigation with active states
85+
- Prefer declarative navigation over imperative
86+
87+
## Best Practices
88+
- Keep route components focused on layout and data orchestration
89+
- Extract business logic into custom hooks or utilities
90+
- Use proper TypeScript types from route type definitions
91+
- Implement proper loading and error states
92+

.cursorrules/ui-components.md

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)