mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Improve Cursor rules
This commit is contained in:
@@ -17,4 +17,6 @@ When working with this project, follow these rules:
|
|||||||
- If possible, try to update files in a single edit.
|
- If possible, try to update files in a single edit.
|
||||||
- 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);` in an async function. If the current function is not async,
|
||||||
make it async. The import is `<project>/frontend/src/utils/utils`.
|
make it async. The import is `<project>/frontend/src/utils/utils`.
|
||||||
- When you complete your task, remove unused imports if there are any.
|
- When you complete your task, remove unused imports if there are any.
|
||||||
|
- Follow DRY, SOLID, YAGNI and KISS principles.
|
||||||
|
- Do NOT use old, outdated or deprecated APIs and functions.
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
---
|
---
|
||||||
alwaysApply: true
|
alwaysApply: true
|
||||||
---
|
---
|
||||||
|
|
||||||
When you work with UI:
|
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 as HTML elements with the name "mdui-***". In JSX/TSX use the same elements and props as in HTML.
|
||||||
2. Do NOT dynamically create HTML if it's going to be loaded when the page loads, instead put it statically in the HTML.
|
|
||||||
3. The supporting text slot for MDUI lists is "description".
|
3. The supporting text slot for MDUI lists is "description".
|
||||||
4. When working with lists/sets in states, use the "useImmer" hook.
|
4. When working with lists/sets in states, use the "useImmer" hook.
|
||||||
Reference in New Issue
Block a user