From 9cc5d4f1629a153566b58d29f4f66a33d283a71a Mon Sep 17 00:00:00 2001 From: Ika Date: Fri, 27 Apr 2018 00:09:36 +0800 Subject: [PATCH] fix(json): jsonc is considered JSON instead of JSON5 (#4374) * fix(json): jsonc in consider JSON instead of JSON5 * feat: add json5 id --- src/language-js/index.js | 4 ++-- .../__tests__/__snapshots__/support-info.js.snap | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/language-js/index.js b/src/language-js/index.js index b9e56159..adb09b57 100644 --- a/src/language-js/index.js +++ b/src/language-js/index.js @@ -146,7 +146,7 @@ const languages = [ "mcmod.info" ], linguistLanguageId: 174, - vscodeLanguageIds: ["json"] + vscodeLanguageIds: ["json", "jsonc"] }, { name: "JSON5", @@ -160,7 +160,7 @@ const languages = [ extensions: [".json5"], filenames: [".babelrc"], linguistLanguageId: 175, - vscodeLanguageIds: ["jsonc"] + vscodeLanguageIds: ["json5"] } ]; diff --git a/tests_integration/__tests__/__snapshots__/support-info.js.snap b/tests_integration/__tests__/__snapshots__/support-info.js.snap index 434d7ae4..7f5c4d35 100644 --- a/tests_integration/__tests__/__snapshots__/support-info.js.snap +++ b/tests_integration/__tests__/__snapshots__/support-info.js.snap @@ -547,7 +547,7 @@ exports[`CLI --support-info (stdout) 1`] = ` \\"parsers\\": [\\"json\\"], \\"since\\": \\"1.5.0\\", \\"tmScope\\": \\"source.json\\", - \\"vscodeLanguageIds\\": [\\"json\\"] + \\"vscodeLanguageIds\\": [\\"json\\", \\"jsonc\\"] }, { \\"aceMode\\": \\"css\\",