nixos-config/treefmt.toml

49 lines
941 B
TOML
Raw Normal View History

2023-04-26 09:23:56 +02:00
# One CLI to format the code tree - https://github.com/numtide/treefmt
[formatter.nix]
command = "nixpkgs-fmt"
includes = [ "*.nix"]
[formatter.shell]
command = "shfmt"
options = [
"-i",
"2", # indent 2
"-s", # simplify the code
"-w", # write back to the file
]
includes = ["*.sh"]
excludes = ["./scripts/hetzner-dedicated-wipe-and-install-nixos.sh"]
2023-12-08 22:47:37 +01:00
#[formatter.shellcheck]
#command = "shellcheck"
#includes = ["*.sh"]
#excludes = ["./scripts/hetzner-dedicated-wipe-and-install-nixos.sh"]
2023-04-26 09:23:56 +02:00
[formatter.python]
command = "black"
2023-07-01 00:20:03 +02:00
includes = ["*.py"]
[formatter.media]
command = "prettier"
options = ["--write"]
includes = [
"*.json",
"*.md",
"*.yaml",
"*.yml",
]
[formatter.terragrunt]
command = "terragrunt"
options = [ "hclfmt" ]
includes = [ "*.hcl" ]
excludes = [ "*/.terraform" ]
[formatter.terraform]
command = "terraform"
options = [ "fmt" ]
includes = [ "*.tf" ]
excludes = [ "*/.terraform" ]