SonarJS icon indicating copy to clipboard operation
SonarJS copied to clipboard

JS: False-positive for undefined variable inside a returned object

Open leonardjaviniar opened this issue 6 years ago • 0 comments

I want to report a bug.

SonarJS version: 5.1 (as of SonarLint 1.6.0)
SonarLint version: 1.10.0

Reproducer

function foo() {
    return {
        bar: buzz
    }
}

Expected behavior

function foo() {
    return {
        bar: buzz // --> buzz should be reported/highlighted as an undefined variable
    }
}

leonardjaviniar avatar Aug 30 '19 13:08 leonardjaviniar