From ee73ad58cf9a3b9cbbb562dbec716faec5f7ae46 Mon Sep 17 00:00:00 2001 From: DebugIsFalse <511418503@qq.com> Date: Wed, 12 Jun 2024 11:52:33 +0800 Subject: [PATCH] fix: eslint --- package.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 49f8016..1a4b2ae 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,9 @@ "generate": "nuxt generate", "preview": "nuxt preview", "postinstall": "nuxt prepare", - "lint": "eslint . --fix" + "prepare": "husky install", + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "dependencies": { "@formkit/auto-animate": "^0.8.2", @@ -37,5 +39,10 @@ "husky": "^9.0.11", "lint-staged": "^15.2.6", "vite-plugin-eslint2": "^4.4.0" + }, + "husky": { + "hooks": { + "pre-commit": ["npm run prepare"] + } } } -- GitLab