chore: 添加 lint/format/check scripts 和 lint-staged 配置
This commit is contained in:
15
package.json
15
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user