diff options
author | Satya Rohith <me@satyarohith.com> | 2021-02-18 22:01:32 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-18 17:31:32 +0100 |
commit | d9b1f96897239bf7de8cdfd11d40e3f99bb29a4a (patch) | |
tree | 4a1c60d4850111f738b485bbad5f43659bd9ed09 /cli/flags.rs | |
parent | c0f10e72ee64f1512e6aff20a841f4696e774217 (diff) |
feat: add json(c) support to deno fmt (#9292)
This commit adds support for formatting JSON and JSONC
in "deno fmt".
New values "json" and "jsonc" are added to "--ext" flag for
standard input processing.
Diffstat (limited to 'cli/flags.rs')
-rw-r--r-- | cli/flags.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/flags.rs b/cli/flags.rs index 80ad6e240..c58e3e3d4 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -797,7 +797,7 @@ fn fmt_subcommand<'a, 'b>() -> App<'a, 'b> { SubCommand::with_name("fmt") .about("Format source files") .long_about( - "Auto-format JavaScript, TypeScript and Markdown files. + "Auto-format JavaScript, TypeScript, Markdown, and JSON files. deno fmt deno fmt myfile1.ts myfile2.ts deno fmt --check @@ -823,7 +823,7 @@ Ignore formatting a file by adding an ignore comment at the top of the file: .help("Set standard input (stdin) content type") .takes_value(true) .default_value("ts") - .possible_values(&["ts", "tsx", "js", "jsx", "md"]), + .possible_values(&["ts", "tsx", "js", "jsx", "md", "json", "jsonc"]), ) .arg( Arg::with_name("ignore") |