Skip to content

Commit 5bfab5b

Browse files
committed
build(treefmt): replace prettier with oxfmt
Migrate from prettier to oxfmt for formatting non-Python files. oxfmt is part of the oxc project and provides faster formatting with native Rust implementation. Changes: - Remove prettier configuration from treefmt programs - Add oxfmt as custom formatter with explicit includes - Extend supported file types: md, yml, yaml, json, ts, tsx, js, jsx, html, css - Update flake.lock with latest nixpkgs containing oxfmt
1 parent 7404a57 commit 5bfab5b

File tree

2 files changed

+27
-21
lines changed

2 files changed

+27
-21
lines changed

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,26 @@
4242
nixfmt.package = pkgs.nixfmt-rfc-style;
4343
ruff-check.enable = true;
4444
ruff-format.enable = true;
45-
prettier = {
46-
enable = true;
47-
includes = [
48-
"*.md"
49-
"*.yml"
50-
"*.yaml"
51-
"*.json"
52-
];
53-
excludes = [
54-
"CHANGELOG.md"
55-
];
56-
};
5745
typos.enable = true;
5846
};
47+
settings.formatter.oxfmt = {
48+
command = "${pkgs.oxfmt}/bin/oxfmt";
49+
includes = [
50+
"*.md"
51+
"*.yml"
52+
"*.yaml"
53+
"*.json"
54+
"*.ts"
55+
"*.tsx"
56+
"*.js"
57+
"*.jsx"
58+
"*.html"
59+
"*.css"
60+
];
61+
excludes = [
62+
"CHANGELOG.md"
63+
];
64+
};
5965
};
6066

6167
# Git hooks configuration

0 commit comments

Comments
 (0)