If you want to contribute to whatsapp-web.js, start by forking the repository and opening a pull request with your changes. The project uses ESLint and Prettier to enforce a consistent coding style, so setting them up in your development environment is recommended to ensure your contributions meet the formatting standards.
Do not open issues for general questions or support requests. For help, please join the Discord Server instead. Installation instructions and general guidance are available in the documentation. Issues opened for questions will be closed.
Before creating a new issue, review the existing issue tracker to avoid duplicates.
- Bug reports must include a minimal reproduction and clear steps to reproduce the problem.
- Feature requests should clearly describe the use case and explain why the feature belongs in the library.
- Pull requests and commit messages must follow the conventional commit format for both commit messages and the PR title (e.g.
feat(client): add sendMessage option). The commit type is case-insensitive (feat,Feat, andFEATare all valid). - All pull requests should target the
mainbranch unless discussed otherwise. - Ensure that linting and tests pass before submitting your pull request.
To prepare your development environment:
- Fork and clone the repository, and ensure you are on the
mainbranch. - Run
npm installto install all dependencies. - Implement your changes or improvements.
- Run
npm run checkto execute ESLint and Prettier checks. - Run
npm testto ensure the test suite passes. - Submit a pull request (make sure it follows the conventional commit format).
To test your changes within your own project:
- Clone the repository and apply your modifications.
- Run
npm installinside the cloned directory. - In your project, run
npm link <path-to-your-clone>to create a symlink to your local version. - Import the package and verify your changes.
- If everything works as expected, you’ve successfully implemented your changes without breaking the library.