-
Notifications
You must be signed in to change notification settings - Fork 1
/
treefmt.toml
49 lines (44 loc) · 906 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
# SPDX-FileCopyrightText: 2022 The Standard Authors
# SPDX-FileCopyrightText: 2022 Kevin Amado <[email protected]>
#
# SPDX-License-Identifier: Unlicense
# One CLI to format the code tree - https://github.com/numtide/treefmt
[formatter.lua]
command = "stylua"
options = [
"--column-width", "120",
"--indent-type", "Spaces",
"--indent-width", "4",
"--line-endings", "Unix",
"--quote-style", "AutoPreferDouble",
]
includes = ["*.lua"]
[formatter.nix]
command = "alejandra"
includes = ["*.nix"]
[formatter.prettier]
command = "prettier"
options = ["--write"]
includes = [
"*.css",
"*.js",
"*.json",
"*.jsx",
"*.md",
"*.mdx",
"*.scss",
"*.ts",
"*.yaml",
]
[formatter.shell]
command = "shfmt"
options = [
"-i",
"2", # indent 2
"-s", # simplify the code
"-w", # write back to the file
]
includes = [
"*.sh",
"*.bash",
]