TSLint extension throwing errors in my Angular application running in Visual Studio Code

user1186050 picture user1186050 · Dec 10, 2020 · Viewed 11.8k times · Source

I recently started seeing, what seems like, TSLint errors. They look like this:

Not using the local TSLint version found for '/Users/myname/myproject/client/src/app/likes/likee/likee.component.ts'. To enable code execution from the current workspace you must enable workspace library execution.

I'm seeing them in my .ts files when I open them and it shows a yellow squiggly line on the first line of each .ts page.

I see on the TSLint site it says it's been deprecated.

QUESTION 1 - What's the cause of these errors and why am I suddenly seeing them?

QUESTION 2 - Should I uninstall the Visual Studio Code TSLint extension and install the ESLint extension?

Answer

user2442961 picture user2442961 · Dec 10, 2020

Like @Tuấn Nguyễn described, you need to:

  1. Go to Command Palette by pressing Ctrl + Shift + P,

  2. In the input that pops up at the top of the VS Code, start typing

    TSLint: Manage workspace library execution"
    

    and hit Enter key.

  3. From the menu that replaces the input, pick enable workspace library execution and again press Enter key.