Thank you for your interest in contributing to this project!
- Clone the repository:
git clone https://github.com/Welcomer-Bot/utils.git
cd utils- Install dependencies:
npm install- Run tests:
npm test- Build the project:
npm run build- Create a new branch for your feature or bugfix
- Make your changes in the
src/directory - Add tests in
src/*.test.tsfiles - Run tests to ensure everything passes:
npm test - Run the linter:
npm run lint - Build to verify TypeScript compilation:
npm run build - Commit your changes with a clear message
- Push to your fork and create a Pull Request
When adding new utility functions:
- Add the function to an appropriate file in
src/(or create a new file) - Export the function from
src/index.ts - Add comprehensive tests in the corresponding
.test.tsfile - Document the function with JSDoc comments including:
- Description
- @param tags for all parameters
- @returns tag for return value
- Update the README.md with usage examples
- Write tests for all new functionality
- Aim for high code coverage
- Tests should be clear and test one thing at a time
- Use descriptive test names
- Follow TypeScript best practices
- Use clear, descriptive variable and function names
- Keep functions small and focused
- Add comments for complex logic
- The linter will enforce basic style rules
- Ensure all tests pass
- Update the README.md if you've added new features
- Follow the existing code style
- Write clear commit messages
- Your PR will be reviewed by maintainers
Package publishing is automated via GitHub Actions when a new release is created. Only maintainers can publish new versions.
Feel free to open an issue for any questions or concerns.