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:
@@ -1,5 +1,7 @@
|
|||||||
|
const quotePath = (file) => `"${file.replace(/"/g, '\\"')}"`;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
"(apps|packages|companion)/**/*.{js,ts,jsx,tsx}": (files) =>
|
"(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"],
|
"packages/prisma/schema.prisma": ["prisma format"],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user