Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2017 Javascript linter highlight errors

I am using VS17 to edit client side Javascript files.

The built-in intellisense and linter are great, but when the linter finds an error I get only a green scribble line under the error (using dark theme).

This is way too easy to miss. I end up going back to the browser etc. only to find out a syntax error way too often.

How can I get more visual cues on linter errors. I want something on the left side, something marking the whole line from end to right (as in sublime-linter), or something else that makes it super visible that something is wrong.

like image 232
kofifus Avatar asked Jul 27 '17 03:07

kofifus


People also ask

How do I see lint errors in Visual Studio?

To find the settings in Visual Studio Code, use the command palette to open Preferences: Open Workspace Settings (JSON). With this code in your settings. json file, ESLint will now automatically correct errors and validate JavaScript on save. Return back to your app.

How do I check all ESLint errors?

If you have the ESLint extension installed you can use CTRL+SHIFT+P to open the Command Palette. Then search for ESLint: Fix all auto-fixable Problems and press ENTER (or RETURN ). You are free from counting indentation and checking for quotation marks and semicolons!

How do I get VS code to show errors?

You can click on the summary or press Ctrl+Shift+M to display the PROBLEMS panel with a list of all current errors. If you open a file that has errors or warnings, they will be rendered inline with the text and in the overview ruler.


2 Answers

To visualize errors list to left side of your VS window more highlight follow these steps:

  1. Go to left bottom side of VS and drag Error List. And Drop it in center pane icon enter image description here

  2. After this you can easily view all errors and warnings to left pane.

    enter image description here

Edit:

Move Error List to left side of you window and then a new prediction will show up like: enter image description here and drop it to center enter image description here.

Not drop to middle center of your editor!

enter image description here

EDIT 2: For highlighting the error code lines in your editor, you need two add-in to be enabled:

  • Enable Productivity Power Tools will highlight errors code-files (tab).


  • Enable ReSharper will highlight error lines in a code-file.


EDIT 3:

After installing Productivity Power Tools then go in VS solution explorer and select errors from dropdown:

enter image description here

And follow this reference.

like image 128
stefan Avatar answered Nov 04 '22 16:11

stefan


Have you tried changing the "Compiler Error / Other Error / Syntax Error / Warning" colors?

enter image description here

like image 40
combatc2 Avatar answered Nov 04 '22 15:11

combatc2