Skip to content

Commit 34587ac

Browse files
authored
fix(repo): Update cursor rules to suggest proper libraries (#6133)
1 parent 6e9bde8 commit 34587ac

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.changeset/mean-chicken-press.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.cursor/rules/nextjs.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Pages Router Data Fetching
7777
- Use getServerSideProps for server-side rendering on each request
7878
- Use getStaticPaths with getStaticProps for dynamic static generation
7979
- Implement ISR (Incremental Static Regeneration) with revalidate option
80-
- Use SWR or React Query for client-side data fetching
80+
- Use SWR for client-side data fetching
8181
- Cache API responses appropriately based on data volatility
8282

8383
Data Fetching Best Practices
@@ -138,7 +138,7 @@ API Route Structure
138138
- Organize API routes in app/api directory matching your URL structure
139139
- Use HTTP methods correctly (GET for reading, POST for creating, etc.)
140140
- Implement proper error handling with appropriate HTTP status codes
141-
- Validate request data using libraries like Zod or Joi
141+
- Validate request data using libraries like Zod
142142
- Use middleware for authentication and request validation
143143
- Document API endpoints with TypeScript interfaces
144144

.cursor/rules/react.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Local State
4242

4343
Global State
4444
- Use Context API for theme/authentication
45-
- Use Redux Toolkit for complex state
45+
- Consider state management solutions for complex state
4646
- Implement proper state selectors
4747
- Use proper state normalization
4848
- Implement proper state persistence

0 commit comments

Comments
 (0)