chore: 添加 lint/format/check scripts 和 lint-staged 配置

This commit is contained in:
2026-06-09 14:26:42 +08:00
parent b82f1caf0b
commit 7ad5411e45

View File

@@ -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"
]
}
}