Skip to content

Commit af06d4b

Browse files
committed
feat(blueprint): use node-package-blueprint scripts, deps, and structure
1 parent dda0a00 commit af06d4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1960
-1350
lines changed

.eslintrc

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
{
2-
"env": {
3-
"browser": true
4-
},
5-
"extends": "airbnb-base",
2+
"extends": ["@researchgate/rg-base", "@researchgate/rg-react"],
63
"parser": "babel-eslint",
74
"rules": {
8-
"no-underscore-dangle": 0,
9-
"arrow-parens": 0,
10-
"comma-dangle": 0,
11-
"no-unused-vars": 0,
12-
"react/jsx-uses-react": 0,
13-
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
5+
"import/no-extraneous-dependencies": [
6+
"error",
7+
{
8+
"devDependencies": true
9+
}
10+
]
1411
}
1512
}

.github/CODE_OF_CONDUCT.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open, inclusive, and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, nationality, personal appearance, race, religion, sexual identity and orientation, level of experience, or technical ability.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment
10+
include:
11+
12+
* Using welcoming and inclusive language
13+
* Being respectful of different viewpoints and experiences
14+
* Gracefully accepting constructive criticism
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Sustained disruption of discussion
22+
* Public or private harassment
23+
* Publishing others' private information, such as a physical or electronic
24+
address, without explicit permission
25+
* Other conduct which could reasonably be considered inappropriate in a
26+
professional setting
27+
28+
The ResearchGate community prioritizes (marginalized) people's safety over (privileged) people's comfort.
29+
30+
## Our Responsibilities
31+
32+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instance of unacceptable behavior.
33+
34+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behavior that they deem inappropriate, threatening, offensive, or harmful.
35+
36+
## Enforcement
37+
38+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [researchgate@github.com](mailto:researchgate@github.com). All complaints will be reviewed and investigated, and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regards to the reporter of an incident.
39+
Further details of specific enforcement policies may be posted separately.
40+
41+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
42+
43+
## Attribution
44+
45+
This Code of Conduct is based on [Contributor Covenant][homepage].
46+
47+
[homepage]: http://contributor-covenant.org

.github/CONTRIBUTING.md

Lines changed: 111 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,135 @@
1-
# Contributing
1+
# Contributing Guide
22

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!
54

6-
Please note we have a code of conduct, please follow it in all your interactions with the project.
5+
### Table of contents
76

8-
## Pull Request Process
7+
[Code of Conduct](#code-of-conduct)
98

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?)
1624

1725
## Code of Conduct
1826

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.
2093

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.
2795

28-
### Our Standards
96+
After you have submitted the issue, we'll try to get back to you as soon as possible.
2997

30-
Examples of behavior that contributes to creating a positive environment
31-
include:
98+
### Suggesting enhancements
3299

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.
38101

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:
40104

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
49110

50-
### Our Responsibilities
111+
After you have submitted your Pull Request, we'll try to get back to you as soon as possible.
51112

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
55114

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.
61118

62-
### Scope
119+
### Your first code contribution
63120

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.
70124

71-
### Enforcement
125+
## Additional notes
72126

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
79128

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.
83130

84-
### Attribution
131+
### Need help?
85132

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.
88134

89-
[homepage]: http://contributor-covenant.org
90-
[version]: http://contributor-covenant.org/version/1/4/
135+
Thank you for contributing!

.github/ISSUE_TEMPLATE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Thanks for taking the time to file an issue with us.
2+
Please note that this issue template is used **ONLY** for reporting bugs.
3+
4+
If you have an issue that isn’t a bug, please follow the steps listed in the [Contributing](CONTRIBUTING.md).
5+
Thanks!
6+
7+
## Expected behavior
8+
<!--- What should happen -->
9+
10+
## Current behavior
11+
<!--- What is happening instead of the expected behavior -->
12+
13+
## Steps to reproduce
14+
<!--- Provide a link to a live example, a code snippet, or a set of steps to -->
15+
<!--- reproduce this bug. -->
16+
1.
17+
2.
18+
3.
19+
4.
20+
21+
## Context (environment)
22+
<!--- Please provide technical context, as well as possible background -->
23+
<!--- information that can help us identify the problem -->
24+
25+
* **Version**: <!-- compulsory. you must provide your version -->
26+
* **Platform**: <!-- either `uname -a` output, or if Windows, version and 32-bit or
27+
64-bit -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Thanks for taking the time to file a pull request with us.
2+
Please take a moment to provide the following details:
3+
4+
<!--- Provide a general summary of your changes in the Title above -->
5+
6+
## Description
7+
<!--- Describe your changes in detail -->
8+
9+
## Motivation and context
10+
<!--- Why is this change required? What problem does it solve? -->
11+
<!--- If it fixes an open issue, please link to the issue here. -->
12+
13+
## How has this been tested?
14+
<!--- Please describe in detail how you tested your changes. -->
15+
<!--- Include details of your testing environment, and the tests you ran to -->
16+
<!--- see how your change affects other areas of the code, etc. -->
17+
18+
## Screenshots (if relevant):
19+
20+
## Type of change
21+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
22+
- [ ] Bug fix (non-breaking change which fixes an issue)
23+
- [ ] New feature (non-breaking change which adds functionality)
24+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
25+
26+
## Checklist:
27+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
28+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
29+
- [ ] My code follows the code style of this project
30+
- [ ] My change requires a change to the documentation
31+
- [ ] I have updated the documentation accordingly
32+
- [ ] I have read the [CONTRIBUTING](CONTRIBUTING.md) document
33+
- [ ] I have added tests to cover my changes
34+
- [ ] All new and existing tests passed

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
node_modules
44
npm-debug.log*
55
lib
6-
docs
7-
coverage
6+
coverage
7+
docs/static
8+
docs/favicon*
9+
docs/*.html
10+
flow-typed

.npmignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm-debug.log
1717
.tmp
1818
.eslintignore
1919
yarn.lock
20-
examples
2120
.storybook
22-
test
23-
example
21+
docs/static
22+
docs/favicon
23+
docs/*.html

.storybook/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ setOptions({
77
downPanelInRight: true,
88
});
99

10-
storybook.configure(() => require('../examples/index.js'), module);
10+
storybook.configure(() => require('../docs/docs/index.js'), module);

0 commit comments

Comments
 (0)