Deprecated JS/TS "for each...in" produce an Error '(' expected

Hello we analyse a code which is written in ES2015, which have now deprecated: “for each…in”
(https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for_each...in)

We get: “ERROR: Failed to parse file [testFileHere.ts] at line 31: ‘(’ expected.”

This is because of code snippet:
for each (var header in headers){
System.log(header.toString());
}

Where and how we can configure this one not to fail, but instead to be like: “code smell”?
Thanks for the help!

Hey there.

What version of SonarQube are you using?

Hi @Colin , for the server side I’m using sonarqube:8.6.1-community, also I have updated to sonarqube:9.3.0-community.
For client side it is “sonar-scanner-cli-4.6.0.2311-linux”