From 68835220c10cf6f8ab57eae3e06382a3f8766a6c Mon Sep 17 00:00:00 2001 From: Steve King Date: Sat, 9 Mar 2024 13:15:50 +0000 Subject: [PATCH] Prettier and helper script to format the project --- .prettierignore | 1 + package.json | 1 + simple-git/test/integration/log-numstat.spec.ts | 13 +++++++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.prettierignore b/.prettierignore index 1f330cec..369f2b78 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,6 @@ *.md .changeset +.yarn dist coverage node_modules diff --git a/package.json b/package.json index d8a53a71..81ed2805 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "build": "lerna run build", "clean": "git clean -fxd -e .idea -e node_modules -e .yarn", "clean:cache": "git clean -fxd .yarn node_modules packages simple-git", + "format": "prettier --write .", "test": "lerna run test" }, "dependencies": { diff --git a/simple-git/test/integration/log-numstat.spec.ts b/simple-git/test/integration/log-numstat.spec.ts index 67519cd5..a4b6215f 100644 --- a/simple-git/test/integration/log-numstat.spec.ts +++ b/simple-git/test/integration/log-numstat.spec.ts @@ -3,10 +3,11 @@ import { newSimpleGit } from '@simple-git/test-utils'; describe('log-numstat', function () { it('custom format and date range should not fail when also setting numstat', async () => { - const ac = new AbortController() + const ac = new AbortController(); const log = newSimpleGit(__dirname, { abort: ac.signal, - }).log({ format: { + }).log({ + 'format': { H: '%H', h: '%h', P: '%P', @@ -16,8 +17,12 @@ describe('log-numstat', function () { D: '%D', b: '%b', an: '%an', - ae: '%ae' - }, '--all': null, '--since': '2024-02-04', '--numstat': null}); + ae: '%ae', + }, + '--all': null, + '--since': '2024-02-04', + '--numstat': null, + }); setTimeout(() => ac.abort(), 500);