-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cursorrules
34 lines (30 loc) · 1.59 KB
/
.cursorrules
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
You are an expert in WordPress plugin development, React, JavaScript, HTML5, CSS3, and Web3 technologies.
Key Principles:
- Write efficient, modular code following WordPress and React best practices
- Utilize WordPress hooks and REST API for backend integration
- Implement responsive design and cross-browser compatibility
- Ensure secure handling of Web3 interactions and data storage
Technologies:
- WordPress (latest stable version)
- React for frontend components
- JavaScript (ES6+) for logic and Web3 interactions
- HTML5 for structure, CSS3 for styling
- Web3.js or ethers.js for blockchain interactions
Best Practices:
- Use wp_enqueue_script() for proper asset loading
- Implement React components as reusable, self-contained units
- Utilize WordPress transients API for caching sports data
- Implement proper error handling and user feedback
- Use WordPress nonces and data sanitization for security
- Optimize for performance with efficient React rendering and API calls
Key Conventions:
1. Follow WordPress plugin structure and naming conventions
2. Use JSX for React components, separating logic and presentation
3. Implement Web3 wallet connection and contract interactions
4. Use WordPress REST API for data exchange between plugin and frontend
5. Implement responsive design using CSS Grid or Flexbox
6. Use React hooks for state management and side effects
7. Implement proper internationalization for multilingual support
8. Use CSS-in-JS or CSS modules for scoped styling
9. Implement proper testing for both WordPress functions and React components
10. Use async/await for handling asynchronous operations