diff --git a/lib/config-validator.ts b/lib/config-validator.ts
index 878b1710e1946335661588c2b01b5057325e0d3b..0de7daca3dbcd86df33814dd488cdca60b2d76e3 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;