[VIDEO] Automatically fix ESLint code validation errors in Visual Studio Code

Adrian Oprea
1 min readSep 7, 2017

--

Just found this very interesting feature in Visual Studio Code. It turns out that if you break a style rule, and you get a warning from ESLint, if you click on the lightbulb that appears on the gutter, near the line number where the error is, you get a “Fix problem” option.

At first, I wasn’t sure if this was built into VSCode or in the the ESLint extension I’m using. After looking into this, I found that the extension not only provides that functionality but it offers many more nice things like auto fixing all “fixable” validation errors on save.

Check it out: ESLint by Dirk Baeumer. By the way, it has 1.5+m installs!

The video

Video — ESLint plugin for Visual Studio Code — Fix dangling comma error

Follow-up video — Fix all errors

This update comes after I started some refactoring work on a personal project. It was then, when I saw that the plugin is also able to fix multiple style errors. Check it out!

If you found this video useful, please click on the 👏 button and share it to help others find it. You can also follow me on Twitter.

Originally published on Oprea.Rocks

--

--

Adrian Oprea
Adrian Oprea

Written by Adrian Oprea

Founder & CEO of WeRemote.EU. Remote work enthusiast. Bookworm.

No responses yet