Skip to content

Commit 48b2fe8

Browse files
committed
Convert to TypeScript
1 parent 14bd30b commit 48b2fe8

33 files changed

+10571
-16677
lines changed

.babelrc.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ module.exports = {
1212
}
1313
],
1414
'@babel/preset-react',
15-
'@babel/preset-flow'
15+
'@babel/preset-typescript'
1616
],
1717
plugins: [
18-
'@babel/plugin-transform-flow-strip-types',
1918
'@babel/plugin-syntax-dynamic-import',
2019
'@babel/plugin-syntax-import-meta',
2120
['@babel/plugin-proposal-class-properties', { loose }],
@@ -29,6 +28,6 @@ module.exports = {
2928
'@babel/plugin-proposal-function-sent',
3029
'@babel/plugin-proposal-export-namespace-from',
3130
'@babel/plugin-proposal-numeric-separator',
32-
'@babel/plugin-proposal-throw-expressions',
31+
'@babel/plugin-proposal-throw-expressions'
3332
].filter(Boolean)
3433
}

.eslintignore

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

.eslintrc

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

.flowconfig

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

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
lint:
7+
name: Lint
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Use Node.js ${{ matrix.node_version }}
13+
uses: actions/setup-node@v2
14+
with:
15+
node-version: "22"
16+
- name: Prepare env
17+
run: yarn install --ignore-scripts --frozen-lockfile
18+
- name: Run linter
19+
run: yarn start lint
20+
21+
prettier:
22+
name: Prettier Check
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Use Node.js ${{ matrix.node_version }}
28+
uses: actions/setup-node@v2
29+
with:
30+
node-version: "22"
31+
- name: Prepare env
32+
run: yarn install --ignore-scripts --frozen-lockfile
33+
- name: Run prettier
34+
run: yarn start prettier
35+
36+
test:
37+
name: Unit Tests
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- uses: actions/checkout@v2
42+
- name: Use Node.js ${{ matrix.node_version }}
43+
uses: actions/setup-node@v2
44+
with:
45+
node-version: "22"
46+
- name: Prepare env
47+
run: yarn install --ignore-scripts --frozen-lockfile
48+
- name: Run unit tests
49+
run: yarn start test
50+
- name: Run code coverage
51+
uses: codecov/[email protected]

.github/workflows/lock.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Lock Threads"
2+
3+
on:
4+
schedule:
5+
- cron: "0 * * * *"
6+
workflow_dispatch:
7+
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
12+
concurrency:
13+
group: lock
14+
15+
jobs:
16+
action:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: dessant/lock-threads@v3
20+
with:
21+
issue-inactive-days: "365"
22+
issue-lock-reason: "resolved"
23+
pr-inactive-days: "365"
24+
pr-lock-reason: "resolved"

.gitignore

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
.vscode
2-
*.iml
3-
.nyc_output
4-
coverage
5-
flow-coverage
61
node_modules
72
dist
8-
lib
9-
es
10-
npm-debug.log
113
.DS_Store
12-
.idea
13-
yarn.lock
4+
npm-debug.log*
5+
coverage

eslint.config.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import tsParser from '@typescript-eslint/parser'
2+
3+
export default [
4+
{
5+
ignores: ['node_modules/**', 'coverage/**', 'dist/**']
6+
},
7+
{
8+
files: ['**/*.{js,jsx}'],
9+
languageOptions: {
10+
ecmaVersion: 'latest',
11+
sourceType: 'module',
12+
parserOptions: {
13+
ecmaFeatures: {
14+
jsx: true
15+
}
16+
}
17+
},
18+
rules: {
19+
'no-unused-vars': 'off'
20+
}
21+
},
22+
{
23+
files: ['**/*.{ts,tsx}'],
24+
languageOptions: {
25+
parser: tsParser,
26+
ecmaVersion: 'latest',
27+
sourceType: 'module',
28+
parserOptions: {
29+
ecmaFeatures: {
30+
jsx: true
31+
}
32+
}
33+
},
34+
rules: {
35+
'no-unused-vars': 'off'
36+
}
37+
}
38+
]

0 commit comments

Comments
 (0)