Skip to content

Files

Latest commit

 

History

History
27 lines (18 loc) · 580 Bytes

File metadata and controls

27 lines (18 loc) · 580 Bytes

Pattern: Duplicate eslint-disable comment

Issue: -

Description

Using duplicate eslint-disable comments (a mix of wide-range and narrow-range directive comments) can cause warnings to be overlooked in the future. Each rule should only be disabled once in a given context.

Examples

Example of incorrect code:

/*eslint-disable no-undef */

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

Example of correct code:

/*eslint-disable no-undef */

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