From 5d8c53e648e222818ccbbba7cb6e80136f34e7e6 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Sun, 11 Jul 2021 21:10:28 +0800 Subject: [PATCH] chore: update commit hooks --- packages/ui/.gitignore | 1 + packages/ui/.husky/.gitignore | 1 + packages/ui/.husky/commit-msg | 4 ++++ packages/ui/.husky/pre-commit | 4 ++++ packages/ui/package.json | 2 +- 5 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 packages/ui/.husky/.gitignore create mode 100755 packages/ui/.husky/commit-msg create mode 100755 packages/ui/.husky/pre-commit diff --git a/packages/ui/.gitignore b/packages/ui/.gitignore index 292d40c00..09a0bee2b 100644 --- a/packages/ui/.gitignore +++ b/packages/ui/.gitignore @@ -21,5 +21,6 @@ yarn-error.log* # misc cache +.*cache .DS_Store *.env diff --git a/packages/ui/.husky/.gitignore b/packages/ui/.husky/.gitignore new file mode 100644 index 000000000..31354ec13 --- /dev/null +++ b/packages/ui/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/packages/ui/.husky/commit-msg b/packages/ui/.husky/commit-msg new file mode 100755 index 000000000..fe4c17a22 --- /dev/null +++ b/packages/ui/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install commitlint --edit "" diff --git a/packages/ui/.husky/pre-commit b/packages/ui/.husky/pre-commit new file mode 100755 index 000000000..36af21989 --- /dev/null +++ b/packages/ui/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx lint-staged diff --git a/packages/ui/package.json b/packages/ui/package.json index 013ce8187..128710ec9 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -58,7 +58,7 @@ ] }, "lint-staged": { - "*.{ts,tsx}": "eslint --cache --fix", + "*.{ts,tsx}": "eslint --format pretty --cache --fix", "*.scss": "stylelint --fix" } }