From 2712fca931cda701d3a0bccfdbc6545e6355c669 Mon Sep 17 00:00:00 2001 From: Blake E Date: Thu, 22 Dec 2022 16:55:11 -0500 Subject: [PATCH] chore: added eslint fix and test to pre-commit hook --- .husky/pre-commit | 5 +++++ package.json | 1 + 2 files changed, 6 insertions(+) create mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..2914571 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,5 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm run test -- --watch=false +npm run lint -- --fix \ No newline at end of file diff --git a/package.json b/package.json index 7651bf6..a18529e 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "scripts": { "start": "npm run dev", "test": "vitest", + "lint": "eslint", "build": "node esbuild.mjs", "dev": "npm run build -- --watch" },