We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba4cb25 commit 597b90fCopy full SHA for 597b90f
src/rules/no-discarded-pure-expression.ts
@@ -39,7 +39,7 @@ export default createRule({
39
pipe(
40
pureDataPrefixes,
41
array.some((prefix) =>
42
- t.symbol.escapedName.toString().startsWith(prefix)
+ t.symbol?.escapedName.toString().startsWith(prefix)
43
)
44
45
);
src/utils.ts
@@ -399,7 +399,11 @@ export const contextUtils = <
399
}
400
401
function parserServices(): Option<ParserServices> {
402
- return pipe(context.parserServices, option.fromNullable);
+ return pipe(
403
+ context.parserServices,
404
+ option.fromNullable,
405
+ option.filter((parserServices) => parserServices.hasFullTypeInformation)
406
+ );
407
408
409
function typeOfNode(node: TSESTree.Node): Option<ts.Type> {
0 commit comments