Skip to content

Files

Latest commit

 

History

History
32 lines (20 loc) · 908 Bytes

disable-enable-pair.md

File metadata and controls

32 lines (20 loc) · 908 Bytes

Pattern: Missing use of eslint-enable

Issue: -

Description

eslint-disable directive-comments disable ESLint rules in all lines preceded by the comment. If you forget eslint-enable directive-comment, you may overlook ESLint warnings unintentionally.

This rule warns eslint-disable directive-comments if the eslint-enable directive-comment for that does not exist.

Example of incorrect code:

/*eslint eslint-comments/disable-enable-pair: error */

/*eslint-disable no-undef, no-unused-vars */
var foo = bar()

Example of correct code:

/*eslint eslint-comments/disable-enable-pair: error */

/*eslint-disable no-undef, no-unused-vars */
var foo = bar()
/*eslint-enable no-undef, no-unused-vars */

Further Reading