Mixing eslint custom rules and SonarJS rules?


(First I believe this post should belong to the “Get Help” category but for some reason the button “+ New Topic” is deactivated in this category)
Can both sonar JS and eslint JS rules co-exist? We want to use a mix few rules from sonarJS and few from eslint custom rules.
Can this be done?

Hello JPK,

Your custom rules based on EsLint should be imported via the external issues feature using the sonar.eslint.reportPaths key.
Your Javascript code will be scanned by the SonarJS and therefore SonarJS rules should also apply to you javascript code base according to your Quality Profile for javascript.

Let me know if you need further details,


So these imports are an addition right? We may still experience conflicting rules coming from Sonar that we have to disable?


Hey @Sjeiti

Correct – there’s no de-duplication.