Eslint-plugin-sonarjs: Prepending rules with "sonar" is redundant and inconsistant

If your question is about SonarLint in the IntelliJ Platform, VS Code, Visual Studio, or Eclipse, please post it in that sub-category.

Otherwise, please provide:

  • Operating system: N/A
  • IDE name and flavor/env: N/A

And a thorough description of the problem / question:

Some, not all, rules are prepended with “sonar”. This is done inconsistently.
It’s also redundant given that the rule’s name, when used, will include the plugin’s name. This affects the following rules:

  • sonarjs/sonar-block-scoped-var
  • sonarjs/sonar-jsx-no-leaked-render
  • sonarjs/sonar-max-lines
  • sonarjs/sonar-max-lines-per-function
  • sonarjs/sonar-max-params
  • sonarjs/sonar-no-control-regex
  • sonarjs/sonar-no-dupe-keys
  • sonarjs/sonar-no-empty-character-class
  • sonarjs/sonar-no-fallthrough
  • sonarjs/sonar-no-invalid-regexp
  • sonarjs/sonar-no-magic-numbers
  • sonarjs/sonar-no-misleading-character-class
  • sonarjs/sonar-no-regex-spaces
  • sonarjs/sonar-no-unused-class-component-methods
  • sonarjs/sonar-no-unused-vars
  • sonarjs/sonar-prefer-optional-chain
  • sonarjs/sonar-prefer-read-only-props

Hello @Avasam,

thank you for reporting this, this makes total sense. I created a ticket to change those: [ESLINTJS-57] - Jira

Also, highly appreciate the time you are taking providing all this valuable feedback!

Cheers

1 Like

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