First off, thank you for considering contributing to nostr-dm-magiclink-utils! It's people like you that make this package a great tool for the Nostr community.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes following our commit message convention
- Push to your branch
- Open a Pull Request
We follow semantic commit messages:
feat:
- New featuresfix:
- Bug fixesdocs:
- Documentation changesstyle:
- Code style changes (formatting, etc)refactor:
- Code changes that neither fix bugs nor add featuresperf:
- Performance improvementstest:
- Test-related changeschore:
- Changes to build process or auxiliary tools
Example: feat: add support for custom relay prioritization
- Clone your fork
- Install dependencies:
npm install
- Run tests:
npm test
- All code must be written in TypeScript
- Maintain 100% type safety
- No use of
any
without explicit justification - Document complex types
- Unit tests for all new functionality
- Integration tests for relay interactions
- Test coverage must not decrease
- Tests must pass in CI before merge
We use ESLint and Prettier. Before submitting:
npm run lint
npm run format
For any changes, update:
- TSDoc comments for public APIs
- README.md if adding features
- Example code if relevant
- CHANGELOG.md following semver
- Review SECURITY.md before contributing
- Never commit sensitive keys or credentials
- Report security issues privately
- Always sanitize user input
- Follow secure coding practices
When adding or modifying messages:
- Update all language templates
- Maintain RTL support
- Follow i18n best practices
- Test with various locales
- Update documentation
- Add tests for new features
- Ensure CI passes
- Get review from maintainers
- Squash commits before merge
Follow the commit message convention, but with more detail:
feat(relay): add support for custom relay prioritization
- Add RelayPriority interface
- Implement priority queue for relay connections
- Update documentation with examples
- Update CHANGELOG.md
- Update version in package.json
- Create GitHub release
- Publish to npm
- Open an issue for bugs
- Discussions for questions
- Security issues: see SECURITY.md
Contributors will be:
- Added to CONTRIBUTORS.md
- Mentioned in release notes
- Credited in documentation
Thank you for contributing!