Instruction file imported from Victorhugopinheiro/E-commerce-backend (
.github/instructions/vscode-rules.instructions.md). Copyright stays with the author.
description: How to add or edit Cursor rules in our project globs: alwaysApply: false
Cursor Rules Location
How to add new cursor rules to the project
-
Always place rule files in PROJECT_ROOT/.github/instructions/:
.github/instructions/ ├── your-rule-name.md ├── another-rule.md └── ... -
Follow the naming convention:
- Use kebab-case for filenames
- Always use .md extension
- Make names descriptive of the rule's purpose
-
Directory structure:
PROJECT_ROOT/ ├── .github/ │ └── instructions/ │ ├── your-rule-name.md │ └── ... └── ... -
Never place rule files:
- In the project root
- In subdirectories outside .github/instructions
- In any other location
-
Cursor rules have the following structure:
---
description: Short description of the rule's purpose
globs: optional/path/pattern/**/*
alwaysApply: false
---
# Rule Title
Main content explaining the rule with markdown formatting.
1. Step-by-step instructions
2. Code examples
3. Guidelines
Example:
```typescript
// Good example
function goodExample() {
// Implementation following guidelines
}
// Bad example
function badExample() {
// Implementation not following guidelines
}