mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: use correct prettier version in ci (#8321)
Install prettier in package.json + yarn.lock. Global install was using incorrect version
This commit is contained in:
@@ -203,7 +203,16 @@ jobs:
|
||||
go-version: 1.20.5
|
||||
|
||||
- name: Install prettier
|
||||
run: npm install -g prettier
|
||||
# We only need prettier for fmt, so do not install all dependencies.
|
||||
# There is no way to install a single package with yarn, so we have to
|
||||
# make a new package.json with only prettier listed as a dependency.
|
||||
# Then running `yarn` will only install prettier.
|
||||
run: |
|
||||
cd site
|
||||
mv package.json package.json.bak
|
||||
jq '{dependencies: {prettier: .devDependencies.prettier}}' < package.json.bak > package.json
|
||||
yarn --frozen-lockfile
|
||||
mv package.json.bak package.json
|
||||
|
||||
- name: Install shfmt
|
||||
run: go install mvdan.cc/sh/v3/cmd/shfmt@v3.5.0
|
||||
|
||||
Reference in New Issue
Block a user