mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-30 12:07:46 +00:00
chore: add treefmt - to format them all
- this is a unified & modern approch to keeping all files according to fmt-spec - has excellent editor integration
This commit is contained in:
parent
b72274b052
commit
0f227ee76a
3 changed files with 77 additions and 1 deletions
32
treefmt.toml
Normal file
32
treefmt.toml
Normal file
|
@ -0,0 +1,32 @@
|
|||
# One CLI to format the code tree - https://github.com/numtide/treefmt
|
||||
|
||||
[formatter.nix]
|
||||
command = "./target/debug/alejandra"
|
||||
includes = ["*.nix"]
|
||||
|
||||
[formatter.prettier]
|
||||
command = "prettier"
|
||||
options = ["--write"]
|
||||
includes = [
|
||||
"*.css",
|
||||
"*.html",
|
||||
"*.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"]
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue