Contributing
Contributions to rut.ts are welcome! This guide will help you get started.
π€ How to Contribute
Reporting Issues
Found a bug or have a feature request?
- Check existing issuesΒ
- Create a new issue with:
- Clear description
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Code examples
Submitting Pull Requests
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Add tests for new functionality
- Ensure all tests pass:
npm test - Run linting:
npm run lint - Format code:
npm run prettier - Commit with clear message
- Push and create pull request
π οΈ Development Setup
Prerequisites
- Node.js 16+ or Bun
- npm, pnpm, or bun
Getting Started
# Clone the repository
git clone https://github.com/arrowsoftwarehq/rut.ts.git
cd rut.ts
# Install dependencies
npm install
# Run tests
npm test
# Run tests in watch mode
npm test -- --watch
# Build the library
npm run buildπ Code Guidelines
Code Style
- Use TypeScript
- Follow existing code style
- Add JSDoc comments for public functions
- Use meaningful variable names
- Keep functions focused and small
Testing
- Add tests for all new features
- Maintain or improve test coverage
- Test both happy paths and error cases
- Include edge cases
- Test safe mode behavior
Example Test Structure
describe('myFunction', () => {
describe('basic functionality', () => {
test('handles valid input', () => {
// Test implementation
})
})
describe('error cases', () => {
test('throws on invalid input', () => {
// Test implementation
})
})
describe('safe mode', () => {
test('returns null instead of throwing', () => {
// Test implementation
})
})
describe('edge cases', () => {
test('handles edge case', () => {
// Test implementation
})
})
})π§ Project Structure
rut.ts/
βββ src/
β βββ index.ts # Main library code
βββ tests/
β βββ validate.test.ts
β βββ format.test.ts
β βββ ...
βββ docs/ # Documentation site (Nextra)
βββ dist/ # Built files
βββ package.jsonπ Documentation
When adding features:
- Update README.md
- Add/update documentation in
/docs - Include code examples
- Document breaking changes
π― Areas for Contribution
Features
- New validation rules
- Additional formatting options
- Performance improvements
- More utility functions
Documentation
- More examples
- Better explanations
- Translations
- Video tutorials
Testing
- More edge cases
- Performance benchmarks
- Integration tests
Tooling
- CI/CD improvements
- Better dev experience
- Automated releases
π€ Maintainers
- Hans Pina @hansfpcΒ
π License
MIT Β© 2026 Rut.ts by Arrow Software
π Thank You
Thank you for contributing to rut.ts! Your help makes this library better for everyone in the Chilean developer community.
Last updated on