diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-08-28 22:39:19 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-08-28 22:39:19 +0200 |
| commit | 2d834a49d7d222d7f70ee6b4cf7ab2827b88bb0e (patch) | |
| tree | db8a33eb12c6294cc0000caf05c600fe3c33069e /.cursor | |
| parent | 792fb6cdc06ebcd578d9e27821eb25a7dba9dbd2 (diff) | |
| parent | a7d90f7eac90966920c750134d7de9b611b2c38f (diff) | |
| download | opencut-2d834a49d7d222d7f70ee6b4cf7ab2827b88bb0e.tar.gz | |
Merge branch 'staging'
Diffstat (limited to '.cursor')
| -rw-r--r-- | .cursor/rules/ultracite.mdc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/.cursor/rules/ultracite.mdc b/.cursor/rules/ultracite.mdc index 392683c8..4a6b29fe 100644 --- a/.cursor/rules/ultracite.mdc +++ b/.cursor/rules/ultracite.mdc @@ -42,9 +42,13 @@ Ultracite enforces strict type safety, accessibility standards, and consistent c - Don't insert comments as text nodes. - Use `<>...</>` instead of `<Fragment>...</Fragment>`. +### Function Parameters and Props +- Always use destructured props objects instead of individual parameters in functions. +- Example: `function helloWorld({ prop }: { prop: string })` instead of `function helloWorld(param: string)`. +- This applies to all functions, not just React components. + ### Correctness and Safety - Don't assign a value to itself. -- Use props instead of parameters in all functions. - Avoid unused imports and variables. - Don't use await inside loops. - Don't hardcode sensitive data like API keys and tokens. @@ -86,4 +90,4 @@ try { } catch (e) { console.log(e); } -```
\ No newline at end of file +``` |
