Skip to content

Commit

Permalink
Docs: Fix Incorrect Documentation (#12045)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vermiceli authored and kaicataldo committed Aug 2, 2019
1 parent 887d08c commit d961438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/rules/no-restricted-globals.md
Expand Up @@ -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.
Expand Down

0 comments on commit d961438

Please sign in to comment.