diff --git a/docs/user-guide/configuring/rules.md b/docs/user-guide/configuring/rules.md index c33a64ad4f2..205a5f11995 100644 --- a/docs/user-guide/configuring/rules.md +++ b/docs/user-guide/configuring/rules.md @@ -144,6 +144,8 @@ console.log('bar'); /* eslint-enable no-alert, no-console */ ``` +**Note:** `/* eslint-enable */` without any specific rules listed will cause all disabled rules to be re-enabled. + To disable rule warnings in an entire file, put a `/* eslint-disable */` block comment at the top of the file: ```js @@ -160,6 +162,14 @@ You can also disable or enable specific rules for an entire file: alert('foo'); ``` +To ensure that a rule is never applied (regardless of any future enable/disable lines): + +```js +/* eslint no-alert: "off" */ + +alert('foo'); +``` + To disable all rules on a specific line, use a line or block comment in one of the following formats: ```js