Can Code Validation be Done from Withing VS Code?

I’ve been linting (if that’s the right term) by copying my HTML document and pasting it into a free HTML code validator. Every time I do it there are between 15 and 20 mouse clicks involved and several keystrokes and involves leaving VS Code for a Windows tab in my browser. It seemed to me that there should be an extension or 3 for VS Code that would make the process less painful. I’ve been looking around, but know too little to evaluate what I’ve read. I need simpler instructions.

I found an extension called esLint. I know there are others. I was put off by the fact that the esLint extension requires a terminal entry to npm, something that I know nothing about. I do know that damage can be done from incorrect use of a teminal window. To prevent shooting myself in the foot - or elsewhere - I thought I should get advice.

First, is linting from VS Code practical and useful for a noob like me?
If so, what extension should I use?

TIA

ESLint is for JavaScript, not HTML, but it’s a commonly used linter
also yes, it requires npm because it’s a small program that needs to be installed so it can do all its work on your code

it looks like there is an HTML version of ESLint: https://html-eslint.org/

1 Like

As a follow up, I installed HTML-validate in VS Code. It is showing me errors as I write code but it isn’t showing dependency errors.

Is there a way to have it validate the entire Document? I haven’ t found one but put that down to my inexperience and lack of knowledge.

I don’t know, you will need to look up the documentation for that tool

1 Like

Alas, I don’t understand more than half of what I’ve read. :worried:

You can ask specific questions about what you don’t understand. Its much easier for people to help with specific questions.

1 Like