Skip to content

Commit c35a66a

Browse files
authored
docs: add FAQ about typescript errors not being included in lint output (typescript-eslint#2258)
There have been a few issues asked about this, so explicitly note this in the FAQ.
1 parent 689dae3 commit c35a66a

File tree

1 file changed

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

1 file changed

+20
-0
lines changed

docs/getting-started/linting/FAQ.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [One of my lint rules isn't working correctly on a pure JavaScript file](#one-of-my-lint-rules-isnt-working-correctly-on-a-pure-javascript-file)
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)
12+
- [Why don't I see TypeScript errors in my ESLint output?](#why-dont-i-see-typescript-errors-in-my-eslint-output)
1213

1314
---
1415

@@ -208,3 +209,22 @@ For example, you can ban enums (or some variation of) using one of the following
208209
}
209210
}
210211
```
212+
213+
<br />
214+
<br />
215+
<br />
216+
217+
---
218+
219+
<br />
220+
<br />
221+
<br />
222+
223+
## Why don't I see TypeScript errors in my ESLint output?
224+
225+
TypeScript's compiler (or whatever your build chain may be) is specifically designed and built to validate the correctness of your codebase.
226+
Our tooling does not reproduce the errors that TypeScript provides, because doing so would slow down the lint run [1], and duplicate the errors that TypeScript already outputs for you.
227+
228+
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.
229+
230+
[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.

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