chore: 添加 lint/format/check scripts 和 lint-staged 配置
This commit is contained in:
15
package.json
15
package.json
@@ -8,7 +8,11 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"module": "src/cli.ts",
|
"module": "src/cli.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "husky"
|
"prepare": "husky",
|
||||||
|
"lint": "oxlint",
|
||||||
|
"format": "oxfmt .",
|
||||||
|
"format:check": "oxfmt --check .",
|
||||||
|
"check": "oxlint && oxfmt --check ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cac": "^7.0.0",
|
"cac": "^7.0.0",
|
||||||
@@ -23,5 +27,14 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": "^5"
|
"typescript": "^5"
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.{ts,js,mjs,cjs}": [
|
||||||
|
"oxlint",
|
||||||
|
"oxfmt"
|
||||||
|
],
|
||||||
|
"*.{json,md,yaml,yml}": [
|
||||||
|
"oxfmt"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user