Skip to content

Commit

Permalink
Docs: Mention the globals key in the no-undef docs (#9867)
Browse files Browse the repository at this point in the history
* Mention the `globals` key

* Docs: mention specifying globals

* Docs: mention the globals key in the no-undef Rule Details section
  • Loading branch information
dandv authored and kaicataldo committed Jan 22, 2018
1 parent 33ca1ea commit 9cbb487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/rules/no-undef.md
Expand Up @@ -4,7 +4,7 @@ This rule can help you locate potential ReferenceErrors resulting from misspelli

## Rule Details

Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a `/*global ...*/` comment.
Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a `/*global ...*/` comment, or specified in the [`globals` key in the configuration file](https://eslint.org/docs/user-guide/configuring#specifying-globals). A common use case for these is if you intentionally use globals that are defined elsewhere (e.g. in a script sourced from HTML).

Examples of **incorrect** code for this rule:

Expand Down

0 comments on commit 9cbb487

Please sign in to comment.