flake: sort pre-commit hooks and formatters (#1586)

This commit is contained in:
awwpotato 2025-07-04 06:55:46 -07:00 committed by GitHub
parent 732c666ba5
commit 85d84607b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 18 deletions

View file

@ -14,11 +14,13 @@
# dev flake is partitioned
formatter = pkgs.treefmt.withConfig {
runtimeInputs = with pkgs; [
nixfmt-rfc-style
# keep-sorted start
biome
keep-sorted
nixfmt-rfc-style
ruff
stylish-haskell
keep-sorted
# keep-sorted end
];
settings = {
@ -26,10 +28,7 @@
tree-root-file = "flake.nix";
formatter = {
stylish-haskell = {
command = "stylish-haskell";
includes = [ "*.hx" ];
};
# keep-sorted start block=yes
biome = {
command = "biome";
options = [
@ -55,6 +54,15 @@
"modules/swaync/base.css"
];
};
keep-sorted = {
command = "keep-sorted";
includes = [ "*" ];
};
nixfmt = {
command = "nixfmt";
options = [ "--width=80" ];
includes = [ "*.nix" ];
};
ruff = {
command = "ruff";
options = [
@ -66,15 +74,11 @@
];
includes = [ "*.py" ];
};
nixfmt = {
command = "nixfmt";
options = [ "--width=80" ];
includes = [ "*.nix" ];
};
keep-sorted = {
command = "keep-sorted";
includes = [ "*" ];
stylish-haskell = {
command = "stylish-haskell";
includes = [ "*.hx" ];
};
# keep-sorted end
};
};
};

View file

@ -11,20 +11,18 @@
check.enable = true;
settings.hooks = {
# keep-sorted start block=yes
deadnix = {
enable = true;
settings.noUnderscore = true;
};
editorconfig-checker.enable = true;
hlint.enable = true;
statix.enable = true;
treefmt = {
enable = true;
package = config.formatter;
};
statix.enable = true;
typos = {
enable = true;
settings.configuration = ''
@ -33,6 +31,7 @@
'';
};
yamllint.enable = true;
# keep-sorted end
};
};
};