How to auto fix ESlint issues?

ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code, with the goal of making code more consistent and avoiding bugs.

Therefore, the natural tendency of this tool would be to raise warnings or errors in the terminal when you are executing stuff on your running server. For example, it raises warnings like:

To fix this issue, we can try to auto fix the ESLint errors:

Step 1) Use Ctrl + Shift + P to open the command palette that looks like:

Step 2) Search for ESLint fix all auto-fixable Problems and press enter.

Step 3) You might get a popup on the bottom right corner of the workspace, that might ask for a reload, click on it to reload because every new extension or change requires the workspace to be reloaded so that the change is reflected.