From 1025772a5692d1f46fc35c5d4cb927eaca6c2031 Mon Sep 17 00:00:00 2001 From: Brandon Mills Date: Wed, 27 Jul 2016 20:05:23 -0400 Subject: [PATCH] Docs: Add plugin example to disabling with comments guide (fixes #6742) (#6747) --- docs/user-guide/configuring.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/user-guide/configuring.md b/docs/user-guide/configuring.md index 0ff1904bf88..f6c55f73140 100644 --- a/docs/user-guide/configuring.md +++ b/docs/user-guide/configuring.md @@ -415,6 +415,12 @@ alert('foo'); // eslint-disable-line no-alert, quotes, semi alert('foo'); ``` +All of the above methods also work for plugin rules. For example, to disable `eslint-plugin-example`'s `rule-name` rule, combine the plugin's name (`example`) and the rule's name (`rule-name`) into `example/rule-name`: + +```js +foo(); // eslint-disable-line example/rule-name +``` + **Note:** Comments that disable warnings for a portion of a file tell ESLint not to report rule violations for the disabled code. ESLint still parses the entire file, however, so disabled code still needs to be syntactically valid JavaScript. ## Adding Shared Settings