-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtreefmt.toml
50 lines (43 loc) · 893 Bytes
/
treefmt.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
[formatter.rust]
command = "cargo"
options = ["fmt", "--all", "--verbose", "--"]
includes = ["*.rs"]
[formatter.clang-format]
command = "clang-format"
options = ["-i", "--Werror", "--verbose"]
includes = ["*.proto"]
[formatter.prettier]
command = "prettier"
options = ["--write"]
includes = [
"*.css",
"*.html",
"*.js",
"*.json",
"*.jsx",
"*.md",
"*.mdx",
"*.scss",
"*.ts",
"*.yaml",
]
[formatter.toml]
command = "taplo"
options = ["format", "$@"]
includes = ["*.toml"]
[formatter.nix]
command = "nixpkgs-fmt"
includes = ["*.nix"]
[formatter.shell]
command = "sh"
options = ["-eucx", """
# Perform static analysis tool
shellcheck --external-sources --source-path=SCRIPTDIR "$@"
# Run formatter
shfmt --write --simplify --case-indent --indent 4 "$@"
""", "--"]
includes = ["*.sh"]
[formatter.hcl]
command = "hclfmt"
options = ["-w"]
includes = ["*.hcl"]