all repos — searchix @ df2a55f82d5efeed8c59c5cf3b4e7381c97959b5

Search engine for NixOS, nix-darwin, home-manager and NUR users

chore: use prettier with plugin to format go templates

Alan Pearce
commit

df2a55f82d5efeed8c59c5cf3b4e7381c97959b5

parent

1fb64b09e2dba34784732a61cbebc119cd847803

1 file changed, 14 insertions(+), 5 deletions(-)

changed files
M default.nixdefault.nix
@@ -5,6 +5,7 @@ { pkgs ? (
import sources.nixpkgs { overlays = [ (import "${sources.gomod2nix}/overlay.nix") + (import ./nix/overlays/default.nix) ]; } )
@@ -33,12 +34,18 @@ gotest.enable = true;
golangci-lint.enable = true; staticcheck.enable = true; - statix.enable = true; + statix = { + enable = true; + settings.ignore = [ "nix/*" ]; + }; deadnix = { enable = true; - excludes = [ "./nix" ]; + excludes = [ "nix/.*" ]; }; - nixpkgs-fmt.enable = true; + nixpkgs-fmt = { + enable = true; + excludes = [ "nix/.*" ]; + }; convco.enable = true;
@@ -47,9 +54,11 @@ check-symlinks.enable = true;
editorconfig-checker.enable = true; prettier = { enable = true; - types_or = [ "plain-text" "yaml" ]; + types_or = [ "plain-text" "yaml" "gotmpl" ]; settings = { - check = true; + plugins = with pkgs.nodePackages; [ + "${prettier-plugin-go-template}/lib/node_modules/prettier-plugin-go-template/lib/index.js" + ]; }; };