This rule seems ok to me but the message is not convincing me. I would go for something more explicit about the fact that the return value of the method is ignored.
And we should be careful to not mix this rule with RSPEC-899:
* RSPEC-899 is about ignoring the result of a function call when this result indicates the status of the operation: KO, OK (so when exceptions are not used to trigger issues)
* This one RSPEC-2201, is about ignoring the result of a function call when this result contains the output of the operation
Hi [~ann.campbell.2], I don't understand why this rule is not part of "Sonar way" quality profile because for sure when an issue is raised this is bug.
I know [~ann.campbell.2], but for instance in Java we've tuned the rule to be sure at 100% that we're not generating any false-positives (by limiting the scope to calls to immutable objects) and I think we must do the same thing for the other targeted languages. So at least in Java, this rule must be activated by default (cc [~nicolas.peru]).
I created https://github.com/SonarSource/SonarJS/issues/1948[a new issue on the SonarJS GitHub tracker] but I'm not sure if the fault is in the rule itself or in the JS/TS implementation of the rule, so I thought it might be worth bringing up here.