Expected an assignment or function call and instead saw an expression
People who are looking how to suppress it when using ESLint. You can ingnore it by writing the following comment just above the line no-unused-expressions
// eslint-disable-next-line no-unused-expressions
You can also suppress the warning for the entire file by placing the following comment at the very top of the file
/* eslint-disable no-unused-expressions */
I don't think JSLint has an option to turn that off.
JSHint (a fork with more options) has an option for it, though: The expr
option, documented as "if ExpressionStatement should be allowed as Programs".
You can add the following line to ignore that warning:
/*jshint -W030 */
You can read more about it here.