commit 449d9a6ae7315be53a199b63f3ea42b4b7f8be7a
parent 32607944d5eec847c4bdd9a59f5ebd1cd066f04b
Author: Henry Unite <unitehenry@gmail.com>
Date: Mon, 11 May 2026 04:01:04 +0000
ci: check format
Diffstat:
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
@@ -21,7 +21,7 @@ jobs:
run: ./scripts/lint
- name: Check formatting
- run: npx prettier --check "**/*.{ts,tsx}"
+ run: ./scripts/format check
- name: Run typecheck
run: ./scripts/typecheck
diff --git a/app/package.json b/app/package.json
@@ -8,6 +8,7 @@
"build": "tsc -b && vite build",
"lint": "eslint .",
"format": "prettier --write \"**/*.{ts,tsx}\"",
+ "format-check": "prettier --check \"**/*.{ts,tsx}\"",
"typecheck": "tsc --noEmit",
"preview": "vite preview"
},
diff --git a/scripts/format b/scripts/format
@@ -3,4 +3,8 @@ scripts/version
npm --prefix app install
-npm --prefix app run format
-\ No newline at end of file
+if [[ $1 == "check" ]]; then
+ npm --prefix app run format-check
+else
+ npm --prefix app run format
+fi