Skip to content

Commit

Permalink
Merge pull request #122 from systemphil/fix/formatter2
Browse files Browse the repository at this point in the history
fix formatter2
  • Loading branch information
Firgrep authored Dec 7, 2024
2 parents 99b9269 + 3bd5169 commit 6547846
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/verify_formatting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
with:
node-version: 20

- name: Get Prettier version from package-lock.json
run: |
PRETTIER_VERSION=$(grep -m 1 'prettier' package-lock.json | cut -d '"' -f 4 | cut -c 2-)
echo $PRETTIER_VERSION
# This installs all dependencies, but if we use "npm install -g prettier",
# then prettier won't pick up the project's .prettierrc file.
- name: Install dependencies
run: npm ci

- name: Check formatting
run: |
npx --yes prettier@$PRETTIER_VERSION --check --config .prettierrc .
npm run prettier:check
- name: Fail if formatting check failed
if: failure()
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"prettier:check": "npx prettier --check .",
"postbuild": "pagefind --site .next/standalone/.next/server/app/articles --output-path public/_pagefind",
"stripe:listen": "stripe listen --forward-to 127.0.0.1:3000/api/stripe-webhook",
"db:regen": "npx prisma generate",
Expand Down

0 comments on commit 6547846

Please sign in to comment.