Skip to content

Commit

Permalink
fix(docs): improve docs for suppressing E0214 (undeclared type)
Browse files Browse the repository at this point in the history
E0214 can be suppressed by configuration. Mention this in the
configuration docs and mention configuration in E0214's docs.
  • Loading branch information
strager committed Jan 10, 2024
1 parent 74fb1b2 commit 5bd592e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ The following groups are supported for the *global-groups* configuration propert

*literally-anything*:: all possible global variables.
All global variables are defined as shadowable and writable.
This in effect suppresses E0002, E0033, E0057, or E0059 entirely (except if variables are also configured using the *globals* configuration property).
This in effect suppresses E0002, E0033, E0057, E0059, or E0214 entirely (except if variables are also configured using the *globals* configuration property).
This group is not enabled by default.
*browser*:: globals defined in HTML and DOM standards, including *window*, *alert*, and *console*.
This group is enabled by default.
Expand Down Expand Up @@ -215,7 +215,7 @@ Such an application might have the following `quick-lint-js.config` file:

'''

If you want to suppress E0002, E0033, E0057, or E0059, configure *globals* or *global-groups*.
If you want to suppress E0002, E0033, E0057, E0059, or E0214, configure *globals* or *global-groups*.
For example, if you're seeing a spurious warning E0057 "use of undeclared variable: MyLibrary" (false positive), use the following configuration in `quick-lint-js.config`:

[source,json]
Expand All @@ -227,7 +227,7 @@ For example, if you're seeing a spurious warning E0057 "use of undeclared variab
}
----

If you are not seeing E0002, E0033, E0057, or E0059 (false negative), but you want to see E0057 "use of undeclared variable: $", use one of the following configuration in `quick-lint-js.config`:
If you are not seeing E0002, E0033, E0057, E0059, or E0214 (false negative), but you want to see E0057 "use of undeclared variable: $", use one of the following configuration in `quick-lint-js.config`:

[source,json]
----
Expand Down
3 changes: 3 additions & 0 deletions docs/errors/E0214.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,7 @@ const Title: FC = () => {
};
```

Alternatively, if the type is global in your environment, [write a
quick-lint-js.config file](https://quick-lint-js.com/config/).

Introduced in quick-lint-js version 2.5.0.

0 comments on commit 5bd592e

Please sign in to comment.