From f10cafbaad3900f97f2cf60bc43fbc65edadb768 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Mon, 27 Jul 2020 08:17:10 +0200
Subject: [PATCH] fix(config-validator): correct json5 check

---
 lib/config-validator.ts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/config-validator.ts b/lib/config-validator.ts
index 878b1710e1..0de7daca3d 100644
--- a/lib/config-validator.ts
+++ b/lib/config-validator.ts
@@ -20,13 +20,13 @@ async function validate(
   const res = await validateConfig(massageConfig(config), isPreset);
   if (res.errors.length) {
     console.log(
-      `${desc} contains errors:\n\n${JSON5.stringify(res.errors, null, 2)}`
+      `${desc} contains errors:\n\n${JSON.stringify(res.errors, null, 2)}`
     );
     returnVal = 1;
   }
   if (res.warnings.length) {
     console.log(
-      `${desc} contains warnings:\n\n${JSON5.stringify(res.warnings, null, 2)}`
+      `${desc} contains warnings:\n\n${JSON.stringify(res.warnings, null, 2)}`
     );
     returnVal = 1;
   }
@@ -46,7 +46,7 @@ type PackageJson = {
       console.log(`Validating ${file}`);
       try {
         let jsonContent;
-        if (file.endsWith('.json5)')) {
+        if (file.endsWith('.json5'))) {
           jsonContent = JSON5.parse(rawContent) as PackageJson;
         } else {
           jsonContent = JSON.parse(rawContent) as PackageJson;
-- 
GitLab