Skip to content

Commit 3db9da6

Browse files
authored
Update project-conventions.mdc
1 parent f11a2a5 commit 3db9da6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

template/app/.cursor/rules/project-conventions.mdc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This document outlines the specific conventions, file structures, and general ru
1313

1414
- Define app structure in the Wasp config file: [main.wasp](mdc:main.wasp) or `main.wasp.ts`.
1515
- Define data models ("entities") in [schema.prisma](mdc:schema.prisma).
16-
- Group feature code in `src/features/{featureName}` directories.
16+
- Group feature code in `src/{featureName}` directories.
1717
- Group feature config definitions (e.g. routes, pages, operations, etc.) into sections within the Wasp config file ([main.wasp](mdc:main.wasp)) using the `//#region` directive:
1818
```wasp
1919
// Example in @main.wasp
@@ -31,11 +31,11 @@ This document outlines the specific conventions, file structures, and general ru
3131
- ✅ `import type { GetTasks } from 'wasp/server/operations'`
3232
- ✅ `import { getTasks, useQuery } from 'wasp/client/operations'`
3333
- ❌ `import { ... } from '@wasp/...'`
34-
- ❌ `import { ... } from '@src/features/...'` (Use relative paths for non-Wasp imports within `src`)
34+
- ❌ `import { ... } from '@src/featureName/...'` (Use relative paths for non-Wasp imports within `src`)
3535
- If you see "Cannot find module 'wasp/...'": Double-check the import path prefix.
3636
- **Wasp Config Imports in [main.wasp](mdc:main.wasp) :** Imports of your code *must* start with `@src/`.
37-
- ✅ `component: import { LoginPage } from "@src/features/auth/LoginPage.tsx"`
38-
- ❌ `component: import { LoginPage } from "../src/features/auth/LoginPage.tsx"`
37+
- ✅ `component: import { LoginPage } from "@src/auth/LoginPage.tsx"`
38+
- ❌ `component: import { LoginPage } from "../src/auth/LoginPage.tsx"`
3939
- ❌ `component: import { LoginPage } from "client/pages/auth/LoginPage.tsx"`
4040
- **General Imports in `.ts`/`.tsx`:** Use relative paths for imports within the `src/` directory. Avoid using the `@src/` alias directly in `.ts`/`.tsx` files.
4141
- If you see "Cannot find module '@src/...'": Use a relative path instead.
@@ -70,9 +70,9 @@ This document outlines the specific conventions, file structures, and general ru
7070

7171
- Always reference the Wasp config file ([main.wasp](mdc:main.wasp) or `main.wasp.ts`) as your source of truth for the app's configuration and structure.
7272
- Group feature config definitions in the Wasp config file using `//#region` (as noted above).
73-
- Group feature code into feature directories (e.g. `src/features/transactions`).
73+
- Group feature code into feature directories (e.g. `src/transactions`).
7474
- Use the latest Wasp version, as defined in the Wasp configl file.
75-
- Combine Wasp operations (queries and actions) into an `operations.ts` file within the feature directory (e.g., `src/features/transactions/operations.ts`).
75+
- Combine Wasp operations (queries and actions) into an `operations.ts` file within the feature directory (e.g., `src/transactions/operations.ts`).
7676
- Always use TypeScript for Wasp code (`.ts`/`.tsx`).
7777

7878
### Wasp Dependencies

0 commit comments

Comments
 (0)