From fb22f3a9477209e59e815f62ff1d3799262d7227 Mon Sep 17 00:00:00 2001 From: Phred Date: Fri, 6 Aug 2021 09:50:47 -0500 Subject: [PATCH] added formatting before commit and run tests before push hooks Signed-off-by: Phred --- .husky/pre-commit | 4 ++++ .husky/pre-push | 4 ++++ .lintstagedrc | 3 +++ 3 files changed, 11 insertions(+) create mode 100755 .husky/pre-commit create mode 100755 .husky/pre-push create mode 100644 .lintstagedrc diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..de26dc1 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +lint-staged diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 0000000..449fcde --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm test diff --git a/.lintstagedrc b/.lintstagedrc new file mode 100644 index 0000000..ec1a396 --- /dev/null +++ b/.lintstagedrc @@ -0,0 +1,3 @@ +{ + "*.ts": "npm run format-check" +}