Skip to content

Commit 4d3f7e9

Browse files
authored
Upgraded prettier and added to CI (#84)
1 parent 7a00bd2 commit 4d3f7e9

File tree

8 files changed

+136
-106
lines changed

8 files changed

+136
-106
lines changed

.github/workflows/lint.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Lint
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [12.x]
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: install dependencies
23+
run: yarn install || echo "ignore failure"
24+
- name: Prettier
25+
run: yarn prettier:check
26+
env:
27+
CI: true

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"prepare": "yarn build && yarn test",
1212
"build": "yarn tsc",
1313
"setup": "./pbjs.sh && ./integration/pbjs.sh && ./integration/update-bins.sh && ./integration/codegen.sh",
14-
"test": "yarn jest -c jest.config.js"
14+
"test": "yarn jest -c jest.config.js",
15+
"prettier": "prettier --write {src,tests}/**/*.ts",
16+
"prettier:check": "prettier --list-different {src,tests}/**/*.ts"
1517
},
1618
"keywords": [],
1719
"author": "",
@@ -25,7 +27,7 @@
2527
"@types/node": "^10.7.0",
2628
"grpc": "^1.24.2",
2729
"jest": "^25.1.0",
28-
"prettier": "^1.16.4",
30+
"prettier": "^2.0.5",
2931
"reflect-metadata": "^0.1.13",
3032
"rxjs": "^6.5.5",
3133
"ts-jest": "^25.2.1",

0 commit comments

Comments
 (0)