Engineering | Cursor Ingore Configuration
AI Usage
Table of contents
1. 1. Where to Addย .cursorignore [edit]
2. 2. Universalย .cursorignore(ALL PROJECTS) [edit]
3. 3. Frontend (React / Next.js / Vue / Angular) [edit]
Below is a production-ready .cursorignore setup for Frontend, Python, Java, and .NET, plus where and how to apply it across teams
1. Where to Addย .cursorignore [edit]
๐ Location
Place one .cursorignore file at the repository root:
/repo-root
ย โโโ .cursorignore ย โ
ย โโโ src/
ย โโโ app/
ย โโโ services/
ย โโโ ...
Cursor automatically detects it.
๐ Monorepo (recommended)
If you have multiple stacks in one repo:
-
Use one root .cursorignore
-
Optionally add stack-specific .cursorignore inside subfolders
/repo-root
ย โโโ .cursorignore
ย โโโ frontend/.cursorignore
ย โโโ backend/.cursorignore
Cursor merges rules (root + local).
2. Universalย .cursorignore(ALL PROJECTS) [edit]
Always start with this โ it alone can reduce 30โ40% tokens.
# ===== Dependency folders =====
node_modules/
vendor/
packages/
third_party/
# ===== Build outputs =====
dist/
build/
out/
bin/
obj/
target/
coverage/
.tmp/
temp/
# ===== Cache & tooling =====
.cache/
.cursor/
.vscode/
.idea/
.settings/
# ===== Logs & runtime =====
logs/
*.log
*.tmp
# ===== Environment & secrets =====
.env
.env.*
*.key
*.pem
# ===== Generated & auto files =====
generated/
gen/
*.generated.*
*.g.cs
*.designer.cs
*.min.js
*.map
*.lock
# ===== OS files =====
.DS_Store
Thumbs.db
3. Frontend (React / Next.js / Vue / Angular) [edit]
# ===== Frontend dependencies =====
node_modules/# ===== Framework build outputs =====
.next/
.nuxt/
dist/
build/
out/# ===== Static exports =====
public/assets/
public/build/# ===== Test & coverage =====
coverage/
cypress/videos/
cypress/screenshots/
playwright-report/# ===== Tooling =====
.eslintcache
.stylelintcache
.vite/
.parcel-cache/# ===== Generated types =====
*.d.ts
๐ Why
-
.next, dist, coverage can be huge
-
*.d.ts inflates context without value for reasoning
4. Python (FastAPI / Django / ML / AI) [edit]
# ===== Virtual environments =====
venv/
.venv/
env/# ===== Python cache =====
__pycache__/
*.pyc
*.pyo
*.pyd# ===== Build artifacts =====
build/
dist/
.eggs/
*.egg-info/# ===== ML / AI =====
data/
datasets/
models/
checkpoints/
runs/
mlruns/# ===== Notebooks =====
.ipynb_checkpoints/# ===== Test =====
.coverage
pytest_cache/# ===== Tooling =====
.mypy_cache/
.ruff_cache/
.tox/
๐ AI projects tip
-
Never let Cursor read datasets/ or models/
-
Point it only to training code, not artifacts
6. .NET (.NET Core / ASP.NET / MAUI) [edit]
# ===== Build output =====
bin/
obj/# ===== User-specific =====
*.user
*.suo
*.userprefs# ===== Logs =====
logs/# ===== Packages =====
packages/# ===== Generated =====
*.g.cs
*.designer.cs
*.AssemblyInfo.cs# ===== Test =====
TestResults/# ===== Tooling =====
.vs/
๐ Critical
-
bin/obj must ALWAYS be ignored
-
.g.cs breaks AI reasoning badly