We need to use @typescript-eslint/no-unused-expressions instead of ESlint no-unused-expressions , because it can't handle optional chaining.
This code emits warning Expected an assignment or function call and instead saw an expression.
Related:
typescript-eslint/typescript-eslint#1241 (comment)
We need to use
@typescript-eslint/no-unused-expressionsinstead of ESlintno-unused-expressions, because it can't handle optional chaining.This code emits warning
Expected an assignment or function call and instead saw an expression.Related:
typescript-eslint/typescript-eslint#1241 (comment)