Skip to content

Commit 0cc9b19

Browse files
committed
feat: add Prettier for code formatting and update CI workflow to include style checks
1 parent 21921e8 commit 0cc9b19

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ jobs:
2323

2424
- name: Run tests
2525
run: npm run test -- --coverage
26+
27+
- name: Style
28+
run: npm run format:check

package-lock.json

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

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"build": "npx tsc",
1111
"start": "node dist/main.js",
1212
"dev": "npx tsc && node dist/main.js",
13-
"test": "vitest --run"
13+
"test": "vitest --run",
14+
"format:write": "prettier --write \"src/**/*.{js,ts,json,css,md}\"",
15+
"format:check": "prettier --check \"src/**/*.{js,ts,json,css,md}\""
1416
},
1517
"devDependencies": {
1618
"@types/cors": "^2.8.17",
@@ -19,6 +21,7 @@
1921
"@vitest/coverage-v8": "^4.0.8",
2022
"drizzle-kit": "^0.28.1",
2123
"globals": "^15.12.0",
24+
"prettier": "3.6.2",
2225
"tsx": "^4.19.2",
2326
"typescript": "^5.6.3",
2427
"vitest": "^4.0.8"
@@ -38,4 +41,4 @@
3841
"semi": true,
3942
"singleQuote": false
4043
}
41-
}
44+
}

0 commit comments

Comments
 (0)