# Eslint 9.15 breaks the eslint plugin

**URL:** <https://community.sonarsource.com/t/eslint-9-15-breaks-the-eslint-plugin/130724>\
**Category:** SonarQube Server / Community Build\
**Tags:** bug, eslint\
**Created:** [November 19, 2024, 3:50pm UTC](https://community.sonarsource.com/t/eslint-9-15-breaks-the-eslint-plugin/130724 "2024-11-19T15:50:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brendan\_Mulholland](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/brendan_mulholland/32/36371_2.png) [@Brendan\_Mulholland](https://community.sonarsource.com/u/Brendan_Mulholland)\
**Post date:** [November 19, 2024, 3:50pm UTC](https://community.sonarsource.com/t/eslint-9-15-breaks-the-eslint-plugin/130724/1 "2024-11-19T15:50:04Z")

</div>

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

> <https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2496>
>
> \`unicorn/expiring-todo-comments\` Broken in ESlint \`9.15.0\`. Works fine in \`9.14.…0\`.
> 
> \> TypeError: Error while loading rule 'unicorn/expiring-todo-comments': Cannot read properties of undefined (reading 'decoration')
> 
> The above error occurs when reading a file that has the following comment:
> 
> \`\`\`js
> // Note: If none of the slotted options are selected, select all
> \`\`\`
> 
> Relevant portion of ESLint config is:
> 
> \`\`\`js
> {
> files: \['\*\*/\*'\],
> extends: \[eslint.configs.recommended, unicorn.configs\['flat/recommended'\]\],
> linterOptions: {
> reportUnusedDisableDirectives: true,
> },
> },
> \`\`\`

> <https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2500>
>
> Something went wrong. This is likely an internal error of \`eslint-remote-tester-…run-action\`.
> 
> \<details\>
> \<summary\>Click to expand\</summary\>
> 
> \`\`\`
> Error: Configuration validation errors:
> \- eslintConfig: Error while loading rule 'unicorn/expiring-todo-comments': Cannot read properties of undefined (reading 'decoration')
> Occurred while linting /github/workspace/\_\_placeholder\_\_.js
> at validate (file:///github/workspace/node\_modules/eslint-remote-tester/dist/config/validator.js:149:19)
> at async runTester (file:///index.mjs:26783:3)
> \`\`\`
> 
> \</details\>

> <https://github.com/typescript-eslint/typescript-eslint/issues/10338>
>
> \### Before You File a Bug Report Please Confirm You Have Done The Following...
> 
> …- \[X\] I have tried restarting my IDE and the issue persists.
> \- \[X\] I have updated to the latest version of the packages.
> \- \[X\] I have \[searched for related issues\](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3Abug) and found none that matched my issue.
> \- \[X\] I have \[read the FAQ\](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed.
> 
> \### Issue Description
> 
> eslint crashes when using the latest version of node 22 and the latest version of typescript-eslint.
> 
> \`\`\`
> Oops! Something went wrong! :(
> 
> ESLint: 9.15.0
> 
> TypeError: Error while loading rule '@typescript-eslint/no-unused-expressions': Cannot read properties of undefined (reading 'allowShortCircuit')
> Occurred while linting /home/ext4cats/Projects/tseslint-8.14.0-bug/index.js
> at Object.create (/home/ext4cats/Projects/tseslint-8.14.0-bug/node\_modules/.pnpm/eslint@9.15.0/node\_modules/eslint/lib/rules/no-unused-expressions.js:75:13)
> at create (/home/ext4cats/Projects/tseslint-8.14.0-bug/node\_modules/.pnpm/@typescript-eslint+eslint-plugin@8.14.0\_@typescript-eslint+parser@8.14.0\_eslint@9.15.0\_typesc\_u2crwq53uno6k5fweinf7nowby/node\_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js:28:32)
> at Object.create (/home/ext4cats/Projects/tseslint-8.14.0-bug/node\_modules/.pnpm/@typescript-eslint+utils@8.14.0\_eslint@9.15.0\_typescript@5.6.3/node\_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js:31:20)
> at createRuleListeners (/home/ext4cats/Projects/tseslint-8.14.0-bug/node\_modules/.pnpm/eslint@9.15.0/node\_modules/eslint/lib/linter/linter.js:944:21)
> at /home/ext4cats/Projects/tseslint-8.14.0-bug/node\_modules/.pnpm/eslint@9.15.0/node\_modules/eslint/lib/linter/linter.js:1082:84
> at Array.forEach (\<anonymous\>)
> at runRules (/home/ext4cats/Projects/tseslint-8.14.0-bug/node\_modules/.pnpm/eslint@9.15.0/node\_modules/eslint/lib/linter/linter.js:1013:34)
> at #flatVerifyWithoutProcessors (/home/ext4cats/Projects/tseslint-8.14.0-bug/node\_modules/.pnpm/eslint@9.15.0/node\_modules/eslint/lib/linter/linter.js:1911:31)
> at Linter.\_verifyWithFlatConfigArrayAndWithoutProcessors (/home/ext4cats/Projects/tseslint-8.14.0-bug/node\_modules/.pnpm/eslint@9.15.0/node\_modules/eslint/lib/linter/linter.js:1993:49)
> at Linter.\_verifyWithFlatConfigArray (/home/ext4cats/Projects/tseslint-8.14.0-bug/node\_modules/.pnpm/eslint@9.15.0/node\_modules/eslint/lib/linter/linter.js:2082:21)
> \`\`\`
> 
> \### Reproduction Repository Link
> 
> https://github.com/ext4cats/tseslint-8.14.0-bug
> 
> \### Repro Steps
> 
> 1) clone the repo
> 2) follow steps in readme
> 
> 
> \### Versions
> 
> 
> | package | version |
> | -------------------------------------- | --------- |
> | \`typescript-eslint\` | \`8.14.0\` |
> | \`TypeScript\` | \`5.6.3\` |
> | \`ESLint\` | \`9.15.0\` |
> | \`node\` | \`22.11.0\` |

---

<div class="post-metadata">

**Author:** ![Yassin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/yassin/32/36096_2.png) [@Yassin](https://community.sonarsource.com/u/Yassin)\
**Post date:** [November 21, 2024, 10:49am UTC](https://community.sonarsource.com/t/eslint-9-15-breaks-the-eslint-plugin/130724/3 "2024-11-21T10:49:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Brendan\_Mulholland](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/brendan_mulholland/32/36371_2.png) [@Brendan\_Mulholland](https://community.sonarsource.com/u/Brendan_Mulholland)\
**Post date:** [November 21, 2024, 3:33pm UTC](https://community.sonarsource.com/t/eslint-9-15-breaks-the-eslint-plugin/130724/4 "2024-11-21T15:33:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![victor.diez](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/victor.diez/32/38525_2.png) [@victor.diez](https://community.sonarsource.com/u/victor.diez)\
**Post date:** [December 5, 2024, 12:31pm UTC](https://community.sonarsource.com/t/eslint-9-15-breaks-the-eslint-plugin/130724/8 "2024-12-05T12:31:37Z")

</div>

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](https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/README.md#eslint-rules) and [here](https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/README.md#improved-eslint-rules) 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

---

<div class="post-metadata">

**Author:** ![szape89](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/szape89/32/64937_2.png) [@szape89](https://community.sonarsource.com/u/szape89)\
**Post date:** [December 10, 2024, 9:31am UTC](https://community.sonarsource.com/t/eslint-9-15-breaks-the-eslint-plugin/130724/9 "2024-12-10T09:31:43Z")

</div>

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](https://community.sonarsource.com/t/eslint-plugin-sonarjs-doesn-t-work-with-eslint-9-15-0/130771/5)  
When can we expect a fix?

---

<div class="post-metadata">

**Author:** ![victor.diez](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/victor.diez/32/38525_2.png) [@victor.diez](https://community.sonarsource.com/u/victor.diez)\
**Post date:** [December 10, 2024, 9:55am UTC](https://community.sonarsource.com/t/eslint-9-15-breaks-the-eslint-plugin/130724/10 "2024-12-10T09:55:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![szape89](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/szape89/32/64937_2.png) [@szape89](https://community.sonarsource.com/u/szape89)\
**Post date:** [December 10, 2024, 2:00pm UTC](https://community.sonarsource.com/t/eslint-9-15-breaks-the-eslint-plugin/130724/11 "2024-12-10T14:00:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![victor.diez](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/victor.diez/32/38525_2.png) [@victor.diez](https://community.sonarsource.com/u/victor.diez)\
**Post date:** [December 10, 2024, 2:14pm UTC](https://community.sonarsource.com/t/eslint-9-15-breaks-the-eslint-plugin/130724/12 "2024-12-10T14:14:10Z")

</div>

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](https://github.com/SonarSource/SonarJS/tree/master/packages/jsts/src/rules#readme).

About the changelog, you can find it [here](https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/CHANGELOG.md)

Cheers
