From df9322b767aeb4f4b0ad1a0d0bedc33907c7ac27 Mon Sep 17 00:00:00 2001 From: David Coomber <47242934+dcoomber@users.noreply.github.com> Date: Sat, 19 Aug 2023 09:20:46 +0200 Subject: [PATCH 1/3] Added prettier precommit hook with husky Re #48 --- .husky/pre-commit | 4 ++++ package.json | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..0da96d6b --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx pretty-quick --staged diff --git a/package.json b/package.json index 8e2c2715..3aef7fa1 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,9 @@ "@faker-js/faker": "^7.6.0", "@jest/globals": "^29.2.0", "@playwright/test": "^1.27.1", + "husky": "^8.0.3", "jest": "^29.2.0", + "pretty-quick": "^3.1.3", "randomstring": "^1.2.2", "ts-jest": "^29.0.5" }, @@ -30,9 +32,10 @@ "build:graphql-docs": "npm run build --workspace=packages/bruno-graphql-docs", "build:electron": "./scripts/build-electron.sh", "test:e2e": "npx playwright test", - "test:report": "npx playwright show-report" + "test:report": "npx playwright show-report", + "prepare": "husky install" }, "overrides": { "rollup": "3.2.5" } -} \ No newline at end of file +} From 9ea95b4571f2b3ae9eeb690b02767b4b9f682232 Mon Sep 17 00:00:00 2001 From: David Coomber <47242934+dcoomber@users.noreply.github.com> Date: Sat, 19 Aug 2023 10:40:54 +0200 Subject: [PATCH 2/3] Copy prettier config from packages/bruno-app Re #48 --- .prettierrc.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .prettierrc.json diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..c91533e8 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,7 @@ +{ + "trailingComma": "none", + "tabWidth": 2, + "semi": true, + "singleQuote": true, + "printWidth": 180 +} From bd670eceb61e578f53fd2428d75b9c0ea9463131 Mon Sep 17 00:00:00 2001 From: Lesage Yann Date: Tue, 29 Aug 2023 11:36:35 +0200 Subject: [PATCH 3/3] chore: improve the cli doc to avoid misunderstandings on the command: --- packages/bruno-cli/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bruno-cli/readme.md b/packages/bruno-cli/readme.md index 43f6eed6..4c69fb22 100644 --- a/packages/bruno-cli/readme.md +++ b/packages/bruno-cli/readme.md @@ -21,7 +21,7 @@ This command will run all the requests in your collection. You can also run a si bru run request.bru ``` -Or run all requests in a folder: +Or run all requests in a collection's subfolder: ```bash bru run folder ```