Skip to content

Contributing

Ting Lee edited this page Jun 29, 2020 · 18 revisions

Contribution Guide

How to Contribute

  1. Clone the glints-aries repo
    • For Glints engineers: you do not have to fork the repo. This allows other engineers to easily access your branches.
  2. Create a branch (see Branch-Naming)
  3. Commit your changes and push the code
  4. Submit a PR
    • request a review from the Glints Aries maintainer (currently @franciscrispin)
    • assign yourself to the PR
    • add appropriate label(s)
    • reference any relevant issues or PRs by pasting the links in the comments
    • resolve any merge conflicts before submitting the PR
  5. Once the PR is approved, the reviewer will merge the PR and publish a new version of the library

Branch Naming

  • New features or enhancements: feature/feature-name
  • Bugs or hotfixes: hotfix/hotfix-name
  • Writing tests: test/component-name
  • Documentation: doc/documentation-name

Guidelines

1. All components should have good test coverage.

We are in the process of documenting how we define test coverage that is "good".

2. Update the ComponentStory if necessary.

Example:

ButtonStory

Demo

3. Run Tests

yarn test to run tests locally. We are in the midst of implementing continuous integration and deployment into this project.

4. Run prettier to format your code changes.

Run prettier automatically on save

If you are using vscode, download the prettier extension and turn on Editor: Format On Save

Run prettier manually using the command line

Run this command to format all subdirectories and files in a directory:

yarn prettier --write "*src/directoryName/**/*.{tsx,ts}"

5. Fix all typescript or eslint errors/warnings before submitting a PR.

For more information on testing

FAQ

How to upgrade to the latest version of glints-aries

yarn upgrade glints-aries@version

For glints engineers, you can run this command on your review apps.