Enable tsconfig noUncheckedIndexedAccess

This commit is contained in:
Jamie
2026-03-12 16:24:01 -07:00
committed by GitHub
parent 34b0f9cd50
commit 1d45a52da7
311 changed files with 2146 additions and 1589 deletions

View File

@@ -162,6 +162,7 @@ async function getCommitFileWasAdded(
const commitYear = new Date(dateString).getFullYear();
assert(!Number.isNaN(commitYear), `Could not read commit year for ${file}`);
assert(commitHash, 'Missing commitHash');
return { commitYear, commitHash };
}
@@ -196,7 +197,10 @@ async function main() {
const warnings = [];
if (!/Copyright \d{4} Signal Messenger, LLC/.test(firstLine)) {
if (
firstLine == null ||
!/Copyright \d{4} Signal Messenger, LLC/.test(firstLine)
) {
const commit = await getCommitFileWasAdded(file);
warnings.push(
chalk.red('Missing/Incorrect copyright line'),