diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-02-08 22:19:39 +0100 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-02-08 22:19:39 +0100 |
| commit | 484ce47867b1c92c83e4cfab9fa8371bb6e68e12 (patch) | |
| tree | 6aeda7b4617407d7f3b0255ebee3b287e239e22b | |
| parent | 681f006b3556830bcb43d49217cc3268ddd1b5f8 (diff) | |
| download | opencut-484ce47867b1c92c83e4cfab9fa8371bb6e68e12.tar.gz | |
update review cursor command
| -rw-r--r-- | .cursor/commands/review.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.cursor/commands/review.md b/.cursor/commands/review.md index f538e9da..d7c0c45c 100644 --- a/.cursor/commands/review.md +++ b/.cursor/commands/review.md @@ -91,6 +91,16 @@ Review every point below carefully to ensure files follow consistent code style - [ ] Code is scannable — use variables and helper functions to make intent clear at a glance - [ ] Complex logic is extracted into well-named variables or helpers +- [ ] No redundant single/plural function variants — if a function can operate on multiple items, it should accept an array and handle both cases. Don't create `doThing()` + `doThings()`. + + ```tsx + // ❌ wrong — redundant variants + function updateElement({ element }: { element: Element }) { ... } + function updateElements({ elements }: { elements: Element[] }) { ... } + + // ✅ correct — one function, accepts array + function updateElements({ elements }: { elements: Element[] }) { ... } + ``` --- |
