From 6b9ed7c979a9a9ab0bc3ce895f4d3ab9ed95809f Mon Sep 17 00:00:00 2001 From: Jonas Gloning <34194370+jonasgloning@users.noreply.github.com> Date: Mon, 31 Jul 2023 16:35:59 +0200 Subject: [PATCH] ci: use `package.json` version of prettier --- .github/workflows/prettier.yml | 12 +++++------- package.json | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 82692e0df..11e1650e5 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -11,13 +11,11 @@ jobs: steps: - name: Check out repo uses: actions/checkout@v3 - - uses: actions/cache@v3 - name: Configure npm caching + - uses: actions/setup-node@v3 with: - path: ~/.npm - key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }} - restore-keys: | - ${{ runner.os }}-npm- + node-version: 16 + cache: "npm" + - run: npm ci - name: Run prettier run: |- - npx prettier --check . + npm run format:check diff --git a/package.json b/package.json index 037fcb1a6..846853112 100644 --- a/package.json +++ b/package.json @@ -159,6 +159,7 @@ "test:watch": "jest --watch", "coverage": "jest --coverage --collectCoverageFrom=\"./lib/**\"", "format": "prettier --write .", + "format:check": "prettier --check .", "semantic-release": "semantic-release", "e2e": "wdio run e2e/wdio.local.conf.ts", "e2e:bstack": "wdio run e2e/wdio.bstack.conf.ts"