Why am I encountering an ESLint error when using Ternary with 2 statements here?
ESLint Error: no-unused-expressions
res?.isSuccessful ?
(this.toastService.showToast(res.message, 'success'), this.queueDataService.addMember(attendee)) :
this.toastService.showToast(res.message, 'warning');
No ESLint Error
res.isSuccessful ?
(this.toastService.showToast(res.message, 'success')) :
this.toastService.showToast(res.message, 'warning');
ESLint Configuration
"@typescript-eslint/no-unused-expressions": [
"error",
{
"allowTernary": true,
}
]