Skip to content

Commit 99b712a

Browse files
committed
Add CI of Prettier
1 parent 0a52046 commit 99b712a

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,27 @@ on:
77
pull_request:
88

99
jobs:
10+
prettier:
11+
name: Prettier
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: latest
21+
cache: npm
22+
23+
- name: Install Packages
24+
run: npm ci
25+
shell: bash
26+
27+
- name: Prettier
28+
run: npm run format:check
29+
shell: bash
30+
1031
build:
1132
name: Build
1233
runs-on: ubuntu-latest

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"swizzle": "docusaurus swizzle",
1010
"deploy": "docusaurus deploy",
1111
"serve": "docusaurus serve",
12-
"format": "prettier --write ."
12+
"format": "prettier --write .",
13+
"format:check": "prettier --check ."
1314
},
1415
"dependencies": {
1516
"@docusaurus/core": "^2.4.1",

0 commit comments

Comments
 (0)