Improve Cursor rules

This commit is contained in:
2025-09-28 16:24:18 +03:00
Unverified
parent 2c80e31a24
commit dcc466ec14
2 changed files with 3 additions and 3 deletions
+3 -1
View File
@@ -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.
-2
View File
@@ -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.