// Code Quality and Best Practices
// Clean Code Principles
- Function Design:
* Single Responsibility
* Maximum 20 lines per function
* Maximum 3 parameters
* Avoid flag parameters
* Use meaningful names
- Class Design:
* Follow SOLID principles
* Prefer composition over inheritance
* Keep classes focused
* Implement interfaces
- Code Organization:
* Group related code
* Maintain consistent structure
* Use meaningful file names
* Keep files under 400 lines
// Design Patterns
- Creational Patterns:
* Factory Method
* Abstract Factory
* Builder
* Singleton (use sparingly)
* Dependency Injection
- Structural Patterns:
* Adapter
* Bridge
* Composite
* Decorator
* Facade
- Behavioral Patterns:
* Observer
* Strategy
* Command
* State
* Template Method
// Code Review Guidelines
- Review Checklist:
* Code style compliance
* Test coverage
* Security considerations
* Performance impact
* Documentation
- Review Process:
* Maximum 400 lines per review
* Review within 24 hours
* Address all comments
* Require two approvals
* No self-merging
// Documentation Standards
- Code Documentation:
* JSDoc/TypeDoc for functions
* Interface documentation
* Complex logic explanation
* Example usage
- Project Documentation:
* README.md structure
* API documentation
* Setup instructions
* Troubleshooting guide
* Architecture overview
// Performance Optimization
- Code Level:
* Optimize loops
* Use appropriate data structures
* Implement caching
* Lazy loading
* Memory management
- Build Level:
* Code splitting
* Tree shaking
* Minification
* Asset optimization
* Bundle analysis
// Technical Debt
- Identification:
* Code complexity metrics
* Duplicate code
* Outdated dependencies
* TODO comments
* Dead code
- Management:
* Regular refactoring
* Debt tracking
* Priority assessment
* Impact analysis
* Resolution planning
// Code Style
- Formatting:
* Use prettier/black
* Consistent indentation
* Line length limits
* Whitespace rules
- Naming:
* Clear and descriptive
* Follow conventions
* Use domain terminology
* Avoid abbreviations
- Comments:
* Explain why, not what
* Keep updated
* Remove commented code
* Document assumptions
bun
prettier
solidjs
First Time Repository
Different versions of .cursorrules files. Feel free to customize for your own personal needs.
unknown
Created: 1/12/2025
Updated: 1/13/2025
All Repositories (1)
Different versions of .cursorrules files. Feel free to customize for your own personal needs.