From 704868cfd790b70617b8ff02ebe1c1bcbd5d66bb Mon Sep 17 00:00:00 2001 From: dawn Date: Tue, 21 Jul 2026 02:31:45 +0300 Subject: [PATCH] nix/treefmt: fix prettier plugin resolution --- flake.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ec4ff834..3215cd92 100644 --- a/flake.nix +++ b/flake.nix @@ -269,7 +269,18 @@ }; prettier = { - command = pkgs.lib.getExe pkgs.prettier; + command = pkgs.writeShellScript "prettier-wrapper" '' + cd web + args=() + for arg in "$@"; do + if [[ "$arg" == web/* ]]; then + args+=("''${arg#web/}") + else + args+=("$arg") + fi + done + exec ${pkgs.lib.getExe pkgs.prettier} "''${args[@]}" + ''; options = ["-w"]; includes = [ "web/**/*.cjs" @@ -288,6 +299,10 @@ "web/**/*.yaml" "web/**/*.yml" ]; + excludes = [ + "web/static/**" + "web/src/lib/api/lexicons/**" + ]; }; }; }; -- 2.51.2