Skip to content

Commit d6e398c

Browse files
committed
Initial commit
0 parents  commit d6e398c

20 files changed

+4421
-0
lines changed

.eslintrc.json

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"plugins": ["jest", "@typescript-eslint"],
3+
"extends": ["plugin:github/recommended"],
4+
"parser": "@typescript-eslint/parser",
5+
"parserOptions": {
6+
"ecmaVersion": 9,
7+
"sourceType": "module",
8+
"project": "./tsconfig.json"
9+
},
10+
"rules": {
11+
"eslint-comments/no-use": "off",
12+
"import/no-namespace": "off",
13+
"no-unused-vars": "off",
14+
"@typescript-eslint/no-unused-vars": "error",
15+
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
16+
"@typescript-eslint/no-require-imports": "error",
17+
"@typescript-eslint/array-type": "error",
18+
"@typescript-eslint/await-thenable": "error",
19+
"@typescript-eslint/ban-ts-comment": "error",
20+
"camelcase": "off",
21+
"@typescript-eslint/consistent-type-assertions": "error",
22+
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
23+
"@typescript-eslint/func-call-spacing": ["error", "never"],
24+
"@typescript-eslint/no-array-constructor": "error",
25+
"@typescript-eslint/no-empty-interface": "error",
26+
"@typescript-eslint/no-explicit-any": "error",
27+
"@typescript-eslint/no-extraneous-class": "error",
28+
"@typescript-eslint/no-for-in-array": "error",
29+
"@typescript-eslint/no-inferrable-types": "error",
30+
"@typescript-eslint/no-misused-new": "error",
31+
"@typescript-eslint/no-namespace": "error",
32+
"@typescript-eslint/no-non-null-assertion": "warn",
33+
"@typescript-eslint/no-unnecessary-qualifier": "error",
34+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
35+
"@typescript-eslint/no-useless-constructor": "error",
36+
"@typescript-eslint/no-var-requires": "error",
37+
"@typescript-eslint/prefer-for-of": "warn",
38+
"@typescript-eslint/prefer-function-type": "warn",
39+
"@typescript-eslint/prefer-includes": "error",
40+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
41+
"@typescript-eslint/promise-function-async": "error",
42+
"@typescript-eslint/require-array-sort-compare": "error",
43+
"@typescript-eslint/restrict-plus-operands": "error",
44+
"semi": "off",
45+
"@typescript-eslint/semi": ["error", "never"],
46+
"@typescript-eslint/type-annotation-spacing": "error",
47+
"@typescript-eslint/unbound-method": "error"
48+
},
49+
"env": {
50+
"node": true,
51+
"es6": true,
52+
"jest/globals": true
53+
},
54+
"ignorePatterns": [
55+
"dist/",
56+
"lib/",
57+
"node_modules/",
58+
"jest.config.js"
59+
]
60+
}

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/** -diff linguist-generated=true

.github/actions/release/action.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: release
2+
description: git push a release tag
3+
inputs:
4+
tag-name:
5+
required: true
6+
description: tag name to push
7+
runs:
8+
using: composite
9+
steps:
10+
- id: run
11+
shell: bash
12+
run: ${{ github.action_path }}/run.sh
13+
env:
14+
TAG_NAME: ${{ inputs.tag-name }}

.github/actions/release/run.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -o pipefail
3+
set -eux
4+
5+
git config user.name 'github-actions[bot]'
6+
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
7+
8+
sed -i -e 's|^/dist.*||g' .gitignore
9+
git add .gitignore
10+
git add dist
11+
12+
git status
13+
git commit -m "Release $TAG_NAME"
14+
git tag -f "$TAG_NAME"
15+
git push origin -f "$TAG_NAME"

.github/renovate.json5

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": [
3+
"config:base"
4+
],
5+
"labels": [
6+
"r:{{depName}}",
7+
"r:{{depName}}/{{newVersion}}"
8+
],
9+
"packageRules": [
10+
{
11+
"matchUpdateTypes": ["minor", "patch", "pin"],
12+
"automerge": true
13+
}
14+
]
15+
}

.github/workflows/release.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
paths:
7+
- .github/workflows/release.yaml
8+
push:
9+
branches: [main]
10+
11+
jobs:
12+
tag:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- id: yarn-cache-dir
17+
run: echo "::set-output name=dir::$(yarn cache dir)"
18+
- uses: actions/cache@v2
19+
with:
20+
path: ${{ steps.yarn-cache-dir.outputs.dir }}
21+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
22+
restore-keys: |
23+
${{ runner.os }}-yarn-
24+
- run: yarn
25+
- run: yarn build
26+
- run: yarn package
27+
- if: github.event_name == 'push'
28+
uses: ./.github/actions/release
29+
with:
30+
tag-name: v1

.github/workflows/ts.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: ts
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- src/**
8+
- tests/**
9+
- '*.json'
10+
- .github/workflows/ts.yaml
11+
pull_request:
12+
branches: [main]
13+
paths:
14+
- src/**
15+
- tests/**
16+
- '*.json'
17+
- .github/workflows/ts.yaml
18+
19+
jobs:
20+
ts:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- id: yarn-cache-dir
25+
run: echo "::set-output name=dir::$(yarn cache dir)"
26+
- uses: actions/cache@v2
27+
with:
28+
path: ${{ steps.yarn-cache-dir.outputs.dir }}
29+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-yarn-
32+
- run: yarn
33+
- run: yarn lint
34+
- run: yarn format-check
35+
- run: yarn test
36+
- run: yarn build
37+
- run: yarn package
38+
39+
- name: e2e-test
40+
uses: ./
41+
with:
42+
name: foo

.gitignore

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Dependency directory
2+
node_modules
3+
4+
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
lerna-debug.log*
12+
13+
# Diagnostic reports (https://nodejs.org/api/report.html)
14+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
15+
16+
# Runtime data
17+
pids
18+
*.pid
19+
*.seed
20+
*.pid.lock
21+
22+
# Directory for instrumented libs generated by jscoverage/JSCover
23+
lib-cov
24+
25+
# Coverage directory used by tools like istanbul
26+
coverage
27+
*.lcov
28+
29+
# nyc test coverage
30+
.nyc_output
31+
32+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
33+
.grunt
34+
35+
# Bower dependency directory (https://bower.io/)
36+
bower_components
37+
38+
# node-waf configuration
39+
.lock-wscript
40+
41+
# Compiled binary addons (https://nodejs.org/api/addons.html)
42+
build/Release
43+
44+
# Dependency directories
45+
jspm_packages/
46+
47+
# TypeScript v1 declaration files
48+
typings/
49+
50+
# TypeScript cache
51+
*.tsbuildinfo
52+
53+
# Optional npm cache directory
54+
.npm
55+
56+
# Optional eslint cache
57+
.eslintcache
58+
59+
# Optional REPL history
60+
.node_repl_history
61+
62+
# Output of 'npm pack'
63+
*.tgz
64+
65+
# Yarn Integrity file
66+
.yarn-integrity
67+
68+
# dotenv environment variables file
69+
.env
70+
.env.test
71+
72+
# parcel-bundler cache (https://parceljs.org/)
73+
.cache
74+
75+
# next.js build output
76+
.next
77+
78+
# nuxt.js build output
79+
.nuxt
80+
81+
# vuepress build output
82+
.vuepress/dist
83+
84+
# Serverless directories
85+
.serverless/
86+
87+
# FuseBox cache
88+
.fusebox/
89+
90+
# DynamoDB Local files
91+
.dynamodb/
92+
93+
# OS metadata
94+
.DS_Store
95+
Thumbs.db
96+
97+
# Ignore built ts files
98+
lib/
99+
100+
# Only release tag contains dist directory
101+
/dist

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist/
2+
lib/
3+
node_modules/

.prettierrc.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 120,
3+
"semi": false,
4+
"singleQuote": true
5+
}

0 commit comments

Comments
 (0)