Reputation: 129
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.
Upvotes: 11
Views: 1225
Reputation: 3665
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.
Upvotes: 1