`sonarjs/todo-tag` can not be disabled with `eslint-disable-next-line`

Make sure to read this post before raising a thread here:

Then tell us:

  • What language is this for?

JavaScript

  • Which rule?

sonarjs/todo-tag

  • Why do you believe it’s a false-positive/false-negative?

Unable to disable the comment with next-line

  • Are you using
    • SonarQube Cloud?
    • SonarQube Server / Community Build - which version?
    • SonarQube for IDE - which IDE/version?
      • in connected mode with SonarQube Server / Community Build or SonarQube Cloud?

eslint-plugin-sonarjs

  • How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots)
// eslint-disable-next-line sonarjs/todo-tag
'@typescript-eslint/naming-convention': 0, // TODO: find better config
  ✘  sonarjs/todo-tag

     Complete the task associated to this "TODO" comment


     packages/eslint-config/overrides.js:156:41
     154 |     '@typescript-eslint/explicit-module-boundary-types': 0,
     155 |     '@typescript-eslint/member-ordering': 2,
   > 156 |     // eslint-disable-next-line sonarjs/todo-tag
         |                                         ^
     157 |     '@typescript-eslint/naming-convention': 0, // TODO: find better config
     158 |     '@typescript-eslint/no-empty-function': 2,
     159 |     '@typescript-eslint/no-extraneous-class': [

✘ 1 problem (1 error, 0 warnings)

Hey there.

Thanks for the report! This is a known issue and I’ve linked this thread to that ticket. JS-485

1 Like

Indeed, duplicate of ESLint rule for Todo (S1135) didn’t work well with eslint-disable - Rules and Languages / Report False-positive / False-negative… - Sonar Community

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