How to make SonarJS show ESLint issues?

1.1k Views Asked by At

I am trying to import ESLint issues to SonarQube by the following:
eslint -f json -o report.json .
And then running sonar-scanner with key -Dsonar.eslint.reportPaths=report.json.

However, SonarQube analysis reports only issues for rules provided by the repository SonarAnalyzer. How can I make SonarQube to report ESLint issues as well?

1

There are 1 best solutions below

0
On

First create the Report:

eslint src/ --format json --output-file eslintreport.json

Then change your sonar configurations,

Here a good Video: https://www.youtube.com/watch?v=kghYozZD6UQ