Skip to content

Latest commit

 

History

History
35 lines (20 loc) · 1.03 KB

no-duplicate-disable.md

File metadata and controls

35 lines (20 loc) · 1.03 KB

eslint-comments/no-duplicate-disable

disallow duplicate eslint-disable comments

  • 🌟 The "extends": "plugin:eslint-comments/recommended" property in a configuration file enables this rule.

Duplicate of eslint-disable directive-comments implies that there is a mix of wide-range directive-comments and narrow-range directive-comments. The mix may cause to overlook ESLint warnings in future.

This rule warns duplicate eslint-disable directive-comments.

Rule Details

Examples of 👎 incorrect code for this rule:

<eslint-playground type="bad" code="/*eslint eslint-comments/no-duplicate-disable: error */

/*eslint-disable no-undef */

var foo = bar() //eslint-disable-line no-undef " />

Examples of 👍 correct code for this rule:

<eslint-playground type="good" code="/*eslint eslint-comments/no-duplicate-disable: error */

/*eslint-disable no-undef */

var foo = bar() " />

<eslint-playground type="good" code="/*eslint eslint-comments/no-duplicate-disable: error */

var foo = bar() //eslint-disable-line no-undef " />