diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 02d30d055c..6aa1386064 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -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"), ) diff --git a/tests/specs/fmt/njk/__test__.jsonc b/tests/specs/fmt/njk/__test__.jsonc index 8b6bc87d47..9062a36079 100644 --- a/tests/specs/fmt/njk/__test__.jsonc +++ b/tests/specs/fmt/njk/__test__.jsonc @@ -1,5 +1,14 @@ { "tempDir": true, - "args": "fmt --unstable-component", - "output": "[WILDLINE]badly_formatted.njk\nChecked 1 file\n" -} \ No newline at end of file + "steps": [ + { + "args": "fmt --unstable-component", + "output": "[WILDLINE]badly_formatted.njk\nChecked 1 file\n" + }, + { + "args": "fmt --unstable-component --ext=njk -", + "input": "

{{ \"Hello, world!\" |> toUpperCase }}\n

\n", + "output": "

\n {{ \"Hello, world!\" |> toUpperCase }}\n

\n" + } + ] +} diff --git a/tests/specs/fmt/vento/__test__.jsonc b/tests/specs/fmt/vento/__test__.jsonc index c3e3bbf7d1..a38036f455 100644 --- a/tests/specs/fmt/vento/__test__.jsonc +++ b/tests/specs/fmt/vento/__test__.jsonc @@ -1,5 +1,14 @@ { "tempDir": true, - "args": "fmt --unstable-component", - "output": "[WILDLINE]badly_formatted.vto\nChecked 1 file\n" -} \ No newline at end of file + "steps": [ + { + "args": "fmt --unstable-component", + "output": "[WILDLINE]badly_formatted.vto\nChecked 1 file\n" + }, + { + "args": "fmt --unstable-component --ext=vto -", + "input": "

{{ \"Hello, world!\" |> upper }}\n

\n", + "output": "

\n {{ \"Hello, world!\" |> upper }}\n

\n" + } + ] +}