From 5d24bedd60442f3937dc972cce4330cbd194dd37 Mon Sep 17 00:00:00 2001 From: atlas Date: Wed, 2 Sep 2026 14:20:39 +0200 Subject: [PATCH] treefmt: format the web files with prettier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `nix/treefmt.nix` gated nix, rust and toml and nothing else, so markdown, css, js/ts/tsx, html and json had no formatting gate at all. Operator asked for "the web stuff to be formatted as well" (#1997). This commit is the one-line enable; the reformat it produces is the commit after it, kept separate so this one stays reviewable. Scope is treefmt-nix's `programs.prettier` default rather than a hand-written `includes` list. The default is wider than the requested md/css/js/ts/tsx/html/json — it also covers yaml, scss, vue, mdx, json5, cjs/mjs/jsx — but measured against this tree that width costs exactly 3 extra files, all `frontend/packages/*/build.mjs`, which are web build scripts. `.forgejo/workflows/{ci,coverage}.yml` are in the default set and already conform, so they reformat to nothing today; from here on they are gated too, which is what a repo formatter is for. `.prettierignore` is honoured: prettier applies it even to the explicit paths treefmt passes, so the `hivectl markdown-docs` generated file and the 12 files awaiting manual list-item re-wrap stay untouched. --- nix/treefmt.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/treefmt.nix b/nix/treefmt.nix index 3d05e507..1924f0c1 100644 --- a/nix/treefmt.nix +++ b/nix/treefmt.nix @@ -5,6 +5,7 @@ programs = { keep-sorted.enable = true; nixfmt.enable = true; + prettier.enable = true; rustfmt.enable = true; taplo.enable = true; };