Skip to content

Commit c8d73ba

Browse files
committed
fix(core): update pre-commit command to handle unmatched errors
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
1 parent 090d4b8 commit c8d73ba

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@
4040
"*.{js,ts,tsx,mjs,cjs,json}": [
4141
"biome check --write"
4242
]
43-
}
43+
},
44+
"allowScripts": {}
4445
}

packages/core/src/install/migrations/20260311120000-migrate-to-biome.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ export default tsDevToolsCore;
466466
{
467467
name: "pre-commit",
468468
command:
469-
"npx --no-install biome check --error-on-warnings --staged --write",
469+
"npx --no-install biome check --error-on-warnings --staged --write --no-errors-on-unmatched",
470470
},
471471
]);
472472
});

packages/core/src/install/migrations/20260311120000-migrate-to-biome.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const PRE_COMMIT_HOOK_NAME = "pre-commit";
1313
const BIOME_INIT_COMMAND = "npx @biomejs/biome init";
1414

1515
const NEW_PRE_COMMIT_COMMAND =
16-
"npx --no-install biome check --error-on-warnings --staged --write";
16+
"npx --no-install biome check --error-on-warnings --staged --write --no-errors-on-unmatched";
1717

1818
export const hooks: ManagedGitHook[] = [
1919
{

packages/core/src/services/MigrationsService.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ describe("MigrationsService", () => {
115115
116116
# Created by ts-dev-tools (https://escemi-tech.github.io/ts-dev-tools/)
117117
118-
npx --no-install biome check --error-on-warnings --staged --write`);
118+
npx --no-install biome check --error-on-warnings --staged --write --no-errors-on-unmatched`);
119119

120120
expect(existsSync(commitMsgHookPath)).toBe(true);
121121
expect(readFileSync(commitMsgHookPath, "utf-8")).toBe(`#!/bin/sh

0 commit comments

Comments
 (0)