Document and automate Cursor rules adaptation for Astro web app
This commit is contained in:
15
.cursor/rules/best-practices.mdc
Normal file
15
.cursor/rules/best-practices.mdc
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
description:
|
||||
globs:
|
||||
alwaysApply: true
|
||||
---
|
||||
- Write clean, readable, and maintainable code
|
||||
- Follow SOLID principles and DRY (Don't Repeat Yourself)
|
||||
- Use meaningful variable and function names that explain their purpose
|
||||
- Add comments for complex logic, but prefer self-documenting code
|
||||
- Handle errors gracefully with proper error handling
|
||||
- Implement proper logging and debugging practices
|
||||
- Use consistent indentation and formatting
|
||||
- Avoid deep nesting - prefer early returns and guard clauses
|
||||
- Keep functions small and focused on single responsibilities
|
||||
- Use type safety when available (TypeScript, JSDoc, etc.)
|
||||
Reference in New Issue
Block a user