A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/typescript-eslint/typescript-eslint/issues/8291 below:

Add FAQ entry for out-of-date typed rule reports on file changes in editors such as VS Code · Issue #8291 · typescript-eslint/typescript-eslint · GitHub

Before You File a Documentation Request Please Confirm You Have Done The Following... Suggested Changes

@typescript-eslint/parser sets up a TypeScript program behind-the-scenes when it parses files. The program for a file is later made on ESLintUtils.getParserServicescontext).program. This is documented in Custom Rules > Typed Rules. That program is what's used for type information in typed lint rules.

One known issue with the parser-generating-type-information strategy is that programs are only recreated when ESLint re-parses. The VS Code ESLint editor extension has a known issue where modifying one file doesn't impact the view of that file's types seen by other files. You can view a standalone reproduction on https://github.com/JoshuaKGoldberg/repros/tree/repro-vs-code-reparse-typescript-eslint.

The current best workaround we know of is to run the Restart ESLint Server command in VS Code. That's what I recommend to folks who bring this up.

We would love a better workaround, but that's an open issue: microsoft/vscode-eslint#1774.

Affected URL(s)

https://typescript-eslint.io/linting/troubleshooting


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4