From db8b9634f746029ec2f41e8c0cceebe1e9e7c41f Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Fri, 18 Jun 2021 11:21:22 -0700 Subject: [PATCH] docs: mention best practice for disabling a rule for an entire file --- docs/rules/disable-enable-pair.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/rules/disable-enable-pair.md b/docs/rules/disable-enable-pair.md index 5ac1909..27ebf15 100644 --- a/docs/rules/disable-enable-pair.md +++ b/docs/rules/disable-enable-pair.md @@ -72,3 +72,9 @@ var foo = bar() var fizz = buzz() /*eslint-enable no-unused-vars */ " /> + +Note however that if your goal is to disable a rule for an entire file, it's better practice and more effective to use the following comment style instead (which actually disables the rule for the entire file instead of just starting after the `eslint-disable` comment): + +