no-unused-expressions
Configuration
rslint.config.ts
Rule Details
Disallow unused expressions. An unused expression is an expression that is evaluated but whose result is not used. This can indicate a mistake or a misunderstanding of the code.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Options
allowShortCircuit(default:false): Allow short-circuit evaluations (e.g.,a && a()).allowTernary(default:false): Allow ternary expressions (e.g.,a ? b() : c()).allowTaggedTemplates(default:false): Allow tagged template literals.enforceForJSX(default:false): Enforce the rule for JSX elements.ignoreDirectives(default:false): Ignore directive prologues.