From 771e83d7ce24db565008d47cdfe98cd16ab79db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20B=C3=A9ranger?= Date: Mon, 29 Jan 2024 17:41:12 +0100 Subject: [PATCH] Add prettier-check (#31) --- .github/workflows/node.js.yml | 10 ++++++---- package.json | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4377018..47ec9d3 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,6 +5,7 @@ on: branches: [ "main" ] pull_request: branches: [ "main" ] + jobs: build: runs-on: ubuntu-latest @@ -42,7 +43,8 @@ jobs: - name: Update pnpm lockfile run: pnpm install --no-frozen-lockfile - - name: Install dependencies and run tests - run: | - pnpm install - pnpm test + - name: Install dependencies + run: pnpm install + + - name: Check code formatting with Prettier + run: pnpm run prettier-check diff --git a/package.json b/package.json index 938942c..e2b408d 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "send:arthera-testnet": "hardhat send --wallet 0xD8a394e7d7894bDF2C57139fF17e5CBAa29Dd977 --network arthera-testnet --amount", "send:op-sepolia": "hardhat send --wallet 0xD8a394e7d7894bDF2C57139fF17e5CBAa29Dd977 --network op-sepolia --amount", "bal": "npx hardhat run scripts/check-my-balance.ts --network", - "prettier": "prettier --write ." + "prettier": "prettier --write \"**/*.ts\"", + "prettier-check": "prettier --check \"**/*.ts\"" }, "keywords": [], "author": "", @@ -56,4 +57,4 @@ "ethers": "^6.7.1", "hardhat-deploy": "^0.11.37" } -} +} \ No newline at end of file