From 4baa04f8d22c78875597d59c965765721e7fdb5b Mon Sep 17 00:00:00 2001 From: Tim Nieradzik Date: Mon, 11 Mar 2024 13:59:28 +0200 Subject: [PATCH] ci: use same Prettier version as configured in package.json --- .github/workflows/git.yml | 2 +- .husky/pre-commit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/git.yml b/.github/workflows/git.yml index e7214c0..07aac20 100644 --- a/.github/workflows/git.yml +++ b/.github/workflows/git.yml @@ -20,7 +20,7 @@ jobs: - name: Initialize project run: pnpm i --frozen-lockfile - name: Run commitlint - run: pnpm dlx commitlint --from=$(git rev-list "origin/${GITHUB_BASE_REF}"..HEAD | sed '1!d')~1 + run: pnpm exec commitlint --from=$(git rev-list "origin/${GITHUB_BASE_REF}"..HEAD | sed '1!d')~1 - name: Ensure linear git history run: git merge-base --is-ancestor "origin/${GITHUB_BASE_REF}" HEAD - name: Check for fixup or WIP commits diff --git a/.husky/pre-commit b/.husky/pre-commit index e0273f7..8330318 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -6,7 +6,7 @@ CHANGED_FILES=$(git --no-pager diff --name-only --cached --diff-filter=AM --rela '*.md' '*.html' '*.yml' '*.yaml' '*.json' '*.js' '*.jsx' '*.ts' '*.tsx' '*.css') if [ -n "$CHANGED_FILES" ]; then - pnpm dlx prettier --check $CHANGED_FILES + pnpm exec prettier --check $CHANGED_FILES fi pnpm lint