Skip to content

Files

Latest commit

 

History

History
26 lines (18 loc) · 585 Bytes

File metadata and controls

26 lines (18 loc) · 585 Bytes

Pattern: Disabling restricted ESLint rule

Issue: -

Description

This rule prevents disabling specific ESLint rules that are configured as restricted. This ensures important rules cannot be bypassed with disable comments.

Examples

Example of incorrect code:

// With configuration: [error, no-undef, no-unused-vars]
/*eslint-disable no-undef */
f()

f() //eslint-disable-line no-undef

f() //eslint-disable-line

Example of correct code:

// With configuration: [error, no-undef, no-unused-vars]
f() //eslint-disable-line another-rule