[JS] [S1444] Incorrect behavior in JS files

I can’t use the readonly modifier in .js files, since this feature is only available in .ts files.

src/libs/components/app/app.js
  11:9  error  Make this public static property readonly  sonarjs/public-static-readonly

Moreover, even when using JSDoc syntax, it doesn’t help (Documentation - JSDoc Reference), the property becomes private for TypeScript, but the rule still triggers the linter issue.

Could you please tell me how to resolve this issue without disabling the rule itself?

Hey there.

Which version of https://www.npmjs.com/package/eslint-plugin-sonarjs are you using?

Hey Colin! and I’m using eslint-plugin-sonarjs version 3.0.5, eslint version 9.38.0, and Node.js version 24.11.0 (all lates version for now)

Hello @what1s1ove,

thanks for raising this. I’ve created a ticket to fix this.

Cheers!

Hey Victor! Thank you!

Do you know if this topic will receive a notification when the issue is resolved?

Hi @what1s1ove,

No, sorry. You will need to follow the progress in the Jira ticket.