Some of our dev groups are using JSHint for code quality and we are looking to adopt SonarQube for greater transparency. Sonar explained they want to maintain their own rules list here: The Sonarway
Is there a way to easily map existing JSHint rules into the "Sonarway" equivalents? We'd like to maintain 1 set of rules for JS.
It depends what you mean with mapping. JSHint has a list of built-in rules, some of which your developers will have enabled.
For each of the rules they have enabled, they'll need to find the equivalent in the SonarQube list of rules. (I'd suggest making a shared spreadsheet, so this lookup only needs to happen once.)
Should there be any rules that don't have a SonarQube equivalent yet, they will need to write such a rule themselves. Here is an example rule. The code will probably be similar to what JSHint uses internally; however, JSHint does not have separate files per rule.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With