How to disable Sensor ESLint-based SonarJS?

2.1k views Asked by At

In our environment we already use ESLint to produce json report. Starting from Sonarqube 7.2, SonarJS plugin can import this report file.

But I see in analysis report that some Sensor ESLint-based SonarJS also starting. But this one does not understand our React based project sysntax, and trying to do dual work, actualy Is there any way to disable this sensor?

1

There are 1 answers

1
Elena Vilchik On

You should not disable this sensor. Currently SonarJS is gradually migrated from its own parser to espree (ESLint parser). Sensor ESLint-based SonarJS runs rules on espree-compalible AST. Currently it's only small subset of rules, but in future entire SonarJS functionality (rules, metrics, highlighting) will be based on it. Sensor ESLint-based SonarJS doesn't rely on your eslint configuration, currently it executes only rules activated in SonarQube and having eslint-based implementation.

The right action to make is to report to SonarJS team the problem you have with parsing you React project code.