diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..d24fdfc --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx lint-staged diff --git a/package.json b/package.json index 0320fae..f602a08 100644 --- a/package.json +++ b/package.json @@ -74,5 +74,9 @@ "^@/(.*)$": "/$1", "^@$": "/main.ts" } + }, + "lint-staged": { + "*.{js,jsx,ts,tsx}": "eslint --fix", + "*.{js,jsx,ts,tsx,css,md}": "prettier --write" } }