-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.cursorrules
More file actions
26 lines (23 loc) · 900 Bytes
/
.cursorrules
File metadata and controls
26 lines (23 loc) · 900 Bytes
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
# Code Style & Quality
- Always use TypeScript over JavaScript
- Prefer const over let, avoid var
- Use meaningful variable names, no single letters except for loops
- Add JSDoc comments for functions and complex logic
- Use explicit return types for functions
# HTMX Specific
- Always validate HTMX attributes (hx-get, hx-post, etc.)
- Use hx-target and hx-swap explicitly
- Include proper error handling with hx-on
- Prefer semantic HTML elements
- Use CSS classes instead of inline styles
# Security & Best Practices
- Never hardcode API keys or secrets
- Validate all user inputs
- Use parameterized queries for database operations
- Implement proper error boundaries
- Add loading states for async operations
# Project Structure
- Keep components small and focused
- Use consistent file naming (kebab-case)
- Group related files in feature folders
- Separate business logic from UI components