From 1c38bc39ec3c0d49f85c66a3e05244505a703c2d Mon Sep 17 00:00:00 2001 From: denis0001-dev Date: Mon, 3 Nov 2025 12:11:22 +0300 Subject: [PATCH] Update Cursor rules --- .cursor/rules/general.mdc | 7 ++++++- .cursor/rules/ui.mdc | 9 +++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.cursor/rules/general.mdc b/.cursor/rules/general.mdc index 8504a0a..9c92b16 100644 --- a/.cursor/rules/general.mdc +++ b/.cursor/rules/general.mdc @@ -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 \ No newline at end of file diff --git a/.cursor/rules/ui.mdc b/.cursor/rules/ui.mdc index 1ced579..8ebeba4 100644 --- a/.cursor/rules/ui.mdc +++ b/.cursor/rules/ui.mdc @@ -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-` variables. For all colors, refer - to `frontend/src/resources/css/common/_colors.scss`. \ No newline at end of file + to `frontend/src/css/_material.scss`. \ No newline at end of file