ci: 🎨 run prettier check for all PRs

This commit is contained in:
Nate
2025-05-15 15:38:13 -07:00
parent ea1cd3afaf
commit e85709436f
2 changed files with 23 additions and 2 deletions

View File

@@ -30,6 +30,24 @@ jobs:
if: steps.root-cache.outputs.cache-hit != 'true'
run: npm ci
prettier-check:
needs: install-root
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }}
- name: Check code formatting with Prettier
run: npx prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-path .gitignore
install-config-yaml:
needs: install-root
runs-on: ubuntu-latest
@@ -859,6 +877,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- install-root
- prettier-check
- install-core
- core-checks
- install-gui
@@ -881,4 +900,4 @@ jobs:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
jobs: ${{ toJSON(needs) }}

View File

@@ -4,7 +4,9 @@
"tsc:watch:gui": "tsc --project gui/tsconfig.json --watch --noEmit --pretty",
"tsc:watch:vscode": "tsc --project extensions/vscode/tsconfig.json --watch --noEmit --pretty",
"tsc:watch:core": "tsc --project core/tsconfig.json --watch --noEmit --pretty",
"tsc:watch:binary": "tsc --project binary/tsconfig.json --watch --noEmit --pretty"
"tsc:watch:binary": "tsc --project binary/tsconfig.json --watch --noEmit --pretty",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,md}\" --ignore-path .gitignore",
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,css,md}\" --ignore-path .gitignore"
},
"devDependencies": {
"@typescript-eslint/parser": "^7.8.0",