Skip to content

Commit dcf214a

Browse files
committed
convert to typescript
1 parent c58e31e commit dcf214a

Some content is hidden

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

56 files changed

+22911
-9635
lines changed

.babelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"loose": true
2626
}
2727
],
28+
"@babel/preset-typescript",
2829
"@babel/preset-react"
2930
]
3031
}

.codesandbox/ci.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
node_modules/
2+
dist/
3+
lib/
4+
coverage/
5+
build/
6+
docs/
7+
public/
8+
*.min.js
9+
*.bundle.js
10+
.vscode/
11+
.idea/
12+

.eslintrc.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 2020,
6+
"sourceType": "module",
7+
"ecmaFeatures": {
8+
"jsx": true
9+
}
10+
},
11+
"plugins": [
12+
"@typescript-eslint",
13+
"react",
14+
"react-hooks",
15+
"jsx-a11y",
16+
"prettier"
17+
],
18+
"extends": [
19+
"eslint:recommended",
20+
"plugin:react/recommended",
21+
"plugin:@typescript-eslint/recommended",
22+
"plugin:jsx-a11y/recommended",
23+
"plugin:react-hooks/recommended",
24+
"prettier"
25+
],
26+
"rules": {
27+
"prettier/prettier": "error",
28+
"react/prop-types": "off",
29+
"@typescript-eslint/explicit-module-boundary-types": "off"
30+
},
31+
"settings": {
32+
"react": {
33+
"version": "detect"
34+
}
35+
}
36+
}
37+

.github/workflows/npm-publish.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@ jobs:
1616
- uses: actions/setup-node@v2
1717
with:
1818
node-version: 18
19-
- run: npm ci
20-
- run: npm test --maxWorkers=2 --maxConcurrent=2
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v2
21+
with:
22+
version: 10
23+
- run: pnpm install --frozen-lockfile
24+
- run: pnpm ts-check
25+
- run: pnpm lint
26+
- run: pnpm test --maxWorkers=2 --maxConcurrent=2
2127

2228
publish-npm:
2329
needs: build
@@ -28,8 +34,11 @@ jobs:
2834
with:
2935
node-version: 18
3036
registry-url: https://registry.npmjs.org/
31-
- run: npm ci
32-
- run: npm test --maxWorkers=2 --maxConcurrent=2
37+
- name: Setup pnpm
38+
uses: pnpm/action-setup@v2
39+
with:
40+
version: 10
41+
- run: pnpm install --frozen-lockfile
3342
- run: npm publish
3443
env:
3544
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.github/workflows/on-pull-request.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ jobs:
1515
- uses: actions/checkout@v2
1616
- uses: actions/setup-node@v2
1717
with:
18-
node-version: 16
19-
- run: npm ci
20-
- run: npm test --maxWorkers=2 --maxConcurrent=2
18+
node-version: 23
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v2
21+
with:
22+
version: 10
23+
- run: pnpm install --frozen-lockfile
24+
- run: pnpm ts-check
25+
- run: pnpm lint
26+
- run: pnpm test --maxWorkers=2 --maxConcurrent=2

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules/
2+
dist/
3+
lib/
4+
coverage/
5+
build/
6+
public/
7+
*.min.js
8+
*.bundle.js
9+
.vscode/
10+
.idea/
11+
coverage/
12+
coverage/**/*
13+
coverage/*
14+

.prettierrc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"singleQuote": true,
3-
"arrowParens": "always",
42
"printWidth": 100,
5-
"jsxBracketSameLine": true,
3+
"tabWidth": 2,
64
"useTabs": false,
7-
"tabWidth": 2
5+
"semi": true,
6+
"singleQuote": true,
7+
"trailingComma": "all",
8+
"arrowParens": "avoid",
9+
"endOfLine": "lf"
810
}
11+

.travis.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)