diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..e45baef --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +pnpm pre diff --git a/package.json b/package.json index 0a7756d..69372e0 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,14 @@ "unlink-cli:dev": "cd lib && pnpm unlink --global", "unlink-cli:prod": "cd dist && pnpm unlink --global" }, + "lint-staged": { + "*": [ + "git add .", + "pnpm format", + "pnpm lint:fix", + "pnpm lint" + ] + }, "devDependencies": { "@changesets/cli": "^2.27.1", "@stylistic/eslint-plugin": "^1.6.0",