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/tests/badly_formatted_fixed.md | |
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/tests/badly_formatted_fixed.md')
-rw-r--r-- | cli/tests/badly_formatted_fixed.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/tests/badly_formatted_fixed.md b/cli/tests/badly_formatted_fixed.md index 359a8aead..8ba74cac3 100644 --- a/cli/tests/badly_formatted_fixed.md +++ b/cli/tests/badly_formatted_fixed.md @@ -21,3 +21,17 @@ function foo(): number { return 2; } ``` + +```jsonc +{ + // Comment in JSON + "key": "value", + "key2": "value2" +} +``` + +```json +{ + "numbers": ["1", "2"] +} +``` |