From 5d93ad9e071e8b1b0049ec91452bc6f392a6bb83 Mon Sep 17 00:00:00 2001 From: "Jorge Caballero (DataDrivenMD)" <116459476+DataDrivenMD@users.noreply.github.com> Date: Thu, 2 Mar 2023 14:46:56 -0800 Subject: [PATCH] Add automatic linting to pre-commit --- package.json | 8 ++++++-- yarn.lock | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c5c273f..1183426 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "jest-environment-miniflare": "^2.11.0", "npm-run-all": "^4.1.5", "prettier": "^2.8.1", + "simple-git-hooks": "^2.8.1", "ts-jest": "^29.0.3", "typescript": "^4.9.4", "wrangler": "2.7.1" @@ -48,5 +49,8 @@ "cookie": "^0.5.0", "http-message-signatures": "^0.1.2", "toucan-js": "^3.1.0" - } -} + }, + "simple-git-hooks": { + "pre-commit": "yarn lint" + } +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index a4e38bd..72f4b1a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3806,6 +3806,11 @@ simple-get@^4.0.0: once "^1.3.1" simple-concat "^1.0.0" +simple-git-hooks@^2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/simple-git-hooks/-/simple-git-hooks-2.8.1.tgz#05e8306f3211d7eee9f5fdb5cc42521280ee82a9" + integrity sha512-DYpcVR1AGtSfFUNzlBdHrQGPsOhuuEJ/FkmPOOlFysP60AHd3nsEpkGq/QEOdtUyT1Qhk7w9oLmFoMG+75BDog== + sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz"