0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-04 09:57:11 -05:00

fix(fmt): support "--ext vto" and "--ext njk" (#28262)

This commit is contained in:
Nayeem Rahman 2025-02-24 12:09:53 +00:00 committed by Divy Srivastava
parent 294b13c227
commit 63a7f4bccf
3 changed files with 25 additions and 7 deletions

View file

@ -2281,7 +2281,7 @@ Ignore formatting a file by adding an ignore comment at the top of the file:
.value_parser([
"ts", "tsx", "js", "jsx", "md", "json", "jsonc", "css", "scss",
"sass", "less", "html", "svelte", "vue", "astro", "yml", "yaml",
"ipynb", "sql"
"ipynb", "sql", "vto", "njk"
])
.help_heading(FMT_HEADING).requires("files"),
)

View file

@ -1,5 +1,14 @@
{
"tempDir": true,
"args": "fmt --unstable-component",
"output": "[WILDLINE]badly_formatted.njk\nChecked 1 file\n"
}
"steps": [
{
"args": "fmt --unstable-component",
"output": "[WILDLINE]badly_formatted.njk\nChecked 1 file\n"
},
{
"args": "fmt --unstable-component --ext=njk -",
"input": "<h1> {{ \"Hello, world!\" |> toUpperCase }}\n </h1>\n",
"output": "<h1>\n {{ \"Hello, world!\" |> toUpperCase }}\n</h1>\n"
}
]
}

View file

@ -1,5 +1,14 @@
{
"tempDir": true,
"args": "fmt --unstable-component",
"output": "[WILDLINE]badly_formatted.vto\nChecked 1 file\n"
}
"steps": [
{
"args": "fmt --unstable-component",
"output": "[WILDLINE]badly_formatted.vto\nChecked 1 file\n"
},
{
"args": "fmt --unstable-component --ext=vto -",
"input": "<h1> {{ \"Hello, world!\" |> upper }}\n </h1>\n",
"output": "<h1>\n {{ \"Hello, world!\" |> upper }}\n</h1>\n"
}
]
}