From 22881ce587177b9db1b42f21c84b486d72df6e3f 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 | 6 +++++- yarn.lock | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c5c273f..dc313f8 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" + } } 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"