chore: pin prettier to 3.9.5 and run format check after install (#1716)
The "Check formatting" step in main.yml ran `npx prettier --check .` before `npm install`, so npx fetched the LATEST prettier rather than the version pinned in package-lock.json. This made the format check non-deterministic and red on open PRs whenever the latest published prettier differed from the pinned one. - Pin prettier to exact 3.9.5 in devDependencies and update the lockfile - Reformat the repo with the pinned prettier (expected source churn) - Move the format check after `npm install --no-package-lock` and run it via `npm run prettier-check` so CI uses the locally-installed pinned prettier Claude-Session: https://claude.ai/code/session_01HiccCEh9mwCfVzE8qYcop1 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
638f2bfa5b
commit
fd2def684f
1 changed files with 16 additions and 28 deletions
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
|
|
@ -14,9 +14,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Check formatting
|
||||
run: npx prettier --check .
|
||||
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: package.json
|
||||
|
|
@ -26,6 +23,9 @@ jobs:
|
|||
# - run: npm ci
|
||||
- run: npm install --no-package-lock
|
||||
|
||||
- name: Check formatting
|
||||
run: npm run prettier-check
|
||||
|
||||
- name: Check version consistency
|
||||
run: npm run check-version
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue