treefmt: format the web files with prettier
`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.
This commit is contained in:
parent
1e67f56249
commit
5d24bedd60
1 changed files with 1 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
|||
programs = {
|
||||
keep-sorted.enable = true;
|
||||
nixfmt.enable = true;
|
||||
prettier.enable = true;
|
||||
rustfmt.enable = true;
|
||||
taplo.enable = true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue