From 901c677946b302deb610705462df3f7775c74c4c Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Tue, 3 Jun 2025 19:40:47 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=20lint-staged=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BB=A5=E4=BC=98=E5=8C=96=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为 prettier 和 oxlint 添加 --cache 标志以提高执行速度 - 调整文件匹配模式,将 css 和 scss 文件移至 prettier 处理 - 添加排除 node_modules 和 dist 目录的规则 --- package.json | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 418d4c6..6a7f982 100644 --- a/package.json +++ b/package.json @@ -73,12 +73,14 @@ "prepare": "husky" }, "lint-staged": { - "**/*.{html,vue,ts,cjs,json,md}": [ - "prettier --write" + "**/*.{html,cjs,json,md,scss,css,txt}": [ + "prettier --write --cache" ], - "**/*.{vue,js,ts,jsx,tsx,vue,css,scss,html}": [ - "oxlint --fix" - ] + "**/*.{vue,js,ts}": [ + "oxlint --fix", + "prettier --write --cache" + ], + "!**/{node_modules,dist}/**": [] }, "resolutions": { "bin-wrapper": "npm:bin-wrapper-china"