Skip to content

Commit 10f0363

Browse files
committed
Add formatting workflow
1 parent 71cc647 commit 10f0363

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/formatting.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
pull_request:
7+
8+
jobs:
9+
prettier:
10+
name: Verify formatting
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v2
16+
17+
- name: Set up Node
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: '14.x'
21+
22+
# We do it this way so that we can just use the existing package.json script
23+
# to make future changes to the formatting script easier
24+
- name: Set up Prettier
25+
run: npm i -g prettier
26+
27+
- name: Check formatting
28+
# `--check` will override the `--write` in the script
29+
run: npm run format --check

0 commit comments

Comments
 (0)