quicknotes/.cursor/rules/bun.mdc

36 lines
983 B
Text
Raw Normal View History

---
description: Always use Bun instead of Node/npm, and ensure to use the local installation at ~/.bun/bin/bun
globs: **/*
---
<rule>
When using Bun:
1. Always use the local installation at ~/.bun/bin/bun
2. Use Bun instead of Node/npm for all package management and running scripts
3. For running commands, use the full path: ~/.bun/bin/bun
4. Replace npm scripts with Bun equivalents in package.json
5. Use Bun for installing, running, and testing packages
6. Ensure Bun is used for all CI/CD pipelines and automation scripts
7. Document any exceptions where Node/npm must be used
Command mappings:
- npm install -> bun install
- npm run -> bun run
- node -> bun
Never use npm or node commands directly.
metadata:
priority: high
version: 1.0
</rule>
examples:
- input: |
# Running tests
COMMAND="test"
output: "~/.bun/bin/bun test"
- input: |
# Installing packages
PACKAGE="express"
output: "~/.bun/bin/bun add express"