Update Cursor rules

This commit is contained in:
2025-11-03 12:11:22 +03:00
Unverified
parent 6d970dbd61
commit 1c38bc39ec
2 changed files with 11 additions and 5 deletions
+6 -1
View File
@@ -31,7 +31,7 @@ When working with this project, follow these rules:
- If the typecheck passed, there's no need for checking the linter errors.
## Async Operations
- When you need a delay, use `await delay(millis);` in an async function. If the current function is not async,
- When you need a delay, use `await delay(millis);` from `@/utils/utils` in an async function. If the current function is not async,
make it async.
## Database
@@ -51,3 +51,8 @@ When working with this project, follow these rules:
- Batch tool calls when possible to reduce latency
- Use semantic search before grep when looking for concepts
- Use TODOs for complex multi-step tasks to track progress
## Styling
- Use SCSS modules
- Use nested styles
- Put SCSS into one folder per page
+5 -4
View File
@@ -3,10 +3,11 @@ alwaysApply: true
---
When you work with UI:
1. Use MDUI components as HTML elements with the name "mdui-***". In JSX/TSX use the same elements and props as in HTML.
1. Use MDUI components through the wrapper: `@/utils/material`. If the component you want to use is missing in that wrapper,
add it. Do NOT remove anything.
3. The supporting text slot for MDUI lists is "description".
4. When working with lists/sets in states, use the "useImmer" hook.
5. Do NOT use inline styles in React components if they are static, instead write them in CSS.
The CSS is placed in `frontend/src/resources/css/`. Find the appropriate file to put the styles in.
5. Do NOT use inline styles in React components if they are static, instead write them in CSS.
Find the appropriate file to put the styles in, or create a new one.
6. In SCSS, for Material Design colors use `$color-dark-<color-name>` variables. For all colors, refer
to `frontend/src/resources/css/common/_colors.scss`.
to `frontend/src/css/_material.scss`.