-
Notifications
You must be signed in to change notification settings - Fork 542
Expand file tree
/
Copy path.cursorrules
More file actions
53 lines (39 loc) · 1.67 KB
/
.cursorrules
File metadata and controls
53 lines (39 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Valdi Open Source - Cursor Rules
## ⚠️ Open Source Project
This is an open source project. Never commit secrets, API keys, or proprietary information.
## 🚨 CRITICAL: This is NOT React!
Valdi uses TSX/JSX syntax but is **fundamentally different from React**.
**Common AI mistakes:**
- ❌ Suggesting `useState`, `useEffect`, `useContext` (don't exist!)
- ❌ Functional components (don't exist!)
- ❌ `this.props` (should be `this.viewModel`)
- ❌ `markNeedsRender()`, `onMount()`, `onUpdate()` (wrong names/don't exist!)
**Correct Valdi:**
- ✅ `class MyComponent extends StatefulComponent`
- ✅ `state = {}` + `this.setState()`
- ✅ `this.viewModel` for props
- ✅ `onCreate()`, `onViewModelUpdate()`, `onDestroy()` lifecycle
## 📁 Context-Specific Rules
Cursor automatically loads additional rules based on where you're working:
| Working In | See |
|-----------|-----|
| TypeScript/TSX components | `.cursor/rules/typescript-tsx.md` |
| Swift compiler | `.cursor/rules/compiler.md` |
| C++ runtime | `.cursor/rules/cpp-runtime.md` |
| Android (Kotlin) | `.cursor/rules/android.md` |
| iOS (Objective-C) | `.cursor/rules/ios.md` |
| Bazel files | `.cursor/rules/bazel.md` |
| Tests | `.cursor/rules/testing.md` |
**→ Check `.cursor/rules/README.md` for the full list**
## Quick Commands
```bash
bazel build //... # Build everything
bazel test //... # Run all tests
valdi install ios # Build & install iOS app
valdi hotreload # Start hot reload
```
## More Information
- **Comprehensive guide**: `/AGENTS.md` (621 lines)
- **AI tooling**: `/docs/docs/ai-tooling.md`
- **Support**: `/SUPPORT.md`
- **Discord**: https://discord.gg/uJyNEeYX2U