SonarQube: integrate ESLint for JavaScript into SonarQube?

We have defined our rules that should be used for JavaScript code using ESLint. Now we want to integrate ESLint into SonarQube , as we did before, similar to Checkstyle for JavaCode.

The following link describes why SonarQube does not want to provide a plugin for ESLint: http://www.sonarqube.org/sonarqube-javascript-plugin-why-compete-with-jslint-and-jshint/

Does SonarQube still have no ESLint plugin? Is this part of a marketing strategy? There is also a plugin for Checkstyle, FindBugs, etc. Why does SonarQube suddenly stop supporting the integration of other code analysis tools?

+11
source share
3 answers

Yes, there is still no plugin for ESLint, and this is part of the strategy, but in a different direction.

In fact, our first plugins were intended for external analyzers, and over time, we realized that simply combining the results of other tools does not really serve the community, because this community contacted us with rule errors, requests and suggestions for improvement - and all, what we could do was send them to tool manufacturers.

Therefore, instead, we began to write our own rules to increase efficiency and, as we believe, improve accuracy.

, , , Google Group SonarQube

. SonarJS ESLint.

+10

: https://github.com/sleroy/SonarEsLintPlugin

:

• Node.js

• EsLint (3+) npm, -g eslint ,

• , EsLint - C:\Users \ [ ]\AppData\Roaming\npm\node_modules\eslint\bin\eslint.js Windows

• Copy the .jar file (downloaded from https://github.com/sleroy/SonarEsLintPlugin/releases ) to the SonarQube extension folder

• Restart the SonarQube server

• Go to the SonarQube web interface, log in as Admin, open Settings

• Go to the "Rules" tab, then install the EsLint ruleset, then apply it to your project - change the activation of the rule if necessary.

+1
source

Source: https://habr.com/ru/post/1606927/


All Articles