fix: pre-commit fail when path contains space (#28973)

* fix: pre-commit fail when path contains space

* addressed coderabbitai comment
This commit is contained in:
Shaizuu
2026-04-25 09:37:46 +01:00
committed by GitHub
parent 75bd1b3489
commit 07edb535e6
+3 -1
View File
@@ -1,5 +1,7 @@
const quotePath = (file) => `"${file.replace(/"/g, '\\"')}"`;
export default {
"(apps|packages|companion)/**/*.{js,ts,jsx,tsx}": (files) =>
`biome lint --reporter summary --config-path=biome-staged.json ${files.join(" ")}`,
`biome lint --reporter summary --config-path=biome-staged.json ${files.map(quotePath).join(" ")}`,
"packages/prisma/schema.prisma": ["prisma format"],
};