JavaScript: Which extension to use for formatting and linting for Node.js projects in Visual Studio Code?

Akarsh Seggemu
1 min readMay 14, 2023

When you are working with Node.js projects in Visual Studio Code. You will need to make your JavaScript files follow a particular style format. You can choose which style format fits your needs of the project. A popular style format is the default one from Prettier.

Prettier

It helps automatically clean up your formatting.

As JavaScript is an interpreted language you need to use a linter in order to get code analysis tool to find out if your code has errors, bugs, stylistic errors and suspicious constructs. A popular lint tool is ESLint.

ESLint

It helps automatically detect coding errors and can do basic cleanup automatically.

Setting in Visual Studio Code

Enable the option Format On Save in the settings workspace of Visual Studio Code. Below is the screenshot for it.

Format On Save is enabled

If you like my articles, please follow me on Medium and you can also support me by buying me a coffee.

--

--

Akarsh Seggemu

IT Team Lead | MSc in Computer Science from Technische Universität Berlin | Writing articles to Empower Software Engineers and IT Leaders