Skip to content

Commit f209eb4

Browse files
committed
Init commit
0 parents  commit f209eb4

15 files changed

+790
-0
lines changed

.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
end_of_line = lf
10+
# editorconfig-tools is unable to ignore longs strings or urls
11+
max_line_length = null

.eslintrc.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"extends": ["airbnb-base"],
3+
"plugins": [
4+
"import"
5+
],
6+
"env": {
7+
"node": true,
8+
"browser": true,
9+
"jest": true
10+
},
11+
"rules": {
12+
"indent": ["error", 4, { "SwitchCase": 1 }],
13+
"no-underscore-dangle": [2, {
14+
"allow": ["_id", "_outputSeqNo", "_queueOrderNo", "_skipOutput", "_retryCount", "_crashesCount", "_pageFailed", "_pageCrashed"],
15+
"allowAfterThis": true
16+
}],
17+
"no-use-before-define": 0,
18+
"no-param-reassign": 0,
19+
"consistent-return": 0,
20+
"array-callback-return": 0,
21+
"no-plusplus": 0,
22+
"max-len": ["error", 150],
23+
"func-names": 0,
24+
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
25+
"import/prefer-default-export": 0,
26+
"import/no-unresolved": 0,
27+
"class-methods-use-this": 0,
28+
"strict": 0,
29+
"object-curly-newline": 0,
30+
"no-await-in-loop": 0,
31+
"arrow-body-style": 0,
32+
"import/no-named-as-default": 0,
33+
"no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
34+
"no-prototype-builtins": 1
35+
}
36+
}

.github/workflows/check.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# This workflow runs for every pull request to lint and test the proposed changes.
2+
3+
name: Check
4+
5+
on:
6+
pull_request:
7+
8+
jobs:
9+
# NPM install is done in a separate job and cached to speed up the following jobs.
10+
build_and_test:
11+
name: Build & Test
12+
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [10, 12, 14]
18+
19+
steps:
20+
-
21+
uses: actions/checkout@v2
22+
-
23+
name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
-
28+
name: Cache Node Modules
29+
if: ${{ matrix.node-version == 14 }}
30+
uses: actions/cache@v2
31+
with:
32+
path: |
33+
node_modules
34+
build
35+
key: cache-${{ github.run_id }}-v14
36+
-
37+
name: Install Dependencies
38+
run: npm install
39+
-
40+
name: Run Tests
41+
run: npm test
42+
43+
lint:
44+
name: Lint
45+
needs: [build_and_test]
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
-
50+
uses: actions/checkout@v2
51+
-
52+
name: Use Node.js 14
53+
uses: actions/setup-node@v1
54+
with:
55+
node-version: 14
56+
-
57+
name: Load Cache
58+
uses: actions/cache@v2
59+
with:
60+
path: |
61+
node_modules
62+
build
63+
key: cache-${{ github.run_id }}-v14
64+
-
65+
run: npm run lint

.github/workflows/release.yml

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Check & Release
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
jobs:
8+
# NPM install is done in a separate job and cached to speed up the following jobs.
9+
build_and_test:
10+
name: Build & Test
11+
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [10, 12, 14]
17+
18+
steps:
19+
-
20+
uses: actions/checkout@v2
21+
-
22+
name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
-
27+
name: Cache Node Modules
28+
if: ${{ matrix.node-version == 14 }}
29+
uses: actions/cache@v2
30+
with:
31+
path: |
32+
node_modules
33+
build
34+
key: cache-${{ github.run_id }}-v14
35+
-
36+
name: Install Dependencies
37+
run: npm install
38+
-
39+
name: Run Tests
40+
run: npm test
41+
42+
lint:
43+
name: Lint
44+
needs: [build_and_test]
45+
runs-on: ubuntu-latest
46+
47+
steps:
48+
-
49+
uses: actions/checkout@v2
50+
-
51+
name: Use Node.js 14
52+
uses: actions/setup-node@v1
53+
with:
54+
node-version: 14
55+
-
56+
name: Load Cache
57+
uses: actions/cache@v2
58+
with:
59+
path: |
60+
node_modules
61+
build
62+
key: cache-${{ github.run_id }}-v14
63+
-
64+
run: npm run lint
65+
66+
deploy:
67+
name: Publish to NPM
68+
needs: [lint]
69+
runs-on: ubuntu-latest
70+
steps:
71+
-
72+
uses: actions/checkout@v2
73+
-
74+
uses: actions/setup-node@v1
75+
with:
76+
node-version: 14
77+
registry-url: https://registry.npmjs.org/
78+
-
79+
name: Load Cache
80+
uses: actions/cache@v2
81+
with:
82+
path: |
83+
node_modules
84+
build
85+
key: cache-${{ github.run_id }}-v14
86+
-
87+
name: Publish to NPM
88+
run: NODE_AUTH_TOKEN=${{secrets.NPM_TOKEN}} npm publish --tag ${{ env.RELEASE_TAG }}

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
build
2+
dist
3+
node_modules
4+
*.log
5+
*.pid
6+
*.seed
7+
.DS_Store
8+
lib
9+
coverage
10+
.nyc_output
11+
logs
12+
pids
13+
.idea
14+
yarn.lock
15+
package-lock.json

0 commit comments

Comments
 (0)