nixpkgs-review-gha/treefmt.nix
2025-09-01 18:08:38 +02:00

32 lines
515 B
Nix

{ lib, pkgs, ... }:
{
tree-root-file = "treefmt.nix";
on-unmatched = "fatal";
excludes = [
"*.lock"
"*.md"
".gitignore"
"LICENSE"
];
formatter.nixfmt = {
command = lib.getExe pkgs.nixfmt;
includes = [ "*.nix" ];
options = [ "--strict" ];
};
formatter.prettier = {
command = lib.getExe pkgs.nodePackages.prettier;
includes = [
"*.js"
"*.yml"
];
options = [
"--write"
"--print-width=120"
"--arrow-parens=avoid"
];
};
}