|
1 | | -# Contributing |
| 1 | +# Contributing Guide |
2 | 2 |
|
3 | | -When contributing to this repository, please first discuss the change you wish to make via issue, |
4 | | -email, or any other method with the owners of this repository before making a change. |
| 3 | +Thanks for taking the time to contribute! |
5 | 4 |
|
6 | | -Please note we have a code of conduct, please follow it in all your interactions with the project. |
| 5 | +### Table of contents |
7 | 6 |
|
8 | | -## Pull Request Process |
| 7 | +[Code of Conduct](#code-of-conduct) |
9 | 8 |
|
10 | | -1. Ensure any install or build dependencies are removed before the end of the layer when doing a |
11 | | - build. |
12 | | -2. Update the README.md with details of changes to the interface, this includes new environment |
13 | | - variables, exposed ports, useful file locations and container parameters. |
14 | | -3. Increase the version numbers in any examples files and the README.md to the new version that this |
15 | | - Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). |
| 9 | +[Contribution prerequisites](#contribution-prerequisites) |
| 10 | + |
| 11 | +[Project Setup](#project-setup) |
| 12 | + * [How to run the project](#how-to-run-the-project) |
| 13 | + * [How to run tests](#how-to-run-tests) |
| 14 | + |
| 15 | +[How can you contribute](#how-can-you-contribute) |
| 16 | + * [Reporting bugs](#reporting-bugs) |
| 17 | + * [Suggesting enhancements](#suggesting-enhancements) |
| 18 | + * [Writing documentation](#writing-documentation) |
| 19 | + * [Your first code contribution](#your-first-code-contribution) |
| 20 | + |
| 21 | +[Additional Notes](#additional-notes) |
| 22 | + * [Issue and Pull Request Templates](#issue-and-pull-request-templates) |
| 23 | + * [Need help?](#need-help?) |
16 | 24 |
|
17 | 25 | ## Code of Conduct |
18 | 26 |
|
19 | | -### Our Pledge |
| 27 | +This project and everyone contributing to it adheres to the [ResearchGate Code of Conduct](CODE_OF_CONDUCT.md). |
| 28 | +By participating you are expected to uphold this code. Please report any behavior you find unacceptable to [researchgate@github.com](mailto:researchgate@github.com). |
| 29 | + |
| 30 | +## Contribution prerequisites |
| 31 | + |
| 32 | +Before you start your work, make sure that you: |
| 33 | + |
| 34 | +* have `node` installed at v6.10.0 |
| 35 | +* have `npm` installed at 5.3.0 |
| 36 | +* have `yarn` installed at v0.21.3 |
| 37 | +* are familiar with `git` |
| 38 | +* are familiar with [conventional commits](http://conventionalcommits.org) |
| 39 | +* have read and agree to abide by the [ResearchGate Code of Conduct](CODE_OF_CONDUCT.md) |
| 40 | + |
| 41 | +## Project setup |
| 42 | + |
| 43 | +### How to run the project |
| 44 | + |
| 45 | +Create a clone of the repository: |
| 46 | + |
| 47 | +``` |
| 48 | +git clone https://github.com/researchgate/react-intersection-observer.git |
| 49 | +cd react-intersection-observer |
| 50 | +``` |
| 51 | + |
| 52 | +Install the dependencies with: |
| 53 | + |
| 54 | +``` |
| 55 | +npm install |
| 56 | +``` |
| 57 | + |
| 58 | +Now run storybook: |
| 59 | + |
| 60 | +``` |
| 61 | +npm run storybook |
| 62 | +``` |
| 63 | + |
| 64 | +### How to run tests |
| 65 | + |
| 66 | +This project uses [jest](http://facebook.github.io/jest/) for JavaScript testing. |
| 67 | + |
| 68 | +To run tests, execute: |
| 69 | + |
| 70 | +``` |
| 71 | +yarn test |
| 72 | +``` |
| 73 | + |
| 74 | +Since coverage is not collected by default when running yarn test, run: |
| 75 | + |
| 76 | +``` |
| 77 | +yarn coverage |
| 78 | +``` |
| 79 | + |
| 80 | +To run linters use: |
| 81 | + |
| 82 | +``` |
| 83 | +yarn lint |
| 84 | +``` |
| 85 | + |
| 86 | +## How you can contribute |
| 87 | + |
| 88 | +### Reporting bugs |
| 89 | + |
| 90 | +This section guides you through the steps to follow when you submit a bug report for a ResearchGate project. |
| 91 | + |
| 92 | +Following these guidelines makes it easy for the maintainers and community to understand your report, reproduce the behavior, and find related reports. |
20 | 93 |
|
21 | | -In the interest of fostering an open and welcoming environment, we as |
22 | | -contributors and maintainers pledge to making participation in our project and |
23 | | -our community a harassment-free experience for everyone, regardless of age, body |
24 | | -size, disability, ethnicity, gender identity and expression, level of experience, |
25 | | -nationality, personal appearance, race, religion, or sexual identity and |
26 | | -orientation. |
| 94 | +Before creating a bug report, please check Open Issues as you may find that there is already an issue open for the bug you’ve found. When you create a bug report, be sure to include as much detail as possible and fill out [the required template](ISSUE_TEMPLATE.md), the information it asks for helps us resolve issues faster. |
27 | 95 |
|
28 | | -### Our Standards |
| 96 | +After you have submitted the issue, we'll try to get back to you as soon as possible. |
29 | 97 |
|
30 | | -Examples of behavior that contributes to creating a positive environment |
31 | | -include: |
| 98 | +### Suggesting enhancements |
32 | 99 |
|
33 | | -* Using welcoming and inclusive language |
34 | | -* Being respectful of differing viewpoints and experiences |
35 | | -* Gracefully accepting constructive criticism |
36 | | -* Focusing on what is best for the community |
37 | | -* Showing empathy towards other community members |
| 100 | +This section guides you through submitting a feature suggestion. |
38 | 101 |
|
39 | | -Examples of unacceptable behavior by participants include: |
| 102 | +All enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/) and, when approved by a core team member or project maintainer, are given the green light to then be turned into a Pull Request. |
| 103 | +For the best possible experience, please provide us with: |
40 | 104 |
|
41 | | -* The use of sexualized language or imagery and unwelcome sexual attention or |
42 | | -advances |
43 | | -* Trolling, insulting/derogatory comments, and personal or political attacks |
44 | | -* Public or private harassment |
45 | | -* Publishing others' private information, such as a physical or electronic |
46 | | - address, without explicit permission |
47 | | -* Other conduct which could reasonably be considered inappropriate in a |
48 | | - professional setting |
| 105 | +* **A clear and descriptive title** |
| 106 | +* **A step-by-step description of the suggested enhancement** and what it should do |
| 107 | +* **Specific examples to demonstrate the steps**. Ideally, you should support it with code snippets, screenshots, and/or animated GIFs |
| 108 | +* **Explanation of why this feature would be useful** to this project |
| 109 | +* **Your development environment** and context for creating the feature |
49 | 110 |
|
50 | | -### Our Responsibilities |
| 111 | +After you have submitted your Pull Request, we'll try to get back to you as soon as possible. |
51 | 112 |
|
52 | | -Project maintainers are responsible for clarifying the standards of acceptable |
53 | | -behavior and are expected to take appropriate and fair corrective action in |
54 | | -response to any instances of unacceptable behavior. |
| 113 | +### Writing documentation |
55 | 114 |
|
56 | | -Project maintainers have the right and responsibility to remove, edit, or |
57 | | -reject comments, commits, code, wiki edits, issues, and other contributions |
58 | | -that are not aligned to this Code of Conduct, or to ban temporarily or |
59 | | -permanently any contributor for other behaviors that they deem inappropriate, |
60 | | -threatening, offensive, or harmful. |
| 115 | +All great projects require good documentation. |
| 116 | +There is __always__ room for (better) docs, so why not to contribute to the project by enhancing them? |
| 117 | +Please do so via Pull Request. |
61 | 118 |
|
62 | | -### Scope |
| 119 | +### Your first code contribution |
63 | 120 |
|
64 | | -This Code of Conduct applies both within project spaces and in public spaces |
65 | | -when an individual is representing the project or its community. Examples of |
66 | | -representing a project or community include using an official project e-mail |
67 | | -address, posting via an official social media account, or acting as an appointed |
68 | | -representative at an online or offline event. Representation of a project may be |
69 | | -further defined and clarified by project maintainers. |
| 121 | +Unsure where you can start contributing? |
| 122 | +We strive to make all our projects easy for beginners to contribute to. Just look out for issues labeled `help-wanted` and `beginner-friendly`, then get stuck in! |
| 123 | +If you still need some guidance, consider [this resource](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github) and/or contact us. |
70 | 124 |
|
71 | | -### Enforcement |
| 125 | +## Additional notes |
72 | 126 |
|
73 | | -Instances of abusive, harassing, or otherwise unacceptable behavior may be |
74 | | -reported by contacting the project team at mail@luismerino.name. All |
75 | | -complaints will be reviewed and investigated and will result in a response that |
76 | | -is deemed necessary and appropriate to the circumstances. The project team is |
77 | | -obligated to maintain confidentiality with regard to the reporter of an incident. |
78 | | -Further details of specific enforcement policies may be posted separately. |
| 127 | +### Issue and pull request templates |
79 | 128 |
|
80 | | -Project maintainers who do not follow or enforce the Code of Conduct in good |
81 | | -faith may face temporary or permanent repercussions as determined by other |
82 | | -members of the project's leadership. |
| 129 | +When filing an issue or pull request, please take the time to fill out the templates we provide in as much detail as you can. This helps ensure that we have all the information we need to provide you with the right support so that your experience contributing to our open-source project runs as smoothly and easily as you would like it to. |
83 | 130 |
|
84 | | -### Attribution |
| 131 | +### Need help? |
85 | 132 |
|
86 | | -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, |
87 | | -available at [http://contributor-covenant.org/version/1/4][version] |
| 133 | +If you need any help or require additional information, don't hesitate to contact the project maintainer or any of the contributors. |
88 | 134 |
|
89 | | -[homepage]: http://contributor-covenant.org |
90 | | -[version]: http://contributor-covenant.org/version/1/4/ |
| 135 | +Thank you for contributing! |
0 commit comments