(
/** @type {DataFile} */ file,
/** @type {Record<string, unknown> | undefined} */ options = {},
)
| 1704 | } |
| 1705 | |
| 1706 | async function assertFilePassesJsonLint( |
| 1707 | /** @type {DataFile} */ file, |
| 1708 | /** @type {Record<string, unknown> | undefined} */ options = {}, |
| 1709 | ) { |
| 1710 | try { |
| 1711 | jsonlint.parse(file.text, { |
| 1712 | ignoreBOM: false, |
| 1713 | ignoreComments: false, |
| 1714 | ignoreTrailingCommas: false, |
| 1715 | allowSingleQuotedStrings: false, |
| 1716 | allowDuplicateObjectKeys: false, |
| 1717 | ...options, |
| 1718 | }) |
| 1719 | } catch (err) { |
| 1720 | printErrorAndExit(err, [ |
| 1721 | `Failed strict jsonlint parse of file "./${file.path}"`, |
| 1722 | ]) |
| 1723 | } |
| 1724 | } |
| 1725 | |
| 1726 | async function assertFileValidatesAgainstSchema( |
| 1727 | /** @type {string} */ filepath, |
no test coverage detected