mirror of
https://github.com/nix-community/flakelight.git
synced 2025-06-21 01:57:57 +02:00
Add workaround for prettier bug
prettier creates a node_modules folder when formatting some files, which it should not as cache is not enabled. Setting the cache to a file works around this. See https://github.com/prettier/prettier/issues/13032
This commit is contained in:
parent
ac75d63fa8
commit
1af817b598
@ -20,7 +20,8 @@ in
|
|||||||
formatters = pkgs:
|
formatters = pkgs:
|
||||||
let
|
let
|
||||||
nixpkgs-fmt = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
|
nixpkgs-fmt = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
|
||||||
prettier = "${pkgs.nodePackages.prettier}/bin/prettier --write";
|
prettier = "${pkgs.nodePackages.prettier}/bin/prettier --write"
|
||||||
|
+ " --cache-location=.prettiercache";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"*.nix" = mkDefault nixpkgs-fmt;
|
"*.nix" = mkDefault nixpkgs-fmt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user