Skip to content

docs: mention out-of-date editor type information FAQ #9428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/troubleshooting/typed-linting/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ slug: /troubleshooting/typed-linting
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

## Editor ESLint reports become out-of-date after file changes

There is a known issue in at least VS Code with typed linting that files might have out-of-date lint errors after multiple updates to files on disk.
The root cause is that ESLint doesn't provide a way for editors to know about cross-file dependencies, such as type information.
This results in files receiving out-of-date type information when files they import from are changed.

You might see this as erroneous `no-unsafe-*` rule complaints on `any` or `error typed` values.
Other rules may be more subtly incorrect.

For now, the workaround is to run the _**Restart ESLint Server**_ command in VS Code (or an equivalent in other editors) when types get out of date.

See [ESLint does not re-compute cross-file information on file changes (microsoft/vscode-eslint#1774)](https://github.com/microsoft/vscode-eslint/issues/1774) for more information.

<HiddenHeading id="allowdefaultprojectforfiles-glob-too-wide" />

## I get errors telling me "Having many files run with the default project is known to cause performance issues and slow down linting."
Expand Down
Loading