Skip to content

Commit 77aeeca

Browse files
authored
Initial commit
0 parents  commit 77aeeca

20 files changed

+22323
-0
lines changed

.babelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env",
4+
"@babel/preset-typescript"
5+
]
6+
}

.eslintrc

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"node": true,
5+
"es6": true,
6+
"jest": true
7+
},
8+
"parser": "@typescript-eslint/parser",
9+
"parserOptions": {
10+
"jsx": true,
11+
"useJSXTextNode": true
12+
},
13+
"settings": {
14+
"react": {
15+
"version": "detect"
16+
}
17+
},
18+
"plugins": ["prettier", "eslint-plugin-import"],
19+
"extends": [
20+
"plugin:react/recommended",
21+
"plugin:react-hooks/recommended",
22+
"plugin:@typescript-eslint/recommended",
23+
"plugin:prettier/recommended"
24+
],
25+
"rules": {
26+
"react-hooks/rules-of-hooks": "error",
27+
"react-hooks/exhaustive-deps": "error",
28+
"react/react-in-jsx-scope": "off",
29+
"@typescript-eslint/explicit-function-return-type": "off",
30+
"@typescript-eslint/explicit-module-boundary-types": "off",
31+
"@typescript-eslint/ban-ts-comment": "off",
32+
"react/prop-types": "off",
33+
"import/order": [
34+
"error",
35+
{
36+
"groups": ["builtin", "external", "internal"],
37+
"pathGroups": [
38+
{
39+
"pattern": "react",
40+
"group": "external",
41+
"position": "before"
42+
}
43+
],
44+
"pathGroupsExcludedImportTypes": ["react"],
45+
"newlines-between": "always",
46+
"alphabetize": {
47+
"order": "asc",
48+
"caseInsensitive": true
49+
}
50+
}
51+
],
52+
"prettier/prettier": "error"
53+
},
54+
"globals": {
55+
"React": "writable"
56+
}
57+
}

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @digitaljohn

.github/workflows/pr.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [12.x, 14.x, 16.x]
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
24+
- name: npm install, build, and test
25+
run: |
26+
npm ci
27+
npm run build --if-present
28+
npm run lint
29+
npm test
30+
env:
31+
CI: true

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
node-version: [12.x, 14.x, 16.x]
14+
15+
steps:
16+
- uses: actions/checkout@v1
17+
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
23+
- name: npm install, build, and test
24+
run: |
25+
npm ci
26+
npm run build --if-present
27+
npm run lint
28+
npm test
29+
env:
30+
CI: true
31+
32+
publish-npm:
33+
needs: test
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v2
37+
- uses: actions/setup-node@v1
38+
with:
39+
node-version: 16
40+
registry-url: https://registry.npmjs.org/
41+
- run: npm ci
42+
- run: npm publish --access=public
43+
env:
44+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
coverage
3+
*.log
4+
dist
5+
.cache
6+
lib
7+
!src/*
8+
!test/*
9+
.idea
10+
.DS_Store

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.13.1

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
coverage
3+
dist
4+
public
5+
tmp

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# How to contribute
2+
3+
I'm really happy that you're interested in helping out with this little project.
4+
5+
As this is very early days for the project there's not a lot in the way of
6+
resources, but please check out the [documentation](./README.md), and also the
7+
[list of issues](https://github.com/phantomstudios/PACKAGE-NAME/issues).
8+
9+
Please submit an issue if you need help with anything.
10+
11+
We have a [code of conduct](./CODE_OF_CONDUCT.md) so please make sure you follow
12+
it.
13+
14+
## Testing
15+
16+
Testing is performed using `jest` and is tested on Windows, Linux and MacOS with
17+
Node 10 and 12 runtimes. For a PR to be considered all these environments need to
18+
pass. Testing is automated using GitHub Actions CI.
19+
20+
## Submitting changes
21+
22+
Please send a
23+
[GitHub Pull Request to PACKAGE-NAME](https://github.com/phantomstudios/PACKAGE-NAME/pull/new/master)
24+
with a clear list of what you've done (read more about
25+
[pull requests](https://help.github.com/en/articles/about-pull-requests)). When you send a pull
26+
request, please make sure you've covered off all the points in the template.
27+
28+
Make sure you've read about our workflow (below); in essence make sure each Pull
29+
Request is atomic but don't worry too much about the commits themselves as we use
30+
squash-and-merge.
31+
32+
## Our workflow
33+
34+
We use [GitHub flow](https://guides.github.com/introduction/flow/); it's a lot
35+
like git-flow but simpler and more forgiving. We use the `squash and merge`
36+
strategy to merge Pull Requests.
37+
38+
In effect this means:
39+
40+
- Don't worry about individual commits. They will be preserved, but not on the
41+
main `master` branch history, so feel free to commit early and often, using
42+
git as a save mechanism.
43+
- Your Pull Request title and description become very important; they are the
44+
history of the master branch and explain all the changes.
45+
- You ought to be able to find any previous version easily using GitHub tabs, or
46+
[Releases](https://github.com/phantomstudios/PACKAGE-NAME/releases)
47+
48+
Thanks, John Chipps-Harding

0 commit comments

Comments
 (0)