Cursor configuration for developing Obsidian plugins with TypeScript, including formatting, build automation, and project structure preferences.
Configure your Cursor editor for Obsidian plugin development with TypeScript, following best practices from the obsidian-encryptall-plugin.
Apply the following editor settings and development workflow when working on Obsidian plugins:
1. **Formatting Standards**
- Enable format on save and format on paste
- Use Prettier as the default formatter
- Set tab size to 4 spaces
- Insert spaces instead of tabs
- Enable automatic indentation detection
- Trim trailing whitespace on save
- Insert final newline in all files
- Set ruler at 100 characters for line length guidance
2. **TypeScript/JavaScript Preferences**
- Use single quotes for strings
- Prefer non-relative import module specifiers when possible
- Apply these preferences to both TypeScript and JavaScript files
3. **Project File Management**
- Exclude build artifacts and dependencies from search and file explorer:
- `node_modules/`
- `dist/`
- `build/`
- `.git/`
- Configure file watchers to ignore these directories for performance
4. **Build Automation**
- Run `npm run build` automatically on file save
- Exclude build, dependency, and git directories from triggering builds
- This ensures the plugin is always compiled with the latest changes
5. **Code Organization**
- Keep source code clean and properly formatted
- Follow consistent indentation and spacing rules
- Maintain consistent import organization with non-relative paths
When working on an Obsidian plugin project:
1. Apply these settings to your Cursor workspace
2. Write your plugin code following TypeScript best practices
3. Let automatic formatting handle style consistency
4. Rely on automatic builds to keep your plugin up-to-date
5. Focus on plugin functionality while the editor handles formatting and builds
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/obsidian-plugin-development-rules/raw