mirror of
https://github.com/numtide/treefmt.git
synced 2024-08-17 12:50:26 +03:00
52 lines
884 B
Nix
52 lines
884 B
Nix
{
|
|
pkgs,
|
|
inputs,
|
|
perSystem,
|
|
...
|
|
}:
|
|
inputs.treefmt-nix.lib.mkWrapper pkgs {
|
|
projectRootFile = "flake.nix";
|
|
|
|
package = perSystem.self.treefmt;
|
|
|
|
programs = {
|
|
alejandra.enable = true;
|
|
deadnix.enable = true;
|
|
gofumpt.enable = true;
|
|
prettier.enable = true;
|
|
statix.enable = true;
|
|
};
|
|
|
|
settings = {
|
|
global.excludes = [
|
|
"LICENSE"
|
|
# let's not mess with the test folder
|
|
"test/*"
|
|
# unsupported extensions
|
|
"*.{gif,png,svg,tape,mts,lock,mod,sum,toml,env,envrc,gitignore}"
|
|
];
|
|
|
|
formatter = {
|
|
deadnix = {
|
|
priority = 1;
|
|
};
|
|
|
|
statix = {
|
|
priority = 2;
|
|
};
|
|
|
|
alejandra = {
|
|
priority = 3;
|
|
};
|
|
|
|
prettier = {
|
|
options = [
|
|
"--tab-width"
|
|
"4"
|
|
];
|
|
includes = ["*.{css,html,js,json,jsx,md,mdx,scss,ts,yaml}"];
|
|
};
|
|
};
|
|
};
|
|
}
|