SonarJS
SonarJS copied to clipboard
JS: False-positive for undefined variable inside a returned object
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
}
}