From 5fbb85744b19fc8e1bc7427b77768117fb7f1aa9 Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Fri, 14 Apr 2023 10:43:39 -0700 Subject: [PATCH] Add default formatting for json and yaml files --- default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/default.nix b/default.nix index 03790ee..bbd85a8 100644 --- a/default.nix +++ b/default.nix @@ -32,13 +32,10 @@ let + optionalString (!pathExists (src + /.ecrc)) " -disable-indent-size -disable-max-line-length"; }); - devTools = { pkgs, ... }: with pkgs; [ - nixpkgs-fmt - nodePackages.prettier - ]; + devTools = pkgs: with pkgs; [ nixpkgs-fmt nodePackages.prettier ]; formatters = { "*.nix" = "nixpkgs-fmt"; - "*.md" = "prettier --write"; + "*.md | *.json | *.yml" = "prettier --write"; }; };