Skip to content

Latest commit

 

History

History
153 lines (94 loc) · 7.68 KB

CONTRIBUTING.md

File metadata and controls

153 lines (94 loc) · 7.68 KB

Contributing Guide

Thank you for investing your time in contributing to our project! ✨.

Read our Code of Conduct to keep our community approachable and respectable.

In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.

Project Overview

To get an overview of the project, read the README file.

About Chrome Extensions

Here are some resources to help you with Chrome Extensions development:

About Open Source

Here are some resources to help you get started with open source contributions:

Issues

Create a new issue

If you spot a problem wit this project, search if an issue already exists. If a related issue doesn't exist, you can open a new issue using a relevant issue form.

Solve an issue

Scan through our existing issues to find one that interests you. You can narrow down the search using labels as filters. See "Label reference" for more information. If you find an issue to work on, you are welcome to assign it to yourself and to open a Pull Request with a fix.

Overview of How To Fork and Submit a PR

1. Fork the repository and clone your fork.

You cannot make your changes directly on the repository. Create a fork as a copy and clone it to work on it locally.

2. Set up node.

If you don't already have it, install Node Version Manager (NVM).

On the command line, use NVM to use the Node version specified in {PATH_TO_LOCAL_REPO}/.nvmrc.

cd {PATH_TO_LOCAL_REPO}
nvm use

⚠️ NOTE: Windows does not automatically read .nvmrc

3. Install dependencies.

On the command line, use Node to install dependencies.

cd {PATH_TO_LOCAL_REPO}
npm clean install

4. Create a working branch and start your code changes.

On the command line:

cd {PATH_TO_LOCAL_REPO}
git checkout -b {NEW_BRANCH_NAME}

On your editor, edit files as needed.

5. Update CHANGELOG.md.

📣 To ensure you changes will be included in the next release notes, add your updates to the [Unreleased] section of the CHANGELOG under the appropriate update type as specified in Keep A Changelog:

  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for soon-to-be removed features.
  • Removed for now removed features.
  • Fixed for any bug fixes.
  • Security in case of vulnerabilities.

6. Run tests, lints, and formatter.

On the command line:

cd {PATH_TO_LOCAL_REPO}
npm run test
npm run lint
npm run format

7. Commit and push your update.

Commit and push your code changes once you are happy with them.

8. Submit a Pull Request.

When you're finished with the changes, create a pull request.

  • Fill in the Pull Request description and information as indicated by the template.
  • Don't forget to link PR to issue if you are solving one.
  • Once you submit your PR, the CI pipeline checks tests, linters, and formatters. Check the results to see if anything needs to be fixed.

9. Address any change requests during Code Review.

After submitting the PR, your code changes will be subject to review.

We may ask for changes to be made, either using suggested changes or pull request comments.

If you run into any merge issues, checkout this git tutorial to help you resolve merge conflicts and other issues.

10. Pull after Merge.

The repository owner will merge your PR once it passes code review.

This means your code changes are now part of the main repository and can be pulled.

NOTE: This project does not automatically publish to the Chrome Store, but you can load the extension locally.

Congratulations, you are now officially a contributor 🎉🎉 Thank you! ✨.

Windows

This project can be developed on Windows, however a few potential gotchas need to be kept in mind:

  1. Regular Expressions: Windows uses \r\n for line endings, while Unix-based systems use \n. Therefore, when working on Regular Expressions, use \r?\n instead of \n in order to support both environments. The Node.js os.EOL property can be used to get an OS-specific end-of-line marker.
  2. Paths: Windows systems use \ for the path separator, which would be returned by path.join and others. You could use path.posix, path.posix.join etc and the slash module, if you need forward slashes - like for constructing URLs - or ensure your code works with either.
  3. Bash: Not every Windows developer has a terminal that fully supports Bash, so it's generally preferred to write scripts in JavaScript instead of Bash.
  4. Filename too long error: There is a 260 character limit for a filename when Git is compiled with msys. While the suggestions below are not guaranteed to work and could cause other issues, a few workarounds include:
    • Update Git configuration: git config --system core.longpaths true
    • Consider using a different Git client on Windows