@putout/plugin-remove-unused-expressions 
Putout plugin adds ability to find and remove unused expressions, excluding directives: use strict and use client.
Install
npm i @putout/plugin-remove-unused-expressions -D
Rule
{
"rules": {
"remove-unused-expressions": "on"
}
}
Example of incorrect code
function show(error) {
showError;
}
Example of correct code
function show(error) {}
License
MIT