👍🎉 First off, thanks for taking the time to contribute! 🎉👍
- Thank you, contributors
- How can I contribute?
- How do I get started?
- Style guides
- Other recommended practices
We'd like to thank all of our contributors.
In the bug report, please follow these steps:
- Use a clear and descriptive title for the issue to identify the problem.
- Describe the exact steps which reproduce the bug.
- Describe the behavior you observed and point out what exactly is the problem with that behavior.
- Explain the behavior you expected to see instead and why.
- Include screenshots, animated GIFs or videos to demonstrate the bug.
- Describe the environment in which the bug is observed, including the operating system and the browser you are using (if applicable).
In the feature or enhancement request, please follow these steps:
- Use a clear and descriptive title for the issue to identify the suggestion.
- Describe the current behavior and explain which behavior you expected to see instead and why.
- Explain why this enhancement would be useful.
- It's encouraged to use screenshots or drawings to demonstrate your point, if it helps.
Please follow these steps:
- Complete the initial setup
- Follow the workflow
- Follow the style guides
- Prerequisites: having Git, Node.js 12.x and Yarn installed on your machine.
- Fork the repository. (How to fork a repository?)
- Clone the forked repository. (How to clone a repository?)
- In the terminal, change directory to the repository's root directory.
- Add the original repository as a remote called
upstream
:- To add the original repository as
upstream
, run command:git remote add upstream https://github.com/BadwaterBay/vaniquery.git
- To verify you have added the original repository, run command:
git remote -v
- You should see the following output (assuming you are using HTTPS):\
origin https://github.com:<yourGitHubUsername>/vaniquery.git (fetch) origin https://github.com:<yourGitHubUsername>/vaniquery.git (push) upstream https://github.com/BadwaterBay/vaniquery.git (fetch) upstream https://github.com/BadwaterBay/vaniquery.git (push)
- To add the original repository as
- Install all dependencies with the following command. This could take a while.
yarn --frozen-lockfile
- Add this command-line app (vaniquery is a command-line app) to your machine for development and testing:
yarn dev-i
- Run command
vaniquery --version
in your terminal. If you see a version number, that means the app has been installed correctly. - Run command
yarn start:dev
to produce a production build (in./build/
) and automatically recompiles when you make changes in./src/
directory. - Run command
yarn test
to run preset tests on./build/
.
When you develop the program, 2 commands will be handy, for example:
vaniquery vanilla ./__tests__/testCases/testCaseFile.js
and
vaniquery revert ./__tests__/testCases/testCaseFile.js
The former will vanillaize the script ./__tests__/testCases/getElementById.js
and update it. Then you can open the file and check the results.
The latter will revert the vanillaized script back to its original form.
Please revert all test case scripts to their original state before submitting a pull request.
Our workflow is:
- Find an issue you'd like to solve and claim it by leaving a comment.
- Complete the initial setup, if you haven't.
- Bring your fork up to date with the original repository.
- Modify the code to solve the issue and commit changes.
- Make sure your base is up to date with the original repository (
upstream
) with commands:git fetch upstream git rebase upstream/master
- Push your commit to the remote of your forked repository. (How to push commits to remote?)
- Submit a pull request (PR) to be merged into the original repository's
master
branch. (How to create a PR?) - Peers will review your PR and may request revisions.
- Once your PR is approved, your commit will be merged to the
master
branch. Congratulations!
If you are new to this workflow, you can a practice run here: https://github.com/firstcontributions/first-contributions
If you are stuck, you are welcome to reach out and leave a comment.
- Completed the initial setup, if you haven't.
- Fetch updates from the original repository (
upstream
):git fetch upstream
- Make sure you are on your local
master
branch:git checkout master
- Rebase your local
master
branch withupstream/master
branch:git rebase upstream/master
- Push your local
master
to remote:If your push is rejected (why?), you might need to force-push to remote:git push origin master
git push -f origin master
- Format your code using Prettier:
yarn format
will format files with Prettier and save changes.- Tip: when you git-commit,
yarn format
will be automatically triggered.
- Lint your code using Eslint:
yarn lint
will run Eslint to check the code quality. Please try to resolve these issues before committing any changes.- Tip: when you git-commit,
yarn lint
will be automatically triggered.
yarn build
: Create a production build inside./build/
.yarn dev-i
: Install this command line interface (CLI) app on your machine via NPM for development and testing.yarn dev-r
: Remove this CLI app on your machine.yarn test
: Run preset tests on production build in./build/
, meaning that you need to runyarn build
oryarn start
beforeyarn test
.yarn start
: A combination ofyarn build
,yarn dev-r
andyarn dev-i
.yarn start:dev
: A combination ofyarn build
,yarn dev-r
andyarn dev-i
, but will watch changes in./src
and repeat the combination.- If you run into problems with Node dependencies:
- Try
yarn --frozen-lockfile
to see if it solves your problems. - If not, run
yarn refresh
to remove all dependencies in thenode_modules
directory and do a clean install of all dependencies.
- Try
- Use the present tense ("Add feature" not "Added feature").
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
- Use '&' instead of spelling out 'and'
- Limit the first line to 70 characters or less.
- Reference issues and pull requests liberally after the first line.
- When only changing documentation, include
[ci skip]
in the commit title. - Consider starting the commit message with an applicable emoji:
- ⭐
:star:
when adding new features or enhancements - 🐛
:bug:
when fixing bugs - 🎨
:art:
when improving the UI - 📝
:memo:
when writing documentations - 👕
:shirt:
when fixing linter warnings or improving the format of the code - 🛀
:bath:
when fixing CI builds - 🐎
:racehorse:
when improving the performance - ✅
:white_check_mark:
when adding tests - 🔒
:lock:
when dealing with security - ⬆️
:arrow_up:
when upgrading dependencies - ⬇️
:arrow_down:
when downgrading dependencies - 🔧
:wrench:
when configuring infrastructures
- ⭐
It is encouraged to sign your commits with signature verifications with GPG keys. How?