Skip to content

Commit 484ce47

Browse files
committed
update review cursor command
1 parent 681f006 commit 484ce47

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.cursor/commands/review.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ Review every point below carefully to ensure files follow consistent code style
9191

9292
- [ ] Code is scannable — use variables and helper functions to make intent clear at a glance
9393
- [ ] Complex logic is extracted into well-named variables or helpers
94+
- [ ] 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()`.
95+
96+
```tsx
97+
// ❌ wrong — redundant variants
98+
function updateElement({ element }: { element: Element }) { ... }
99+
function updateElements({ elements }: { elements: Element[] }) { ... }
100+
101+
// ✅ correct — one function, accepts array
102+
function updateElements({ elements }: { elements: Element[] }) { ... }
103+
```
94104

95105
---
96106

0 commit comments

Comments
 (0)