add prettier formatting check to CI workflow and npm scripts

- Add prettier job to GitHub Actions workflow to enforce code formatting
- Add format:check script to package.json for checking formatting
- Include failure message when prettier check fails in CI
This commit is contained in:
frauniki
2025-06-15 17:28:40 +09:00
parent 15ac076aed
commit e4f7e8dc80
2 changed files with 19 additions and 0 deletions
+18
View File
@@ -51,3 +51,21 @@ jobs:
run: npm run build
- name: Run E2E Tests
run: npm run test:e2e
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run Prettier
run: npm run format:check
- name: Prettier Output
if: failure()
run: |
echo "Prettier check failed. Please run 'npm run format' to fix formatting issues."
exit 1