Remove use of deprecated context.parserServices (#57128)

This commit is contained in:
Jake Bailey 2024-01-22 11:40:13 -08:00 committed by GitHub
parent 7c31394af1
commit 2e3b8af85e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -177,8 +177,8 @@ module.exports = createRule({
}
const getSignature = memoize(() => {
if (context.parserServices?.program) {
const parserServices = ESLintUtils.getParserServices(context);
const parserServices = ESLintUtils.getParserServices(context, /*allowWithoutFullTypeInformation*/ true);
if (parserServices.program) {
const checker = parserServices.program.getTypeChecker();
const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
return checker.getResolvedSignature(tsNode);