Skip to content

Commit 0ba7470

Browse files
authored
refactor: migrate to typescript and promise (jaredwray#203)
1 parent e99cbb9 commit 0ba7470

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+6293
-10553
lines changed

Diff for: .coveralls.yml

-1
This file was deleted.

Diff for: .editorconfig

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
7+
[*.{js,jsx,ts,tsx}]
8+
indent_style = space
9+
indent_size = 2
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
end_of_line = lf
14+
# editorconfig-tools is unable to ignore longs strings or urls
15+
# max_line_length = null
16+
17+
[*.{yml,yaml,json}]
18+
indent_style = space
19+
indent_size = 2
20+
21+
[Makefile]
22+
indent_style = tab

Diff for: .eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
coverage
3+
.idea
4+
.eslintcache

Diff for: .eslintrc

-61
This file was deleted.

Diff for: .eslintrc.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
plugins: ['@typescript-eslint/eslint-plugin', 'prettier'],
4+
extends: [
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:prettier/recommended',
7+
],
8+
root: true,
9+
env: {
10+
node: true,
11+
},
12+
rules: {
13+
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '^_' }],
14+
},
15+
};

Diff for: .github/renovate.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["config:base"]
4+
}

Diff for: .github/workflows/test.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
on:
2+
- push
3+
- pull_request
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
13+
- name: Install Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: lts/fermium
17+
18+
- uses: pnpm/[email protected]
19+
name: Install pnpm
20+
id: pnpm-install
21+
with:
22+
version: 7
23+
run_install: false
24+
25+
- name: Get pnpm store directory
26+
id: pnpm-cache
27+
run: |
28+
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
29+
30+
- uses: actions/cache@v3
31+
name: Setup pnpm cache
32+
with:
33+
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
34+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
35+
restore-keys: |
36+
${{ runner.os }}-pnpm-store-
37+
38+
- name: Install dependencies
39+
run: pnpm install
40+
41+
- name: check
42+
run: pnpm check
43+
44+
- name: build
45+
run: pnpm build
46+
47+
- name: test
48+
run: pnpm test -- --coverage
49+
50+
- name: Codecov
51+
uses: codecov/codecov-action@v3
52+
with:
53+
files: ./coverage/coverage-final.json
54+
token: ${{ secrets.CODECOV_TOKEN }}

Diff for: .gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ coverage
44
.idea
55
*.iml
66
out
7-
.vscode
7+
.vscode
8+
.eslintcache
9+
dist

Diff for: .husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

Diff for: .husky/pre-commit

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
pnpx lint-staged
5+
npx lint-staged

Diff for: .nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/fermium

Diff for: .nycrc.json

-20
This file was deleted.

Diff for: .prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
coverage
3+
.idea
4+
.eslintcache

Diff for: .prettierrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all"
4+
}

Diff for: .release-it.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"npm": {
3+
"publish": false
4+
},
5+
"git": {
6+
"commitMessage": "chore(release): ${version}",
7+
"requireBranch": "master",
8+
"requireCommits": true
9+
},
10+
"github": {
11+
"release": true,
12+
"draft": true
13+
},
14+
"plugins": {
15+
"@release-it/conventional-changelog": {
16+
"preset": "angular"
17+
}
18+
}
19+
}

Diff for: .travis.yml

-10
This file was deleted.

0 commit comments

Comments
 (0)