Let´s say we are working on a project that uses ESLint to manage its code style, and we want to match the team’s formatting.

 so let´s configure our VSCode to use ESLint :

  1. Install VSCode ESLint Plugin
  2. Add these 4 new lines inside the top-level settings object:
{
  // ...
  "eslint.format.enable": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}

The first one turns on ESLint for formatting, and the next one make it do the formatting when you hit save.

That should do it! Save the settings file and close it, we’re done.

By Shabazz

Software Engineer, MCSD, Web developer & Angular specialist

Leave a Reply

Your email address will not be published. Required fields are marked *