Thomas Segato
Thomas Segato

Reputation: 5257

Lint errors not being refreshed after fix

In VS Code I get a lot of lint errors, but they do not refresh after fix. If you look in image I removed line 16 but it still appears.

Is this a bug in VS Code or how do these get removed?

enter image description here Do I have to restart VS Code?

Upvotes: 15

Views: 17022

Answers (3)

Kris Boyd
Kris Boyd

Reputation: 1170

The accepted answer here is real bad, there's no actual explaination.

For ESLint: I pull this from this thread https://github.com/microsoft/vscode-eslint/issues/477

To fix this you need to restart the lint server:

  1. Use CTRL + SHIFT + P
  2. Look for: ESLint: Restart ESLint Server

For TSLint: VSCode needs to be restarted after modifying tsconfig and tslint files in nrwl nx projects to eliminate errors (not sure why the answer got a -1 as this seems to be viable. If anyone knows please let me know!)

  1. Use CTRL + SHIFT + P
  2. Look for: Restart TS Server

Upvotes: 37

ywang1724
ywang1724

Reputation: 847

You can restart the lint server in VS Code.

Upvotes: -4

ultraGentle
ultraGentle

Reputation: 6329

Linter messages generated in the terminal by build tools and compilers are completely separate from the real time linting generated by extensions and shown in the VS code problems pane.

The latter will disappear automatically upon fix, but the former will only change once you rebuild or recompile.

Upvotes: 0

Related Questions