diff --git a/lib/workers/repository/finalise/validate.js b/lib/workers/repository/finalise/validate.js index ae124639b6..af3590340c 100644 --- a/lib/workers/repository/finalise/validate.js +++ b/lib/workers/repository/finalise/validate.js @@ -1,3 +1,4 @@ +const JSON5 = require('json5'); const { migrateAndValidate } = require('../../../config/migrate-validate'); const { configFileNames } = require('../../../config/app-strings'); const { appName, appSlug } = require('../../../config/app-strings'); @@ -40,7 +41,12 @@ async function validatePrs(config) { } let parsed; try { - parsed = JSON.parse(content); + // istanbul ignore if + if (file.endsWith('.json5')) { + parsed = JSON5.parse(content); + } else { + parsed = JSON.parse(content); + } } catch (err) { validations.push({ file,