Skip to content

Commit a81a907

Browse files
chore: workflow to check eslint,prettier and ts types
1 parent 60a4b5c commit a81a907

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

.github/workflows/node.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: 16.x
15+
- name: Install dependencies
16+
run: npm ci
17+
- name: Run ESLint
18+
run: npm run eslint
19+
- name: Run Prettier
20+
run: npm run prettier
21+
- name: Check types
22+
run: npm run check-types

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"test": "jest --coverage",
2020
"eslint": "eslint src/* ",
2121
"eslint-fix": "npm run eslint -- --fix",
22-
"compile": "tsc --project tsconfig.esm.json && tsc --project tsconfig.cjs.json"
22+
"compile": "tsc --project tsconfig.esm.json && tsc --project tsconfig.cjs.json",
23+
"check-types": "tsc --project tsconfig.esm.json"
2324
},
2425
"devDependencies": {
2526
"@babel/plugin-transform-modules-commonjs": "^7.17.7",
@@ -53,4 +54,4 @@
5354
"typescript": "^4.6.3",
5455
"vite": "^2.9.1"
5556
}
56-
}
57+
}

0 commit comments

Comments
 (0)