diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-03-02 10:32:46 +0100 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-03-02 10:32:46 +0100 |
| commit | 7bd0b4374621ab70b397b64a13b0c472c97d1844 (patch) | |
| tree | 57fdaad1ae758fce1d2f42fd347bc29943070bf3 | |
| parent | 77a3708213606d520833944141c3aa9169954e07 (diff) | |
| download | opencut-7bd0b4374621ab70b397b64a13b0c472c97d1844.tar.gz | |
update cursor rule
| -rw-r--r-- | .cursor/commands/review.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.cursor/commands/review.md b/.cursor/commands/review.md index 4361b397..4cc5de36 100644 --- a/.cursor/commands/review.md +++ b/.cursor/commands/review.md @@ -54,6 +54,14 @@ Review every point below carefully to ensure files follow consistent code style ## Tailwind & Styling +- [ ] Always use `cn()` for `className` — never string interpolation with `${}` or ternaries inline + ```tsx + // ❌ wrong + className={`base-class ${isActive && "active"} ${someHelper()}`} + + // ✅ correct + className={cn("base-class", isActive && "active", someHelper())} + ``` - [ ] Use `gap-*` instead of `mb-*` or `mt-*` for consistent spacing - [ ] Use `size-*` instead of `h-* w-*` when width and height are the same - [ ] When using `size-*` on icons inside `<Button>`, use `!` modifier to override default `size-4` |
