Skip to content

Files

Latest commit

 

History

History
31 lines (18 loc) · 755 Bytes

no-duplicate-disable.md

File metadata and controls

31 lines (18 loc) · 755 Bytes

Pattern: Duplicate eslint-disable

Issue: -

Description

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.

Example of incorrect code:

/*eslint eslint-comments/no-duplicate-disable: error */

/*eslint-disable no-undef */

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

Example of correct code:

/*eslint eslint-comments/no-duplicate-disable: error */

/*eslint-disable no-undef */

var foo = bar()

Further Reading