Sergejs Degtjars
Sergejs Degtjars

Reputation: 41

How to disable Sensor ESLint-based SonarJS?

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?

Upvotes: 2

Views: 2413

Answers (1)

Elena Vilchik
Elena Vilchik

Reputation: 1090

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.

Upvotes: 2

Related Questions