From f42177a912389eab57dc4a39857748e54ae3bc33 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Sun, 9 Feb 2025 11:46:33 -0500 Subject: [PATCH] ci: Pin Prettier to a specific version for docs formatting (#24531) This PR pins Prettier to a specific version when we run the docs formatting check. This should prevent drift when new Prettier versions are released that may impact the formatting. Release Notes: - N/A --- .github/workflows/docs.yml | 6 ++++-- docs/theme/css/variables.css | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0870a55e60057cb8440c7d911ab78aef18c04045..383ba93a8fba8173c0e8025b5730c6496fc49c66 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,11 +24,13 @@ jobs: - name: Prettier Check on /docs working-directory: ./docs run: | - pnpm dlx prettier . --check || { + pnpm dlx prettier@${PRETTIER_VERSION} . --check || { echo "To fix, run from the root of the zed repo:" - echo " cd docs && pnpm dlx prettier . --write && cd .." + echo " cd docs && pnpm dlx prettier@${PRETTIER_VERSION} . --write && cd .." false } + env: + PRETTIER_VERSION: 3.5.0 - name: Check for Typos with Typos-CLI uses: crate-ci/typos@8e6a4285bcbde632c5d79900a7779746e8b7ea3f # v1.24.6 diff --git a/docs/theme/css/variables.css b/docs/theme/css/variables.css index 55ae4a427da269620cb9b15d10ff33d0f4ace958..6604545c45616b012fd569517ab41ca27e834800 100644 --- a/docs/theme/css/variables.css +++ b/docs/theme/css/variables.css @@ -13,8 +13,9 @@ --menu-bar-height: 64px; --font: "IA Writer Quattro S", sans-serif; --title-font: "Lora", "Helvetica Neue", Helvetica, Arial, sans-serif; - --mono-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, - Liberation Mono, Courier New, monospace; + --mono-font: + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, + Courier New, monospace; --code-font-size: 0.875em /* please adjust the ace font size accordingly in editor.js */;