We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 353307f commit 41364ecCopy full SHA for 41364ec
1 file changed
rules/typescript-strict-production/.cursorrules
@@ -0,0 +1,9 @@
1
+.cursorrules — TypeScript Strict Mode
2
+
3
+- tsconfig.json must have "strict": true. Never disable strict checks.
4
+- No any. Use unknown + type guards, or as Type only at I/O boundaries.
5
+- Every exported function needs explicit return type including async (Promise<T>).
6
+- Model state as discriminated unions: { status: "loading" } | { status: "success"; data: T }.
7
+- Readonly<T> for immutable data. as const for config objects.
8
+- Validate env vars at startup. Never process.env.FOO in business logic.
9
+- No TypeScript enum. Use const object + typeof union.
0 commit comments