Skip to content

Files

Latest commit

 

History

History
27 lines (16 loc) · 773 Bytes

no-unused-disable.md

File metadata and controls

27 lines (16 loc) · 773 Bytes

Pattern: Unused eslint-disable

Issue: -

Description

Since refactoring or a bug fix of upstream, an eslint-disable directive-comment may become unnecessary. In that case, you should remove it since it may cause to overlook ESLint warnings in future.

Example of incorrect code:

/*eslint eslint-comments/no-unused-disable: error, eqeqeq: error, no-undef: error */

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

Example of correct code:

/*eslint eslint-comments/no-unused-disable: error, eqeqeq: error, no-undef: error */

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

Further Reading