Skip to content

Commit 5c91bee

Browse files
docs: update docs/getting-started/linting/README.md (typescript-eslint#2243)
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
1 parent c35a66a commit 5c91bee

File tree

1 file changed

+17
-0
lines changed
  • docs/getting-started/linting

1 file changed

+17
-0
lines changed

docs/getting-started/linting/FAQ.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- [TypeScript should be installed locally](#typescript-should-be-installed-locally)
1111
- [How can I ban `<specific language feature>`?](#how-can-i-ban-specific-language-feature)
1212
- [Why don't I see TypeScript errors in my ESLint output?](#why-dont-i-see-typescript-errors-in-my-eslint-output)
13+
- [I get errors from the `no-undef` rule about global variables not being defined, even though there are no TypeScript errors](#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors)
1314

1415
---
1516

@@ -228,3 +229,19 @@ Our tooling does not reproduce the errors that TypeScript provides, because doin
228229
Instead, our tooling exists to **_augment_** TypeScript's built in checks with lint rules that consume the type information in new ways beyond just verifying the runtime correctness of your code.
229230

230231
[1] - TypeScript computes type information lazily, so us asking for the errors it would produce from the compiler would take an _additional_ ~100ms per file. This doesn't sound like a lot, but depending on the size of your codebase, it can easily add up to between several seconds to several minutes to a lint run.
232+
233+
<br />
234+
<br />
235+
<br />
236+
237+
---
238+
239+
<br />
240+
<br />
241+
<br />
242+
243+
## I get errors from the `no-undef` rule about global variables not being defined, even though there are no TypeScript errors
244+
245+
The `no-undef` lint rule does not use TypeScript to determine the global variables that exist - instead, it relies upon ESLint's configuration.
246+
247+
You can [manually define the set of allowed `globals` in your ESLint config](https://eslint.org/docs/user-guide/configuring#specifying-globals), and/or you can use one of the [pre-defined environment (`env`) configurations](https://eslint.org/docs/user-guide/configuring#specifying-environments).

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy