diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index a3403f1..798448c 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -1,13 +1,10 @@ # Contributor Covenant Code of Conduct ## Our Pledge - In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards - Examples of behavior that contributes to creating a positive environment include: - * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism @@ -15,7 +12,6 @@ Examples of behavior that contributes to creating a positive environment include * Showing empathy towards other community members Examples of unacceptable behavior by participants include: - * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment @@ -23,23 +19,19 @@ Examples of unacceptable behavior by participants include: * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities - 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 instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope - This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement - Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting Patrick Burtchaell, the project owner, at [patrick@pburtchaell.com](mailto:patrick@pburtchaell.com). The project owner will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 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. ## Attribution - This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]. [homepage]: http://contributor-covenant.org diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ce7ff05..b11ebd2 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,76 +1,22 @@ # Contributing - -[![Dependency Status](https://david-dm.org/pburtchaell/react-notification.svg)](https://david-dm.org/pburtchaell/react-notification) [![Build Status](https://travis-ci.org/pburtchaell/react-notification.svg)](https://travis-ci.org/pburtchaell/react-notification) - -**It is imperative that pull requests include tests and documentation and issues follow guidelines.** Please be familar with the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/) before contributing to this project. If you are new to open source, check out this 38 minute course on [how to contribute to open source on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github). It's free! :smile: +Please familize yourself with the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/) before contributing. ## Getting Started 1. Clone the repository -2. Install dependencies: `npm install`, or, if you use Yarn: `yarn` +2. Install dependencies: `npm install` 3. Run tests: `npm test` -4. Run example: `npm start` - -## Need Help? :raising_hand: - -It's okay to ask for help via a GitHub issue, but first read the ["Filing an Issue"](#filing-an-issue) guide and consider: - -* Is my issue specific to this project? -* Is [StackOverflow](http://stackoverflow.com/questions/ask) a better place to ask for help? If yes, use the **#react** and **#react-notification** tags. -* Can I reduce the code example to the bare minimum required to explain what I need help with? -* Can I create a [JSBin](https://jsbin.com/?html,output) for the code example? -* Can I explain what the expected behavior is? -* Can I explain what the actual beavior is? - -## Found a Bug? - -**The best bug report is a failing test in the repository as a pull request.** Please refer to the ["Filing an Issue"](#filing-an-issue) guide and include: - -* Version number -* Steps to reproduce -* Expected behavior -* Actual behavior - -## Have a Feature Request? - -If you have a feature request, provide commentary and code samples on what this feature means for you. - -* What do you perceive it will enable you to do? -* What potential bugs will be avoided? -* What edge cases will it support? -* Is it a [micro-optimization](http://stackoverflow.com/questions/tagged/micro-optimization). If yes, is it a valuable? - -Please refer to the ["Filing an Issue"](#filing-an-issue) guide. - -## Filing an Issue - -1. Check if a related open issue exists by using search. See the GitHub guide to [searching issues](https://help.github.com/articles/searching-issues/). -2. If a related issue does *not* exist, open an issue. -3. If a related issue does exist, contribute to the conversation there. - -Before you create an issue, consider: - -* Did you describe the problem you are encountering? -* Did you describe the expected behavior? -* Did you provide a formatted code example? See the GitHub guide on [how to format code with Markdown](help.github.com/categories/writing-on-github/). -* Did you include a relevant label? - -If you include all of the above, it is easier to understand you. We respond quicker to formatted, comprehensive issues. - -Please keep in mind that issues should *contribute* to the community. The primary function of issues should be for bugs and feature requests. If you open an issue asking for help, that's fine. However, if you do not provide context or code examples, the issue will be closed and you will be redirected to this document. - -## Making a Contribution +4. Run examples: `npm start` -1. Check [the issues](https://github.com/pburtchaell/react-notification/issues) for "help wanted" labels. -2. Check if there is a pull request already open for this issue. If there is, please do not duplicate efforts. -3. Commit the changes required to resolve the issue. Git commit messages [should be written in the imperative](http://chris.beams.io/posts/git-commit/). A pre-commit hook will run tests and lint code. If needed, you can force a commit with `--no-verify`. -4. If needed, add one or more unit test(s). **For new features and bug fixes, a unit test is required.** Follow the [red/green/refactor process](https://en.wikipedia.org/wiki/Test-driven_development#Development_style). -5. Run tests and linter: `npm test`. Code is linted using ES Lint. Rules are located in `.eslintrc`. You must maintain the existing code style. **Tests must pass before the PR is merged.** -6. Document new features and/or API changes. +### File Organization +All code is written in JavaScript and transpiled using Babel. -If you add a new dependency (for the package or development), you will need to use [Yarn](https://yarnpkg.com/) to update the `yarn.lock` file with the dependency version. By installing depdencies faster than npm, Yarn drastically decreases the time it takes to run builds on continuous integration. +Source files are located in the `src` directory. Test files are located in the `test` directory. -## File organization +### Git +Git commit messages [should be written in the imperative](http://chris.beams.io/posts/git-commit/). -All code, including tests, is written in next-generation JavaScript and transpiled using Babel. Source files are located in `src` and transpiled to `dist`, which is gitignored. Tests should be placed in a `test` directory. +A pre-commit hook will run tests and lint code when you make a commit. If needed, you can force a commit with `--no-verify`. +### Tests +Tests are written in Mocha and code style is maintained with ESLint. diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 107803c..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,33 +0,0 @@ -:wave: Hi! If you switch to "Preview" mode (using the button above), this is easier to read and you can click on links. This template exists to help you create an issue that is both valuable to you and to the GitHub community. - -:point_right: **Found a bug?** [Read this](https://github.com/pburtchaell/react-notification/blob/master/.github/CONTRIBUTING.md#found-a-bug). -:point_right: **Have a feature request?** [Read this](https://github.com/pburtchaell/react-notification/blob/master/.github/CONTRIBUTING.md#have-a-feature-request). -:point_right: **Need help?** [Read this](https://github.com/pburtchaell/react-notification/blob/master/.github/CONTRIBUTING.md#need-help-raising_hand). - -If you delete this template and do not provide the information we need to resolve your issue, *your issue will be closed* and you will be redirected to the contributing guide. :skull: - ---- - -For help, use this template: - -## Version Number - -## Code Example - -## Expected behavior - -## Actual Behavior - ---- - -For bugs, use this template: - -## Version Number - -## Test Case - -## Steps to Reproduce - -## Expected Behavior - -## Actual Behavior diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..90fe5d4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,45 @@ +--- +name: Bug report +about: Create a report to help us improve +--- +Hello! :wave: + +This template enables you to open an issue that is valuable for you, the project, and the GitHub community. :two_hearts: + +Before submitting an issue, please: +1. Search for related issues. +2. Agree the [code of conduct](/.github/CODE_OF_CONDUCT.md). +3. Read the [contributing guide](/.github/CONTRIBUTING.md). + +If you are new to open source, check out this 38 minute course on [how to contribute to open source on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github). It's free! :smile: + +--- + +## Version Number +The Redux version number and the Redux Promise Middleware version number. + +If your issue involves other libraries, please include the names and versions of those libraries + +## Test Case +Some code or a fork to help us reproduce the behavior. + +Consider creating a [JSBin](https://jsbin.com/?html,output) for the code example. + +## Steps to Reproduce +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +## Expected Behavior +A clear and concise description of what the bug is. + +## Actual Behavior +A clear and concise description of what you expected to happen. + +## Screenshots +If applicable, screenshots to help explain your problem. + +## Additional Context +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..2c92fc2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,27 @@ +--- +name: Feature request +about: Suggest an idea for this project +--- +Hello! :wave: + +This template enables you to open an issue that is valuable for you, the project, and the GitHub community. :two_hearts: + +Before submitting an issue, please: +1. Agree the [Code of Conduct](/.github/CODE_OF_CONDUCT.md). +2. Read the [Contributing Guide](/.github/CONTRIBUTING.md). + +If you are new to open source, check out this 38 minute course on [how to contribute to open source on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github). It's free! :smile: + +--- + +## Problem +A clear and concise description of what the problem is and how it relates to the project. + +## Solution(s) +A clear and concise description of what you want to happen. + +## Alternatives +A clear and concise description of any alternative solutions or features you've considered. + +## Additional Context +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/help.md b/.github/ISSUE_TEMPLATE/help.md new file mode 100644 index 0000000..ea33e82 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/help.md @@ -0,0 +1,13 @@ +--- +name: Help +about: Ask for help on a problem +--- +Issues should primarily be used for bug reports and feature requests. + +Before you ask for help on a problem, please answer the following questions: + +- Am I asking for help on a simple problem that is unreleated to or outside the scope of this project? (yes/no) +- Can I ask for help on StackOverflow instead of GitHub? (yes/no) + +If you answered "yes" to one of those questions, please do not create an issue asking for help. + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..437a316 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ +Hello! :wave: + +This template enables you to open an issue that is valuable for you, the project, and the GitHub community. :two_hearts: + +Before submitting an issue, please: +1. Agree the [Code of Conduct](/.github/CODE_OF_CONDUCT.md). +2. Read the [Contributing Guide](/.github/CONTRIBUTING.md). + +If you are new to open source, check out this 38 minute course on [how to contribute to open source on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github). It's free! :smile: + +--- + +Before submitting a pull request, please make sure the following is done: + +1. Add tests for new functionality or bug fixes, following the [red/green/refactor method](https://en.wikipedia.org/wiki/Test-driven_development#Development_style) +2. Ensure all tests pass: `npm test` +3. Update and/or add documentation + +**In order to merge your Pull Request, tests and documentation are required.** \ No newline at end of file