I’ve read in multiple places that it’s “deprecated” to write javascript custom rules for Sonarqube and that we should use ESLint instead (which means rules won’t show in Sonarqube UI and won’t be part of quality profiles).
Could u tell us the reason for this ? Is SonarJS and your rules going to be deprecated too ?
Any information about this ? SonarJS custom rules are supposed to be “deprecated” since Sonraqube 6, is it going to be removed one day ? with SonarJS ? and why this loss
of functionality ?
Thank you for reaching out, and sorry it took this long to answer you.
To give you some context, the rules of the JavaScript analyser used to be written in Java. At that time, the support of custom rules was not deprecated. Then, we migrated all our rules to ESLint frontend, meaning we rewrote all our rules in TypeScript using ESLint API for rule definitions, among other things. Because of that major change, the support of custom rules became deprecated.
We plan to replace it with a fresh new support of ESLint-based custom rules at some point, but there is no clearly defined schedule for it yet. In the meaning, and as mentioned by the JavaScript analyser documentation, there exists a workaround for custom rules (see Custom rules for JS/TS section).