Will SonarJS rules be available in eslint-plugin-sonarjs?

It seems SonarJs has some rules that are not available from eslint-plugin-sonarjs. This means running ESLint with eslint-plugin-sonarjs alone doesn’t catch all the issues that SonarCloud will catch.

Is there a plan to make these rules available from eslint-plugin-sonarjs?

Another question on the same topic: Add deprecation rule in eslint-plugin-sonarjs.

Hello @tewson-bf,

Thank you for your message, and welcome to SonarSource community !

We will discuss internally the point that you are raising, and we will come back to you afterwards. In the meantime, we would really appreciate if you could clarify why you would need all SonarJS rules be available in eslint-plugin-sonarjs.

As you probably know, SonarJS rules are already all available in our products, namely SonarQube, SonarCloud, and SonarLint. Also, there are some rules, like taint analysis ones, that can’t be made available in eslint-plugin-sonarjs because of the technology such rules require under the hood.

Once again, please share with us why you feel that SonarJS rules should be available in eslint-plugin-sonarjs. This could help us understand a possible problem users are facing that we might not be aware of.

Best regards,
Yassin

Hi @Yassin,

Thank you for your reply.

I suppose it’s about expectation on what rules are available from what project. I assumed from the eslint-plugin-sonarjs README that it would include all SonarJS rules.

Screenshot 2021-05-14 at 12.05.45
Screenshot 2021-05-14 at 12.05.34

Maybe the documentation could clarify that eslint-plugin-sonarjs contains only some rules?

I’ve also found other projects that try to bring SonarJS rules into an ESLint plugin as well, such as GitHub - rx-ts/eslint-plugin-sonar: [ESLint](https://github.com/eslint/eslint) rules extracted from [SonarJS](https://github.com/SonarSource/SonarJS). So there seems to be a demand for this.

Thank you for the clarification. We will take that into account during our discussion.

1 Like

Appreciate the fast response! :+1:

Hello @tewson-bf,

We had a meeting on that topic, and we decided that we will make available as many SonarJS rules as we can in eslint-plugin-sonarjs. As I mentioned in a previous message, that won’t be the case for some rules, namely hotspot rules and taint analysis rules.

Although we don’t have an exact date of when this will happen, we expect to start this process by the end of the year.

Regards,
Yassin

Hi @Yassin. That’s great news! Thank you for getting back to me.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.