Contributing to FxTS
November 30, 2025 · View on GitHub
First off, thank you for considering contributing to FxTS! It's people like you that make FxTS such a great tool for functional programming in TypeScript.
Code of Conduct
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
How Can I Contribute?
Reporting Bugs
Before creating bug reports, please check the existing issues to avoid duplicates. When you create a bug report, please include as many details as possible:
- Use a clear and descriptive title for the issue
- Describe the exact steps to reproduce the problem
- Provide specific examples (code snippets, test cases)
- Describe the expected behavior
- Include your environment details (Node.js version, OS, etc.)
Suggesting Features
Feature suggestions are welcome! Please provide:
- A clear and descriptive title
- A detailed description of the proposed feature
- Explain why this feature would be useful to FxTS users
- Include code examples if applicable
Pull Requests
- Fork the repo and create your branch from
main - If you've added code that should be tested, add tests
- Ensure the test suite passes
- Make sure your code follows the existing code style
- Write a clear commit message describing your changes
Getting Started
Prerequisites
- Node.js (LTS version recommended)
- npm
Setup
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/FxTS.git cd FxTS - Install dependencies:
npm install
Development Workflow
Available Scripts
| Command | Description |
|---|---|
npm run build | Build the project |
npm test | Run the test suite |
npm run lint | Check for linting errors |
npm run lint:fix | Fix linting errors automatically |
npm run prettier | Check code formatting |
npm run prettier:fix | Fix code formatting automatically |
npm run compile:check | Run TypeScript type checking |
Before Submitting
Make sure your changes pass all checks:
npm run lint
npm run prettier
npm run compile:check
npm test
Code Style Guidelines
TypeScript
- Write clean, readable TypeScript code
- Use proper type annotations
- Prefer
typeimports for type-only imports (enforced by ESLint)
Functional Programming Principles
FxTS is a functional programming library. Please keep these principles in mind:
- Immutability: Avoid mutating data
- Pure Functions: Functions should not have side effects
- Lazy Evaluation: Support lazy evaluation where applicable
- Type Safety: Ensure proper type inference
Formatting
This project uses ESLint and Prettier for code style. Your code will be automatically checked against these rules.
Testing
- We use Jest for testing
- Test files should be named
*.spec.ts - Place tests in the same directory as the code being tested
- New features must include comprehensive tests
- Bug fixes should include a test that would have caught the bug
Running Tests
# Run all tests
npm test
# Run tests in watch mode (during development)
npm test -- --watch
Submitting Changes
- Create an issue first (if one doesn't exist) to discuss your proposed changes
- Create a feature branch from
main:git checkout -b feature/your-feature-name - Make your changes with clear, descriptive commits
- Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request against the
mainbranch- Reference any related issues in your PR description (e.g., "Fixes #123")
- Describe what changes you made and why
Project Structure
FxTS/
├── src/ # Source code
├── test/ # Test files
├── docs/ # Documentation
└── website/ # Documentation website
License
By contributing to FxTS, you agree that your contributions will be licensed under the Apache License 2.0.
Questions?
Feel free to open an issue if you have any questions about contributing!