Skip to content

Latest commit

 

History

History
145 lines (81 loc) · 4.23 KB

HOW_TO_CONTRIBUTE.md

File metadata and controls

145 lines (81 loc) · 4.23 KB

How to Contribute

The following is a set of guidelines for contributing to eva.js. Please spend several minutes reading the article before you create an issue or pull request.

Code of Conductor


We have adopted the Contributor Covenant as its Code of Conduct, and we expect project participants to adhere to it. Please read the full text so that you can understand what actions will and will not be tolerated.

Issue Reporting


You can make use of the GitHub Issues for eva.js to:

  1. Report a bug.
  2. Request a feature
  3. Ask a question


Before reqorting an issue, please take the following steps:

  1. Search the existing issues.
  2. Clearly describe the issue including steps to reproduce when it is a bug.
  3. Provite an online example. Make use of jsFiddle, jsBin.


If you open an issue that does not conform to the requirements, it will be closed immediately.

Contributing Code

Setting Up


To set up for contributing code, you will take a few steps:

  1. Ensure you have node.js installed. You can download Node.js from nodejs.org and make sure your Node.js is later than 12. Use node -v to check your Node.js version.
  2. Fork the eva.js repository.
  3. Run lerna bootstrap in your cloned folder to install all the dependencies for eva.js.

Making a Change


After setting up the environment of eva.js, you can make your change already. The only thing you should make sure is that you checked out the correct branch.

Test Your Change


You can test your change by the following ways:

  • Clone the eva.js playground repository and write a demo for your change.
  • Write an uint test in the eva.js repository and run npm run test to execute the uint test.

Submitting a Pull Request


After you have made and tested your change, commit and push it to your fork. Then, open a Pull Request from your fork to the main eva.js repository on the branch you used in the Making a Change section of this document.

Reviewing a Pull Request

Addressing review feedback


If we ask for changes via code reviews then:

  1. Make the required updates to the code.
  2. Re-run the npm test suites to ensure tests are still passing.
  3. Create a fixup commit and push to your GitHub repository (this will update your Pull Request):
git commit --all --fixup HEAD
git push


That's it! Thank you for your contribution!

Updating the commit message


A reviewer might often suggest changes to a commit message (for example, to add more context for a change or adhere to our commit message guidelines). In order to update the commit message of the last commit on your branch:

  1. Check out your branch:
git checkout fix-branch
  1. Amend the last commit and modify the commit message:
git commit --amend
  1. Push to your GitHub repository:
git push

NOTE: If you need to update the commit message of an earlier commit, you can use git rebase in interactive mode. See the git docs for more details.

After your pull request is merged


After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:

  • Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
git push origin --delete fix-branch
  • Check out the master branch:
git checkout master -f
  • Delete the local branch:
git branch -D fix-branch
  • Update your master with the latest upstream version:
git pull --ff upstream master

Coding Rules


To ensure consistency throughout the source code, keep these rules in mind as you are working:

  • All features or bug fixes must be tested by one or more specs (unit-tests).
  • All public API methods must be documented.
  • We use Prettier as an automatic code formatter.

Credits


Thank you to all the people who have already contributed to eva.js!

// WIP: Contributors