mirror of
https://github.com/numtide/treefmt.git
synced 2024-11-09 11:59:16 +03:00
166a919fee
No longer needed Signed-off-by: Brian McGee <brian@bmcgee.ie>
71 lines
1.3 KiB
Nix
71 lines
1.3 KiB
Nix
{inputs, ...}: {
|
|
imports = [
|
|
inputs.treefmt-nix.flakeModule
|
|
];
|
|
perSystem = {
|
|
config,
|
|
self',
|
|
...
|
|
}: {
|
|
treefmt.config = {
|
|
flakeCheck = true;
|
|
flakeFormatter = true;
|
|
projectRootFile = "flake.nix";
|
|
|
|
package = self'.packages.default;
|
|
|
|
programs = {
|
|
alejandra.enable = true;
|
|
deadnix.enable = true;
|
|
gofumpt.enable = true;
|
|
prettier.enable = true;
|
|
statix.enable = true;
|
|
};
|
|
|
|
settings.formatter = {
|
|
deadnix = {
|
|
pipeline = "nix";
|
|
priority = 1;
|
|
};
|
|
|
|
statix = {
|
|
pipeline = "nix";
|
|
priority = 2;
|
|
};
|
|
|
|
alejandra = {
|
|
pipeline = "nix";
|
|
priority = 3;
|
|
};
|
|
|
|
prettier = {
|
|
options = ["--tab-width" "4"];
|
|
includes = [
|
|
"*.css"
|
|
"*.html"
|
|
"*.js"
|
|
"*.json"
|
|
"*.jsx"
|
|
"*.md"
|
|
"*.mdx"
|
|
"*.scss"
|
|
"*.ts"
|
|
"*.yaml"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
|
|
devshells.default = {
|
|
commands = [
|
|
{
|
|
category = "formatting";
|
|
name = "fmt";
|
|
help = "format the repo";
|
|
command = "nix fmt";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|