Enable no-unsafe-return rule

This commit is contained in:
Henry Mercer 2024-06-13 19:52:39 +01:00
parent 2f54d9fcfa
commit 1ea11ca775
16 changed files with 30 additions and 26 deletions

View file

@ -120,7 +120,7 @@ export function getExtraOptionsEnvParam(): object {
return {};
}
try {
return JSON.parse(raw);
return JSON.parse(raw) as object;
} catch (unwrappedError) {
const error = wrapError(unwrappedError);
throw new ConfigurationError(
@ -888,7 +888,7 @@ export function parseMatrixInput(
if (matrixInput === undefined || matrixInput === "null") {
return undefined;
}
return JSON.parse(matrixInput);
return JSON.parse(matrixInput) as { [key: string]: string };
}
function removeDuplicateLocations(locations: SarifLocation[]): SarifLocation[] {