chore(husky): enforce staged biome pre-commit check

This commit is contained in:
jeffusion
2026-03-24 10:00:24 +08:00
committed by 路遥知码力
parent 3c1d616dc1
commit bd8235c70f
3 changed files with 10 additions and 1 deletions

4
.husky/pre-commit Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
set -eu
bunx --bun @biomejs/biome check --staged --files-ignore-unknown=true --no-errors-on-unmatched

View File

@@ -27,6 +27,7 @@
"@types/lodash-es": "^4.17.12", "@types/lodash-es": "^4.17.12",
"@types/node": "^22.13.10", "@types/node": "^22.13.10",
"concurrently": "^9.2.1", "concurrently": "^9.2.1",
"husky": "^9.1.7",
"semantic-release": "^24.2.9", "semantic-release": "^24.2.9",
"typescript": "^5.8.2", "typescript": "^5.8.2",
}, },
@@ -393,6 +394,8 @@
"humanize-ms": ["humanize-ms@1.2.1", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="], "humanize-ms": ["humanize-ms@1.2.1", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="],
"husky": ["husky@9.1.7", "", { "bin": { "husky": "bin.js" } }, "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA=="],
"import-fresh": ["import-fresh@3.3.1", "", { "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ=="], "import-fresh": ["import-fresh@3.3.1", "", { "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ=="],
"import-from-esm": ["import-from-esm@2.0.0", "", { "dependencies": { "debug": "^4.3.4", "import-meta-resolve": "^4.0.0" } }, "sha512-YVt14UZCgsX1vZQ3gKjkWVdBdHQ6eu3MPU1TBgL1H5orXe2+jWD006WCPPtOuwlQm10NuzOW5WawiF1Q9veW8g=="], "import-from-esm": ["import-from-esm@2.0.0", "", { "dependencies": { "debug": "^4.3.4", "import-meta-resolve": "^4.0.0" } }, "sha512-YVt14UZCgsX1vZQ3gKjkWVdBdHQ6eu3MPU1TBgL1H5orXe2+jWD006WCPPtOuwlQm10NuzOW5WawiF1Q9veW8g=="],

View File

@@ -28,6 +28,7 @@
"@types/lodash-es": "^4.17.12", "@types/lodash-es": "^4.17.12",
"@types/node": "^22.13.10", "@types/node": "^22.13.10",
"concurrently": "^9.2.1", "concurrently": "^9.2.1",
"husky": "^9.1.7",
"semantic-release": "^24.2.9", "semantic-release": "^24.2.9",
"typescript": "^5.8.2" "typescript": "^5.8.2"
}, },
@@ -47,7 +48,8 @@
"start": "bun run src/index.ts", "start": "bun run src/index.ts",
"start:prod": "bun run dist/index.js", "start:prod": "bun run dist/index.js",
"lint": "biome check src/", "lint": "biome check src/",
"test": "bun test" "test": "bun test",
"prepare": "husky"
}, },
"keywords": [ "keywords": [
"code-review", "code-review",