From 7ad5411e45a5cb51125eefdb9b90d3ee543ded68 Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Tue, 9 Jun 2026 14:26:42 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=20lint/format/check?= =?UTF-8?q?=20scripts=20=E5=92=8C=20lint-staged=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8ff33c8..f9aaee1 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,11 @@ "type": "module", "module": "src/cli.ts", "scripts": { - "prepare": "husky" + "prepare": "husky", + "lint": "oxlint", + "format": "oxfmt .", + "format:check": "oxfmt --check .", + "check": "oxlint && oxfmt --check ." }, "dependencies": { "cac": "^7.0.0", @@ -23,5 +27,14 @@ }, "peerDependencies": { "typescript": "^5" + }, + "lint-staged": { + "*.{ts,js,mjs,cjs}": [ + "oxlint", + "oxfmt" + ], + "*.{json,md,yaml,yml}": [ + "oxfmt" + ] } }