Visual Studio Code can detect some errors and automatically fix them using a set of features known as quick fixes.
Visual Studio Code will display a bulb icon on the left-hand side of our code near some error. If we click on the bulb icon, Visual Studio Code will display all the available quick fixes. If we select one of the available quick fixes, Visual Studio Code will perform the necessary changes to solve the problem automatically: