From df2a55f82d5efeed8c59c5cf3b4e7381c97959b5 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 4 May 2024 12:38:32 +0200 Subject: chore: use prettier with plugin to format go templates --- default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'default.nix') diff --git a/default.nix b/default.nix index 3db0a44..d3585e0 100644 --- a/default.nix +++ b/default.nix @@ -5,6 +5,7 @@ in import sources.nixpkgs { overlays = [ (import "${sources.gomod2nix}/overlay.nix") + (import ./nix/overlays/default.nix) ]; } ) @@ -33,12 +34,18 @@ in 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; + excludes = [ "nix/.*" ]; }; - nixpkgs-fmt.enable = true; convco.enable = true; @@ -47,9 +54,11 @@ in 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" + ]; }; }; -- cgit 1.4.1