Skip to content

Commit 07782ad

Browse files
factions-user
f
authored andcommitted
add precommit lint hook
GitOrigin-RevId: 2561b819fedca1db1a0a31f75cc64a90c87906b4
1 parent 4ff04f5 commit 07782ad

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.husky/pre-commit

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bun test
2+
lint-staged

bun.lockb

8.69 KB
Binary file not shown.

package.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"@biomejs/biome": "1.9.0",
66
"@happy-dom/global-registrator": "15.7.3",
77
"@types/bun": "1.1.9",
8+
"husky": "9.1.6",
9+
"lint-staged": "15.2.10",
810
"patch-package": "8.0.0"
911
},
1012
"engines": {
@@ -14,9 +16,15 @@
1416
"//lint": "No monorepo support yet so just use from root https://github.com/biomejs/biome/issues/2228",
1517
"lint": "bunx @biomejs/biome check --vcs-use-ignore-file true --write .",
1618
"//postinstall": "--error-on-fail is on by default in CI but some patched packages aren't present in mirrored repos causing failure",
17-
"postinstall": "patch-package"
19+
"postinstall": "patch-package",
20+
"prepare": "husky"
1821
},
1922
"trustedDependencies": ["@biomejs/biome", "esbuild", "ngrok", "workerd"],
2023
"workspaces": ["apps/*", "packages/*"],
21-
"packageManager": "[email protected]"
24+
"packageManager": "[email protected]",
25+
"lint-staged": {
26+
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
27+
"biome check --files-ignore-unknown=true"
28+
]
29+
}
2230
}

0 commit comments

Comments
 (0)