Affects PMD Version: Not sure, in codacy it give since 5.0
Rule:
Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/latest/pmd_rules_ecmascript_codestyle.html#unnecessaryblock
Description:
Created a named exported function that returns an object. This function is pushed to codacy.com which uses PMD. Codacy reports it as an unnecessary block. I am not sure if this false positive and what I am missing here.

Code Sample demonstrating the issue:
Expected outcome:
PMD reports a violation at line 188 in the screenshot, but that's wrong. That's a false positive.
Running PMD through: Codacy
Affects PMD Version: Not sure, in codacy it give since 5.0
Rule:
Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/latest/pmd_rules_ecmascript_codestyle.html#unnecessaryblock
Description:
Created a named exported function that returns an object. This function is pushed to codacy.com which uses PMD. Codacy reports it as an unnecessary block. I am not sure if this false positive and what I am missing here.
Code Sample demonstrating the issue:
Expected outcome:
PMD reports a violation at line 188 in the screenshot, but that's wrong. That's a false positive.
Running PMD through: Codacy