Back to posts
January 9, 2023

Automatically fix ESLint errors in VS Code

Quick tip of the day... let VS Code fix ESLint errors automatically when the document is saved. Add this to your settings.json file, found in the .vscode directory in your project.

Prerequisite

Snippet

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.validate": ["javascript", "typescript"],
}

Never fix those 'unnecessary curly braces around strings' errors manually again!



Y

Yvo Geldhof - Front-end Developer @ Macaw

writes about front-end development, game development and everything in between as long as it is about tech.