Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Commit

Permalink
feat: get ready for open source (#8)
Browse files Browse the repository at this point in the history
* docs: add covenant code of conduct

* docs: add Apache 2.0 license

BREAKING: Change license from MIT to Apache 2.0

* docs: update readme to match guidelines

* chore: upgrade dependencies

* docs: add license header to all source files

* docs: add contributing guidelines

* refactor: whitelist NPM files

* docs: correct Node version in contributing guidelines
  • Loading branch information
connor-baer authored Nov 26, 2019
1 parent 5e19449 commit f66bd3b
Show file tree
Hide file tree
Showing 23 changed files with 543 additions and 56 deletions.
3 changes: 1 addition & 2 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/no-extraneous-dependencies
module.exports = require('@sumup/foundry/babel').node
module.exports = require('@sumup/foundry/babel').node;
18 changes: 16 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
// eslint-disable-next-line import/no-extraneous-dependencies
module.exports = require('@sumup/foundry/eslint').node
const { node: baseConfig, overwritePresets } = require('@sumup/foundry/eslint');

const customConfig = {
overrides: [
{
files: ['files/**/*.js'],
rules: {
'notice/notice': 'off',
'import/no-unresolved': 'off',
'no-unused-vars': 'warn'
}
}
]
};

module.exports = overwritePresets(baseConfig, customConfig);
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/ask-a-question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Question
about: Something's not clear? Ask a question
---

## Summarize the question

A clear and concise description of your question.

## Context

Provide relevant, detailed context to help us answer your question.

## Specifications

- Package version:
- Node version:
- OS name & version:
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/report-a-bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Report a bug
about: Create a bug report to help us improve
---

## Describe the bug

A clear and concise description of what the bug is.

## 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 you expected to happen.

## Specifications

- Package version:
- Node version:
- OS name & version:

## Additional context

Add any other context about the problem here.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/suggest-a-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Suggest a feature
about: Suggest an enhancement or new functionality
---

## Suggested feature

- What feature do you suggest we add?
- What problem does it solve?
- What feature (if any) would it replace?

## Alternatives

What are the alternatives you've explored? Why choose one over the other?

## Potential downsides

Do you see any downsides to this feature?
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Addresses #issue-number.

## Purpose

_Describe what you are trying to accomplish_

## Approach and changes

_Describe how you solved the problem_

## Definition of done

- [ ] Development completed
- [ ] Reviewers assigned
- [ ] Unit and integration tests
File renamed without changes
3 changes: 1 addition & 2 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/no-extraneous-dependencies
module.exports = require('@sumup/foundry/husky').base
module.exports = require('@sumup/foundry/husky').base;
8 changes: 0 additions & 8 deletions .npmignore

This file was deleted.

46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 behaviour that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behaviour by participants include:

- The use of sexualised language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behaviour and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour.

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 behaviours 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 behaviour may be reported by contacting the project team at [webchapter@sumup.com](mailto:webchapter@sumup.com). The project team 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
[version]: http://contributor-covenant.org/version/1/4/
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Contributing

## Prerequisites

- **[Node.js v9.10+](https://nodejs.org/)**
- **[`yarn`](https://yarnpkg.com/)**
- **Signed and verified CLA**

## Common commands

### `yarn lint`

Checks the source code for problems that will cause it to break when run and code style that violates the set of rules this project is following.

## Workflows

### File an issue

1. Check existing issues and verify that your issue has not been submitted already. If a similar issue exists, please add your report to that issue instead of opening a new one.
2. Open an issue using one of the issue templates. Please be as detailed as possible, this makes it easier for us to help you.

### Submit a pull request

1. Find an existing issue to work on or follow [the steps above](#file-an-issue) to create a new one that you're also going to fix. Add a comment to the issue to signal that you're working on a fix for the issue you picked.
2. Branch out from latest `master`.
3. Code, add, commit and push your changes in your branch.
4. Make sure that tests and linter(s) pass locally for you.
5. Create the pull request using the pull request template.
6. A codeowner/maintainer will review it shortly and help you merge your change to `master`.
Loading

0 comments on commit f66bd3b

Please sign in to comment.