Skip to content

no-restricted-disable rule isn't working with require-description rule #78

@eppisapiafsl

Description

@eppisapiafsl

Hi

There is an edge case in the no-restricted-disable rule when the require-description is enable

The no-restricted-disable doesn't catch the disable line when there is a break line in the description

When the description is single line, it work as expected

// eslint-disable-next-line eslint-comments/no-restricted-disable -- Catch the error
// eslint-disable-next-line react-hooks/exhaustive-deps  -- Needs to be called only on mounted component

Description with multiline

/* eslint-disable-next-line react-hooks/exhaustive-deps  -- 
  This is not reported by the no-restricted-disable rule */

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions