Eslint 9.15 breaks the eslint plugin

look, I’m doing you guys a favour by filing a bug report, but you sure don’t make it easy to help you

this is for eslint-plugin-sonarjs but there’s no place for it

also, a community forum that requires a ton of steps doesn’t feel like a great way to file real issues. And the path to here just says to post here, doesn’t help me understand where I should post anything. I’m totally overwhelmed by the structure here, none of which matches the thing I’m trying to report on

anyway, eslint 9.15 includes a breaking change that breaks several rules. see also

1 Like

Hello @Brendan_Mulholland,

Thank you for your feedback.

This company-wide community forum may have more steps required to report a problem compared to opening an issue on a GitHub repository. I would greatly appreciate any suggestions you have, based on your experience of this forum, for improving the overall process.

Coming back to the problem you are experiencing, we are aware of a breaking change in ESLint 9.15 that makes it incompatible with the SonarJS ESLint plugin. We are currently working on a fix and plan to release it by the end of next week.

In the meantime, we recommend using ESLint version 9.14 as a temporary workaround.

I hope this helps!

Best regards,
Yassin

Hi Yassin,

Thanks for the update

In terms of this forum:

  1. Make a dedicated, clear section for eslint (I shouldn’t have to know whether this is “SonarQube Server” or what…)
  2. Keep it up to date
  3. Put a pinned Issue on Github Issues linking to it

Put it this way: I noticed the breakage when upgrading eslint. I opened the github repo. What’s the expected path for me to get from there to the known issue of eslint 9.15 you say you’re aware of?

As another suggestion: Since you’re using Jira for issue tracking, and a forum for us to interact with you, that means you all have to keep this forum up to date with known issues etc. In other words: you’ll have to duplicate information across Jira and here :\

Hopefully that’s some concrete steps to consider

Hi @Brendan_Mulholland,

can you please check eslint-plugin-sonarjs v3?

In v3 we removed many rules that were modified from external plugins (those were all added in 2.0.0). We decided that from now on, we will only publish rules that are our own implementation in the ESLint plugin. Otherwise, we were tightly coupled with specific versions of typescript-eslint and other dependencies that clashed with our users’ dependencies versions. The new README.md mentions this here and here which rules are no longer part of our plugin and which plugin/rule to install if needed.

This should fix the problem you have mentioned here.

Cheers

Unfortunately v3 does not fix the issue.
There is another, also ~3 weeks old topic with the same issue: `eslint-plugin-sonarjs` doesn’t work with eslint 9.15.0 - #5 by David_Gettins
When can we expect a fix?

Hello @szape89,

can you share the Error stack you are getting? We are testing in our CI against ESLint 9.15 and we don’t have any issue. A reproducer would be very appreciated.

Cheers,
Victor

The other topic I linked mentions both kind of errors, but after your clarification I tried again and could get it working. Its hard to follow changes of this plugin in the absence of a proper changelog and not a full git history, but correct me if there is one somewhere. Thank you!

To sum it up, the solution is to update to the latest version and get rid of removed rules.

Hi @szape89,

Yes, if you are still interested in having those rules enabled, I recommend installing and enabling them from their original plugin as listed in the last two sections of the README.

About the changelog, you can find it here

Cheers

1 Like