Skip to content

Commit 1837900

Browse files
fix: adding prettier config (#198)
1 parent e07fda7 commit 1837900

File tree

5 files changed

+90
-1
lines changed

5 files changed

+90
-1
lines changed

.github/workflows/check-format.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [preview, master]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
format:
13+
name: Prettier
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: pnpm/action-setup@v4
19+
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
cache: pnpm
24+
25+
- run: pnpm install --frozen-lockfile
26+
27+
- run: pnpm check:format
28+
29+
build:
30+
name: Build
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- uses: pnpm/action-setup@v4
36+
37+
- uses: actions/setup-node@v4
38+
with:
39+
node-version: 20
40+
cache: pnpm
41+
42+
- run: pnpm install --frozen-lockfile
43+
44+
- run: pnpm build

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
docs/.vitepress/cache
3+
docs/.vitepress/dist
4+
pnpm-lock.yaml

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": true,
3+
"singleQuote": false,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 120
7+
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"scripts": {
77
"dev": "vitepress dev docs",
88
"build": "vitepress build docs",
9-
"preview": "vitepress preview docs"
9+
"preview": "vitepress preview docs",
10+
"fix:format": "prettier --write .",
11+
"check:format": "prettier --check ."
1012
},
1113
"keywords": [
1214
"plane",
@@ -20,6 +22,7 @@
2022
"autoprefixer": "^10.4.23",
2123
"mermaid": "^11.12.2",
2224
"postcss": "^8.5.6",
25+
"prettier": "^3.8.1",
2326
"tailwindcss": "^4.1.18",
2427
"vitepress": "^1.6.4",
2528
"vitepress-plugin-mermaid": "^2.0.17",

pnpm-lock.yaml

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)