Skip to content

Files

Latest commit

 

History

History
115 lines (78 loc) · 2.97 KB

CONTRIBUTING.md

File metadata and controls

115 lines (78 loc) · 2.97 KB

Contributing

Editor Configurations

Configuring your editor to use our lint and code style rules will help make the code review process delightful!

eslint

Configure your editor to use our ESLint configurations.

editorconfig

Configure your editor to use our editor configurations.

Visual Studio Code

ext install EditorConfig

Git Workflow

The process of submitting a pull request is fairly straightforward and generally follows the same pattern each time:

  1. Create a feature branch
  2. Make your changes
  3. Rebase
  4. Check your submission
  5. Create a pull request
  6. Update the pull request

Create a feature branch

git checkout main
git pull origin main
git checkout -b <name-of-the-feature>

Make your changes

Modify the files, build, test, lint and eventually commit your code using the following command:

git add <path/to/file/to/commit>
git commit
git push origin <name-of-the-feature>

The above commands will commit the files into your feature branch. You can keep pushing new changes into the same branch until you are ready to create a pull request.

Rebase

Sometimes your feature branch will get stale with respect to the main branch, and it will require a rebase. The following steps can help:

git checkout main
git pull origin main
git checkout <name-of-the-feature>
git rebase main <name-of-the-feature>

note: If no conflicts arise, these commands will ensure that your changes are applied on top of the main branch. Any conflicts will have to be manually resolved.

Check your submission

Lint your changes

yarn run lint

The above command may display lint issues that are unrelated to your changes. The recommended way to avoid lint issues is to configure your editor to warn you in real time as you edit the file.

Fixing all existing lint issues is a tedious task so please pitch in by fixing the ones related to the files you make changes to!

Run tests

yarn test

Create a pull request

If you've never created a pull request before, follow these instructions.

Update the pull request

git fetch origin
git rebase origin/${base_branch}

# If there were no merge conflicts in the rebase
git push origin ${feature_branch}

# If there was a merge conflict that was resolved
git push origin ${feature_branch} --force

note: If more changes are needed as part of the pull request, just keep committing and pushing your feature branch as described above and the pull request will automatically update.