I am looking for an eslint rule to toggle a check to use a value from a function with no return.
As of now, I was using the strongloop config and came across this important use case check that my config is missing:
// ********
// aCtrl.js
// ********
function a() {
// Does work with no return
}
module.exports = {a};
// ********
// index.js
// ********
const aCtrl = require(".../aCtrl");
const useless = aCtrl.a();
As you can see, a() has no return, yet useless is assigned the return value of a(). I'm hoping to catch this with eslint so that this mistake does not lead to a runtime error resulting from useless being used downstream.