Skip to content

Commit 8d14dc3

Browse files
committed
Initial commit
0 parents  commit 8d14dc3

23 files changed

+20170
-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
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: "\U0001F41B Report a bug"
3+
about: "Is something not working as you expect?"
4+
---
5+
6+
<!-- Please answer the following. Issues that do not will be closed. -->
7+
8+
> Clearly describe the bug
9+
10+
e.g. "Data refuses to load when accessing via https..."
11+
12+
> Which version of PACKAGE-NAME are you using?
13+
14+
e.g. `0.1.0`
15+
16+
> What version of React are you using PACKAGE-NAME within?
17+
18+
e.g. `16.9.0`
19+
20+
> What build/platform are you using?
21+
22+
e.g. "Gatsby"
23+
24+
> What did you expect to happen?
25+
26+
e.g. "Data to load."
27+
28+
> What actually happened (e.g. what warnings or errors did you get)?
29+
30+
e.g. "The request just hung, no response."
31+
32+
<!--
33+
Before posting, please check that the bug hasn't already been:
34+
1. fixed in the next release (https://github.com/phantomstudios/PACKAGE-NAME/blob/master/CHANGELOG.md)
35+
2. discussed previously (https://github.com/phantomstudios/PACKAGE-NAME/search)
36+
-->
37+
38+
<!--
39+
You can help us fix the bug more quickly by:
40+
1. Figuring out what needs to be done and proposing it
41+
2. Submitting a PR with failing tests.
42+
43+
Once the bug has been confirmed, you can help out further by:
44+
1. Writing the code and submitting a PR.
45+
-->
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: "\U0001F4DD Report a docs issue"
3+
about: "Is something wrong, confusing or missing in the docs?"
4+
---
5+
6+
<!-- Please answer the following. Issues that do not will be closed. -->
7+
8+
> Clearly describe the documentation issue
9+
10+
e.g. "The description of the `refresh` function needs expanding..."
11+
12+
> What solution would you like to see?
13+
14+
e.g. "I suggest rewriting it so it covers the following topics in detail..."
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: "\U0001F680 Request a feature"
3+
about: "Do you want to suggest a new feature?"
4+
---
5+
6+
<!-- Please answer the following. Issues that do not will be closed. -->
7+
8+
> What is the problem you're trying to solve?
9+
10+
e.g. "We need the ability to make basic POST requests and send a JSON payload..."
11+
12+
> What solution would you like to see?
13+
14+
e.g. "A new input argument that accepts..."
15+
16+
<!--
17+
Before posting, please check that the feature hasn't already been:
18+
1. added in the next release (https://github.com/phantomstudios/PACKAGE-NAME/blob/master/CHANGELOG.md)
19+
2. discussed previously (https://github.com/phantomstudios/PACKAGE-NAME/search)
20+
-->
21+
22+
<!--
23+
You can help us add the feature more quickly by:
24+
1. Providing as much detail as possible in this issue
25+
26+
Once the feature is approved, you can help out further by:
27+
1. Writing the code and submitting a PR.
28+
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!---
2+
Please read the following. Pull requests that do not adhere to these guidelines will very likely be closed.
3+
4+
Each pull request should, with the exception of minor documentation fixes, be associated with an open issue. If there is an associated open issue, then please continue by answering these two questions: -->
5+
6+
> Which issue, if any, is this issue related to?
7+
8+
e.g. "Closes #000" or "None, as it's a documentation fix."
9+
10+
> Is there anything in the PR that needs further explanation?
11+
12+
e.g. "No, it's self explanatory."

.github/workflows/npmpublish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Node.js Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 12
15+
- run: npm ci
16+
- run: npm test
17+
18+
publish-npm:
19+
needs: build
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: actions/setup-node@v1
24+
with:
25+
node-version: 12
26+
registry-url: https://registry.npmjs.org/
27+
- run: npm ci
28+
- run: npm publish --access=public
29+
env:
30+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/test.yml

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

.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

0 commit comments

Comments
 (0)