Lint the language service package

This commit is contained in:
Josh Gross
2023-03-20 13:33:58 -04:00
parent a1d110dc33
commit 9ef34c7e41
11 changed files with 69 additions and 61 deletions
+3 -2
View File
@@ -155,7 +155,8 @@ async function getDescription(
function isCronMappingValue(tokenResult: TokenResult): boolean {
return (
tokenResult.parent?.definition?.key === "cron-mapping" &&
isString(tokenResult.token!) &&
!!tokenResult.token &&
isString(tokenResult.token) &&
tokenResult.token.value !== "cron"
);
}
@@ -199,7 +200,7 @@ function expressionHover(
};
} catch (e) {
// Hovering over an invalid expression should not cause an error here
info(`Encountered error trying to calculate expression hover: ${e}`);
info(`Encountered error trying to calculate expression hover: ${(e as Error).message}`);
return null;
}
}