JavaScript Plugin for Marketplace Instructions?

Dear SonarQube Community:

My team and I recently created a Marketplace Java plugin with internationalization rule checks. We’d like to create a Marketplace i18n plugin for JavaScript internationalization rule checks. Is this possible?

If so, is this the right document to get us started?

Thanks, in advance, for your help,
Craig Cummings
VMware Globalization Team

hello Craig,

we are currently in the process of rewriting our JavaScript plugin to be based on ESlint and espree parser. As you can see in the documentation, JavaScript custom rules based on the old parser are deprecated. For the future it is better to write your custom rules using ESLint and import the result with external issues report.

Thanks for the quick response Tibor. We’ll take a look at ESLint and how to share via the external issues report. The JS i18n rules are pretty much ready right now (just as additional rules to SonarJS to see how they would work).

Hope to have the ESLint pieces ready sooner than later. Recommendations how best to share our results with the community would be welcome.

Import of external eslint issues is already possible using sonar.eslint.reportPaths property. More documentation is available here [External Analyzer Reports] Report generation for various languages

Java based rules for SonarJS are deprecated and support for them will be removed from SonarJS eventually, you can use them in the interim, but you should migrate to ESLint (check the eslint documentation ).

1 Like

About sharing your rules with community, as the feature is deprecated, there probably isn’t a lot of value to publish them as a plugin to the marketplace. Maybe you can share your implementation, so the people can take inspiration from the idea of the rules. Then they can be reimplemented as eslint rules and shared with everyone using eslint.