From 4fba0bb1d8470ea77a104eea0ee7b5f98179b4aa Mon Sep 17 00:00:00 2001 From: Spencer Ofwiti Date: Mon, 10 May 2021 19:28:14 +0300 Subject: [PATCH] Add husky to scripts. --- .husky/.gitignore | 1 + package.json | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .husky/.gitignore diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/package.json b/package.json index 78ff8ad..b2940b1 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,12 @@ "test:dev": "ng test", "format:check": "prettier --config ./.prettierrc --list-different \"src/{app,environments,assets}/**/*.{ts,js,json,css,scss}\"", "format:change": "prettier --config ./.prettierrc --write \"src/{app,environments,assets}/**/*.{ts,js,json,css,scss}\"", + "format:fix": "pretty-quick --staged", "lint": "ng lint", "e2e": "ng e2e", - "postinstall": "node patch-webpack.js" + "precommit": "format:fix && lint", + "postinstall": "node patch-webpack.js", + "prepare": "husky install" }, "private": true, "dependencies": {