Skip to content

Commit 5341e83

Browse files
committed
Added prettier github workflow.
1 parent d62eef3 commit 5341e83

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/workflows/prettier.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Prettier
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
prettier:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Setup node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: latest
23+
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Install dependencies
28+
run: |
29+
yarn install --immutable --immutable-cache --check-cache
30+
31+
- name: Check
32+
run: |
33+
yarn run prettier:check

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@
333333
"scripts": {
334334
"compile": "tsc -p ./",
335335
"postinstall": "husky install",
336+
"prettier:check": "prettier --check **.md **.ts **.yml **.json",
336337
"vscode:prepublish": "npm run compile",
337338
"watch": "tsc -watch -p ./"
338339
},

0 commit comments

Comments
 (0)