alecmev
(Alec)
August 23, 2024, 12:24pm
1
S128 rule (sonar-no-fallthrough
) uses CodePath#currentSegments
, which has been removed in ESLint 9 :
This results in a crash in any switch-case
:
TypeError: Cannot read properties of undefined (reading 'some')
Rule: "sonarjs/sonar-no-fallthrough"
at SwitchCase:exit (/.../node_modules/eslint-plugin-sonarjs/lib/S128/rule.js:88:69)
2 Likes
mmospanenko
(Maksym Mospanenko)
August 24, 2024, 12:02pm
3
Having the same issue, had to disable
'sonarjs/sonar-no-fallthrough': 'off',
Hello @alecmev and @mmospanenko ,
thanks for reporting this. I created a ticket to handle this as soon as possible.
Cheers,
Victor
1 Like
this is the same problem with the sonarjs/prefer-enum-initializers
rule
Hello @someoneinthe ,
I guess you refer to this post .
I was precisely checking that right now and it’s not exactly the same problem, this rule is completely implemented by us, while sonarjs/prefer-enum-initializers
is extending the original implementation of typescript-eslint .
ok, my bad, you’re right.
I was just implementing the v2 of this plugin, and those 2 rules were broken, with the same error.
1 Like
system
(system)
Closed
September 3, 2024, 5:22pm
11
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.