@patrickjs/astro-typescript-cursorrules-prompt-file
Astro Typescript Cursorrules Prompt File cursor rules
prpm install @patrickjs/astro-typescript-cursorrules-prompt-file0 total downloads
📄 Full Prompt Content
# Astro + TypeScript + TailwindCSS Development Rules
## Commit Message Guidelines
### Format
Use the conventional commits specification:
```
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
```
### Rules
- Always suggest a conventional commit with a type and optional scope in lowercase letters
- Keep the commit message concise and within 60 characters
- Ensure the commit message is ready to be pasted into the terminal without further editing
- Provide the full command to commit, not just the message
### Example
```bash
# Prompt: <diff_context> /commit
# Response:
git commit -m 'feat: add responsive navbar with TailwindCSS'
```
## Development Guidelines
### TypeScript
- Enforce strict TypeScript settings, ensuring type safety across the project
- Use explicit types for all variables, function parameters, and return values
- Avoid using `any` type; prefer `unknown` when type is uncertain
### TailwindCSS
- Use TailwindCSS for all styling, keeping the utility-first approach in mind
- Avoid creating custom CSS classes unless absolutely necessary
- Use Tailwind's configuration for custom colors, spacing, and other design tokens
### Astro Components
- Ensure Astro components are modular, reusable, and maintain a clear separation of concerns
- Keep component logic minimal; extract complex logic into utility functions
- Use Astro's built-in features (e.g., islands, partial hydration) effectively
- Prefer server-side rendering over client-side when possible
## Coding Style
### File Headers
- Code must start with path/filename as a one-line comment
- Example: `// src/components/Navigation.astro`
### Comments
- Comments should describe purpose, not effect
- Write "why" comments, not "what" comments
- Use JSDoc for function and type documentation
### Code Quality
- Prioritize modularity and DRY (Don't Repeat Yourself) principles
- Focus on performance optimization
- Write clean, readable, and maintainable code
- Keep functions small and focused on a single responsibility
## Custom Slash Commands
### /commit
Generate a Git commit message using the conventional commits spec.
**Usage:**
```
<provide diff context>
/commit
```
**Output:**
```bash
git commit -m 'feat: add responsive navbar with TailwindCSS'
```
💡 Suggested Test Inputs
Loading suggested inputs...
🎯 Community Test Results
Loading results...
📦 Package Info
- Format
- cursor
- Type
- rule
- Category
- frontend-frameworks
- License
- CC0-1.0