@@ -116,7 +116,7 @@ Centralize linting and formatting configurations at the monorepo root to ensure
116
116
}
117
117
```
118
118
119
- ## 5 . Avoid Overly Interdependent Configuration Systems
119
+ ## 6 . Avoid Overly Interdependent Configuration Systems
120
120
121
121
Favor self-contained, independent configuration files per package rather than complex inheritance:
122
122
@@ -131,19 +131,6 @@ root/
131
131
tsconfig.json
132
132
```
133
133
134
- ## 6. Simplify Project Structure
135
-
136
- Maintain flat, meaningful directory structures to reduce cognitive load for AI and humans:
137
-
138
- ```
139
- src/
140
- auth/
141
- LoginForm.tsx
142
- SignupForm.tsx
143
- useAuth.ts
144
- validation.ts
145
- ```
146
-
147
134
## 7. Type-Driven Development
148
135
149
136
Use comprehensive, precise types to enforce correctness at compile-time rather than relying on runtime validation.
@@ -158,20 +145,7 @@ type User = {
158
145
};
159
146
```
160
147
161
- ## 8. Simplify Project Structure
162
-
163
- Avoid unnecessary deep nesting to streamline AI navigation:
164
-
165
- Preferred:
166
-
167
- ```
168
- src/
169
- user/
170
- UserProfile.tsx
171
- UserForm.tsx
172
- ```
173
-
174
- ## 9. Consistent, Predictable File Organization
148
+ ## 8. Consistent, Predictable File Organization
175
149
176
150
Maintain consistent file structures for components:
177
151
@@ -184,19 +158,7 @@ components/
184
158
index.ts
185
159
```
186
160
187
- ## 9. Prefer Compile-Time Validation
188
-
189
- Use tools like TypeScript to catch issues at compile-time rather than relying solely on runtime checks:
190
-
191
- ``` typescript
192
- // Type-safe route definition
193
- export const route = createRoute ({
194
- path: ' /users' ,
195
- handler : async (req ) => json (await handleRequest (req )),
196
- });
197
- ```
198
-
199
- ## 10. Test-Case Driven Documentation
161
+ ## 9. Test-Case Driven Documentation
200
162
201
163
Write clear, self-explanatory tests that also serve as documentation:
202
164
0 commit comments