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

@@ -174,7 +174,8 @@ async function lintMessages() {
const key = topProp.key.value;
if (process.argv.includes('--test')) {
const test = tests[key];
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const test = tests[key]!;
const actualErrors = reports.map(report => report.id);
deepEqual(actualErrors, test.expectErrors);
continue;

View File

@@ -37,7 +37,8 @@ export default rule('wrapEmoji', context => {
return;
}
const child = element.children[0];
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const child = element.children[0]!;
if (!isLiteralElement(child)) {
// non-literal
context.report(