Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

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

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

like image 639
user1186050 Avatar asked Oct 07 '22 18:10

user1186050


People also ask

How do I open VS Code command palette?

Command Palette# VS Code is equally accessible from the keyboard. The most important key combination to know is Ctrl+Shift+P, which brings up the Command Palette.


1 Answers

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

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

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

    TSLint: Manage workspace library execution"
    

    and hit the Enter key.

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

like image 469
user2442961 Avatar answered Oct 22 '22 08:10

user2442961