Contributing
Thank you for expressing your interest in contributing to PancakeSwap!
![](https://docs.pancakeswap.finance/~gitbook/image?url=https%3A%2F%2F1605708651-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MHREX7DHcljbY5IkjgJ-847499179%252Fuploads%252Fgit-blob-6b5e716806e1867603d7e25f201d414c9a400223%252Fdevelopers-header.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=5bfca8c8&sv=1)
PancakeSwap is an open-source project. If you want to contribute to the project, this section is here to guide you through your first steps with the PancakeSwap team 🥞
Before starting any development, we highly encourage you to submit an issue on Github in order to discuss the problem, and the solution with the team.
Setup your dev environment
Fork the repository and an add upstream remote. E.g.
Make sure you have the latest version of the default branch (
develop
ormaster
)Create your own branch and install dependencies
Happy coding 🎉
Coding rules
We try to maintain as much consistency as we can between each of our repository. Your pull request has more chances to be accepted if you follow some the following rules, and write high quality code. Let's get started 💪
Use the UIKit
Check the UI Kit before you start doing anything. A lot of components are already created, and we don't want that you waste your time reinventing the wheel 😉
If a variant of a component needs to be created, use the corresponding component in the UI Kit as a base. For example:
Use the tools!
Most of our repos use Typescript, ESLint, and Prettier. Make sure you're familiar with Typescript’s best practices, and enable an ESLint and Prettier plugin for your IDE.
Make sure your code is formatted with Prettier, and is free from any ESLint error before you submit a pull request.
Some good practices
Keep components as small and "dumb" as possible.
Keep in mind that your code will be read and maintained by several other developers. Make it as clear and easy to update as possible.
Committing
Our commit messages follow Conventional Commits using commitlint.
Type | Description |
---|---|
build | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) |
ci | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) |
docs | Documentation only changes |
feat | A new feature |
fix | A bug fix |
perf | A code change that improves performance |
refactor | A code change that neither fixes a bug nor adds a feature |
style | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
test | Adding missing tests or correcting existing tests |
More at Angular's guidelines
Creating your pull request
Your code is ready to be submitted for review, congratulations🥳
All pull requests must have a description of what the PR is trying to accomplish.
Keep pull requests as small as possible. Larger pull requests should be broken up into smaller chunks with a dedicated base branch. Please tag the PR's that are merging into your base branch with the
epic
tag.If possible self-review your PR and add comments where additional clarification is needed.
Create a draft PR as soon as possible so we can view your ongoing progress.
Thanks for helping us making PancakeSwap even more awesome ❤
Last updated