From 06e2f08a95bfa75c5e53a289a169f54d7664bd53 Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 1 Aug 2019 16:38:35 -0400 Subject: [PATCH] Docs: Fix Incorrect Documentation The global variable that the user doesn't want to use is event not error I think the confusion came from the rule setting being named error --- docs/rules/no-restricted-globals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rules/no-restricted-globals.md b/docs/rules/no-restricted-globals.md index e3d612412e1..dd3e15b7b60 100644 --- a/docs/rules/no-restricted-globals.md +++ b/docs/rules/no-restricted-globals.md @@ -77,7 +77,7 @@ Examples of **incorrect** code for a sample `"event"` global variable name, alon ```js /*global event*/ -/* eslint no-restricted-globals: ["error", { name: "error", message: "Use local parameter instead." }] */ +/* eslint no-restricted-globals: ["error", { name: "event", message: "Use local parameter instead." }] */ function onClick() { console.log(event); // Unexpected global variable 'event'. Use local parameter instead.