diff --git a/.husky/pre-commit b/.husky/pre-commit index 9e97d326d..a16d8b1d5 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1,4 @@ -# npm run check-format +#!/usr/bin/env sh +. "$(dirname "$0")/_/husky.sh" + +npx lint-staged diff --git a/package.json b/package.json index a535b90f7..96f17f499 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,11 @@ "check-format": "prettier . --check", "prepare": "husky" }, + "lint-staged": { + "*": [ + "prettier --write --ignore-unknown" + ] + }, "devDependencies": { "husky": "^9.0.11", "lint-staged": "^15.2.2",