mirror of
https://github.com/nix-community/flakelight.git
synced 2024-11-21 23:13:09 +01:00
Make default formatter not depend on devShell.packages
This commit is contained in:
parent
81371a8bf4
commit
68a0941bbd
@ -17,12 +17,17 @@ in
|
||||
pkgs.nodePackages.prettier
|
||||
];
|
||||
|
||||
formatters = {
|
||||
"*.nix" = "nixpkgs-fmt";
|
||||
"*.md" = "prettier --write";
|
||||
"*.json" = "prettier --write";
|
||||
"*.yaml" = "prettier --write";
|
||||
"*.yml" = "prettier --write";
|
||||
};
|
||||
formatters = pkgs:
|
||||
let
|
||||
nixpkgs-fmt = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
|
||||
prettier = "${pkgs.nodePackages.prettier}/bin/prettier --write";
|
||||
in
|
||||
{
|
||||
"*.nix" = nixpkgs-fmt;
|
||||
"*.md" = prettier;
|
||||
"*.json" = prettier;
|
||||
"*.yaml" = prettier;
|
||||
"*.yml" = prettier;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user