From c8cecd0bc0013b43c7260a4b7e4be2ef8a623975 Mon Sep 17 00:00:00 2001 From: ULIVZ <472590061@qq.com> Date: Sat, 5 Oct 2019 00:32:17 +0800 Subject: [PATCH] chore: fix Warning: Setting pre-commit script in package.json > scripts will be deprecated Please move it to husky.hooks in package.json, a .huskyrc file, or a husky.config.js file Or run ./node_modules/.bin/husky-upgrade for automatic update --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ba9b51b7..55f85ae7 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ ], "description": "Minimalistic doc generator with Vue component based layout system", "scripts": { - "precommit": "lint-staged", "bootstrap": "yarn && yarn tsc", "lerna:bootstrap": "lerna bootstrap", "clean": "lerna clean && rm -rf node_modules", @@ -49,5 +48,10 @@ "lint-staged": "^9.3.0", "minimist": "^1.2.0", "typescript": "^3.6.3" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } } }