no-unused-expressions
)This rule aims to eliminate unused expressions which have no effect on the state of the program.
This rule extends the base eslint/no-unused-expressions
rule. It supports all options and features of the base rule. This version adds support for numerous typescript features.
{ // note you must disable the base rule as it can report incorrect errors "no-unused-expressions": "off", "@typescript-eslint/no-unused-expressions": ["error"] }
See eslint/no-unused-expressions
options.
Taken with ❤️ from ESLint core