Skip to Content
πŸŽ‰ Rut.ts 3.4.0 is released! Check out Safe Mode and improved API.
DocumentationContributing

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?

  1. Check existing issuesΒ 
  2. Create a new issue with:
    • Clear description
    • Steps to reproduce (for bugs)
    • Expected vs actual behavior
    • Code examples

Submitting Pull Requests

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass: npm test
  6. Run linting: npm run lint
  7. Format code: npm run prettier
  8. Commit with clear message
  9. 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:

  1. Update README.md
  2. Add/update documentation in /docs
  3. Include code examples
  4. 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

πŸ“œ 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