Skip to content

Commit

Permalink
Use PRETTIER_AT_VERS
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Dec 13, 2024
1 parent f7ff285 commit c7c3569
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,11 @@ jobs:
cache: npm
cache-dependency-path: tmp/package-ci.json

- run: npm install prettier@$(npm pkg get devDependencies.prettier | tr -d '^\"') --no-save
- name: Install package(s)
run: |
PRETTIER_AT_VERS=@$(npm pkg get devDependencies.prettier | tr -d '^"')
echo "PRETTIER_AT_VERS=$PRETTIER_AT_VERS" >> $GITHUB_ENV
npm install prettier$PRETTIER_AT_VERS --no-save
npx prettier --version
- run: npm run check:format
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"__check:links": "make --keep-going check-links",
"_build": "npm run _hugo -- -e dev --buildDrafts --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"",
"__check:format": "npx prettier@$(npm pkg get devDependencies.prettier | tr -d '^\"')",
"__check:format": "npx prettier${PRETTIER_AT_VERS}",
"_check:format:any": "npm run __check:format -- --check --ignore-path ''",
"_check:format:ja+zh": "npm run _check:format:nowrap -- content/ja content/zh",
"_check:format:nowrap": "npm run _check:format:any -- --prose-wrap preserve",
Expand Down Expand Up @@ -121,7 +121,7 @@
"markdown-link-check": "^3.13.6",
"markdownlint": "^0.36.1",
"postcss-cli": "^11.0.0",
"prettier": "^3.4.2",
"prettier": "3.4.2",
"require-dir": "^1.2.0",
"textlint": "^14.4.0",
"textlint-filter-rule-allowlist": "^4.0.0",
Expand Down

0 comments on commit c7c3569

Please sign in to comment.