Skip to content

Commit 6a3d22f

Browse files
committed
feat: add hooks.biome.settings.flags for extra CLI flags
Mirrors the existing 'black' hook pattern so users can pass arbitrary CLI flags such as --no-errors-on-unmatched (commonly needed when staged files are all excluded by biome's own config, e.g. dep-only or generated- file-only commits). Unblocks workarounds that override hooks.biome.entry via lib.mkForce.
1 parent 61ab0e8 commit 6a3d22f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

modules/hooks.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,13 @@ in
216216
# underlying biome binary (i.e biome.json if exists)
217217
default = "";
218218
};
219+
220+
flags = mkOption {
221+
type = types.str;
222+
description = "Additional flags passed to biome. See all available [here](https://biomejs.dev/reference/cli/).";
223+
default = "";
224+
example = "--no-errors-on-unmatched";
225+
};
219226
};
220227
};
221228
};
@@ -2669,6 +2676,7 @@ in
26692676
mkCmdArgs [
26702677
[ (hooks.biome.settings.write) "--write" ]
26712678
[ (hooks.biome.settings.configPath != "") "--config-path ${hooks.biome.settings.configPath}" ]
2679+
[ (hooks.biome.settings.flags != "") hooks.biome.settings.flags ]
26722680
];
26732681
in
26742682
"${binPath} check ${cmdArgs}";

0 commit comments

Comments
 (0)