You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/commands/review.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,16 @@ Review every point below carefully to ensure files follow consistent code style
91
91
92
92
-[ ] Code is scannable — use variables and helper functions to make intent clear at a glance
93
93
-[ ] 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[] }) { ... }
0 commit comments