Skip to content

Commit 0b30357

Browse files
committed
singleton pattern usage cursor rule
1 parent 85ebb1a commit 0b30357

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.cursor/rules.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@
111111
"pattern": "\\.(swift)$",
112112
"rule": "Always use the APIService methods for network calls. Never implement direct URL session calls in ViewModels"
113113
},
114+
{
115+
"name": "Singleton Pattern Usage",
116+
"pattern": "\\.(swift)$",
117+
"rule": "ALWAYS use AppCache.shared directly instead of creating @ObservedObject or @StateObject properties. Never use '@ObservedObject private var appCache = AppCache.shared' or similar patterns. Access AppCache.shared directly in code. For UserAuthViewModel, use UserAuthViewModel.shared directly as well."
118+
},
114119
{
115120
"name": "App Color Usage - Universal Colors",
116121
"pattern": "\\.(swift)$",

0 commit comments

Comments
 (0)