currently I am using SonarQube with SonarJS version 5.0 (build 6962). My source files are es2017 files which are transpiled using babel. Thus, there are some features, which lead Sonar into not beeing able to parse some source files.
Especially with using babel plugins, for instance ‘plugin-proposal-optional-chaining’, this leads into parser errors:
ERROR: Parse error at line 74 column 37:
we are in the process of migrating SonarJS to a new parser, which will support babel and consequently it will allow to use different ecma script proposals. With the latest SonarJS plugin you can already run some of the rules using this new parser and we will migrate all the other rules during this year.
You can forget about stages, as we don’t rely on them as we rely on babel parser now. Currently we use babel-eslint 10.0.1 version, I tested it, it seems to parse optional chaining.
A new version of our Javascript analyzer. The latest version is v6.2 – (you should make sure you upgrade the TypeScript analyzer to the latest version as well if you upgrade).
Hi,
We use sonarcloud with https://bitbucket.org/sonarsource/sonarcloud-scan/ (i.e. it’s dockerized artifact). Is there a way to upgrade it, for that our parser does not stumble upon the optional chaining?
Thanks,
thomas